HomeMapper.xml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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.HomeDao">
  4. <select id="getHomePageFloor" resultType="com.caimei.www.pojo.HomeFloor">
  5. select id, type, floorTitle as title, floorDetail as detail
  6. from new_page_floor
  7. where delFlag = 0 and wwwEnabledStatus = '1'
  8. order by sort
  9. </select>
  10. <select id="getHomeSecondFloor" resultType="com.caimei.www.pojo.HomeFloor">
  11. select id, title, description as detail
  12. from cm_page_big_topic
  13. where delFlag = 0 and enabledStatus = '1'
  14. order by sort
  15. </select>
  16. <select id="getHomeBanners" resultType="com.caimei.www.pojo.ImageLink">
  17. select id, title, link, image
  18. from new_page_homeImage
  19. where wwwEnabledStatus = 1
  20. order by sort desc, createDate desc
  21. </select>
  22. <select id="getAdvertising" resultType="com.caimei.www.pojo.ImageLink">
  23. select id, adTitle as title, link, adImage as image
  24. from new_page_advertising
  25. where delFlag = 0
  26. order by sort, createDate desc
  27. </select>
  28. <select id="getRecommendeds" resultType="com.caimei.www.pojo.ProductList">
  29. select
  30. p.productID as pid,
  31. p.`name` as `name`,
  32. p.mainImage as image,
  33. p.price1 as price,
  34. p.unit as unit,
  35. p.price1TextFlag as priceFlag
  36. from product p
  37. where p.validFlag != 0
  38. and p.actFlag = 1
  39. and (p.actType = 1 or p.actType = 2)
  40. and p.shopID not in (SELECT s.`value` FROM `sys_dict` s WHERE s.type='heheShopID')
  41. order by p.actSort
  42. </select>
  43. <select id="getBigTopicData" resultType="com.caimei.www.pojo.SubMenu">
  44. select
  45. id,
  46. bigTopicId as topId,
  47. title as name,
  48. image,
  49. link,
  50. sort
  51. from cm_page_big_topic_floor
  52. <where>
  53. delFlag = 0 and enabledStatus = '1'
  54. <if test = "topId != null and topId != ''">
  55. and bigTopicId = #{topId}
  56. </if>
  57. </where>
  58. order by sort ,enabledStatus ,createDate
  59. limit 0,5
  60. </select>
  61. </mapper>