123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.caimei.www.mapper.SinglePageDao">
- <select id="getFreePageById" resultType="com.caimei.www.pojo.page.PageContent">
- select a.id, a.type, a.title, a.keywords, a.description, f.content
- from cm_page a
- left join cm_page_freedom f on a.id=f.pageId
- where a.type=4 and a.enabledStatus=1 and f.type=1
- and a.id=#{id}
- </select>
- <select id="getTopicPageById" resultType="com.caimei.www.pojo.page.PageContent">
- select a.id, a.type, a.title, a.keywords, a.description, a.headImage as image, a.headText as content
- from cm_page a
- where a.type=1 and a.enabledStatus=1
- and a.id=#{id}
- </select>
- <select id="getLivePageData" resultType="com.caimei.www.pojo.page.PageContent">
- select a.id, a.type, a.title, a.keywords, a.description, a.headImage as image, a.headText as content
- from cm_page a
- where a.id=1 and a.type=3 and a.enabledStatus=1
- </select>
- <select id="getFloorByPageId" resultType="com.caimei.www.pojo.page.PageFloor">
- select id, pageId as type, title, link
- from cm_page_centre
- where pageId=#{id}
- and enabledStatus=1
- order by sort desc,createDate desc
- </select>
- <select id="getDataByFloorId" resultType="com.caimei.www.pojo.page.ImageLink">
- select a.id as id,
- a.title as title,
- a.link as link,
- a.image as image
- from cm_page_image a
- right join cm_page_centre_image b on b.imageId=a.id
- where b.centreId=#{floorId} and a.enabledStatus=1
- order by a.sort desc,a.createDate desc
- </select>
- <select id="getLiveTeachers" resultType="com.caimei.www.pojo.page.ImageLink">
- select a.id as id,
- a.title as title,
- a.link as link,
- a.image as image
- from cm_page_image a
- where a.type=3 and a.enabledStatus=1
- order by a.sort desc,a.createDate desc
- </select>
- <select id="getHelpPageById" resultType="com.caimei.www.pojo.page.PageContent">
- select
- helpPageID as id,
- helpPageTypeID as type,
- title,
- contentTxt as description,
- content
- from helppage
- where helpPageID=#{id}
- and validFlag=1 and showFlag=1
- </select>
- <select id="getMaxSuggestionId" resultType="java.lang.Integer">
- select MAX(suggestionID) from suggestion
- </select>
- <insert id="suggestionSave" parameterType="com.caimei.www.pojo.save.Suggestion">
- insert into suggestion
- (suggestionID, suggestionTypeID, userID, title, content, linkMan, mobile, addTime)
- values (#{suggestionID,jdbcType=INTEGER},
- #{suggestionTypeID,jdbcType=INTEGER},
- #{userID,jdbcType=INTEGER},
- #{title,jdbcType=VARCHAR},
- #{content,jdbcType=VARCHAR},
- #{linkMan,jdbcType=VARCHAR},
- #{mobile,jdbcType=VARCHAR},
- #{addTime,jdbcType=VARCHAR})
- </insert>
- <select id="findMobileContent" resultType="string">
- SELECT content FROM cm_page_freedom WHERE pageId = #{id} AND type = 2
- </select>
- <select id="getInstrumentPageIdById" resultType="java.lang.Integer">
- select id from cm_page a
- where
- a.type=5 and a.enabledStatus=1
- and a.id=#{id}
- </select>
- <select id="getPageTitleById" resultType="java.lang.String">
- select title from cm_page where id=#{id}
- </select>
- <select id="getActivityPageIdById" resultType="java.lang.Integer">
- select id from cm_page a
- where
- a.type=6 and a.enabledStatus=1
- and a.id=#{id}
- </select>
- <select id="getPageTypeSort" resultType="java.lang.Integer">
- select typeSort from cm_page
- where id = #{pageId} and enabledStatus = '1'
- </select>
- <select id="getBeautyPageIdById" resultType="java.lang.Integer">
- select id from cm_page a
- where
- a.type=7 and a.enabledStatus=1
- and a.id=#{id}
- </select>
- </mapper>
|