InstrumentMapper.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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.InstrumentDao">
  4. <select id="getInstrumentById" resultType="com.caimei.www.pojo.content.InstrumentDetail">
  5. select id, type, title, keywords, description,
  6. headImage, bottomText, bottomImage, crmBottomImage1 as crmBottomImage
  7. from cm_page
  8. where id = #{instrumentId} and type='2' and enabledStatus=1
  9. </select>
  10. <select id="getParametersByInstrumentId" resultType="com.caimei.www.pojo.content.Parameter">
  11. select id,
  12. pageId as parentId,
  13. name,
  14. content,
  15. type
  16. from cm_page_name_content
  17. where pageId=#{instrumentId}
  18. </select>
  19. <select id="getInstrumentRecommendById" resultType="com.caimei.www.pojo.content.PageFloor">
  20. select id,
  21. pageId as type,
  22. title,
  23. link as detail
  24. from cm_page_centre
  25. where pageId=#{instrumentId}
  26. and enabledStatus=1
  27. order by sort desc,createDate desc
  28. </select>
  29. <select id="getFloorDataById" 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=#{id} and a.enabledStatus=1
  39. order by a.sort desc,a.createDate desc
  40. </select>
  41. </mapper>