SinglePageMapper.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.caimei.www.mapper.SinglePageDao">
  4. <select id="getFreePageById" resultType="com.caimei.www.pojo.content.PageContent">
  5. select a.id, a.type, a.title, a.keywords, a.description, f.content
  6. from cm_page a
  7. left join cm_page_freedom f on a.id=f.pageId
  8. where a.type=4 and a.enabledStatus=1 and f.type=1
  9. and a.id=#{id}
  10. </select>
  11. <select id="getTopicPageById" resultType="com.caimei.www.pojo.content.PageContent">
  12. select a.id, a.type, a.title, a.keywords, a.description, a.headImage as image, a.headText as content
  13. from cm_page a
  14. where a.type=1 and a.enabledStatus=1
  15. and a.id=#{id}
  16. </select>
  17. <select id="getLivePageData" resultType="com.caimei.www.pojo.content.PageContent">
  18. select a.id, a.type, a.title, a.keywords, a.description, a.headImage as image, a.headText as content
  19. from cm_page a
  20. where a.id=1 and a.type=3 and a.enabledStatus=1
  21. </select>
  22. <select id="getFloorByPageId" resultType="com.caimei.www.pojo.content.PageFloor">
  23. select id, pageId as type, title, link
  24. from cm_page_centre
  25. where pageId=#{id}
  26. and enabledStatus=1
  27. order by sort desc,createDate desc
  28. </select>
  29. <select id="getDataByFloorId" resultType="com.caimei.www.pojo.content.ImageLink">
  30. select a.id as id,
  31. a.title as title,
  32. a.link as link,
  33. d.image as image
  34. from cm_page_image a
  35. right join cm_page_centre_image b on b.imageId=a.id
  36. left join cm_page_image_activity c on c.imageId=a.id
  37. left join acttype d on d.acttypeId=c.acttypeId
  38. where b.centreId=#{floorId} and a.enabledStatus=1
  39. order by a.sort desc,a.createDate desc
  40. </select>
  41. <select id="getPromotionsList" resultType="com.caimei.www.pojo.content.ImageLink">
  42. select a.id as id,
  43. a.title as title,
  44. a.link as link,
  45. a.image as image,
  46. a.beginTime as beginTime,
  47. a.endTime as endTime
  48. from cm_page_image a
  49. where a.type=4 and a.enabledStatus=1
  50. order by a.sort desc,a.createDate desc
  51. </select>
  52. <select id="getLiveTeachers" resultType="com.caimei.www.pojo.content.ImageLink">
  53. select a.id as id,
  54. a.title as title,
  55. a.link as link,
  56. a.image as image
  57. from cm_page_image a
  58. where a.type=3 and a.enabledStatus=1
  59. order by a.sort desc,a.createDate desc
  60. </select>
  61. </mapper>