PolicyCMapper.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  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.gree.mall.manager.commonmapper.PolicyCMapper">
  4. <select id="list" resultType="com.gree.mall.manager.bean.policy.PolicyVo">
  5. SELECT
  6. ${ex.selected}
  7. FROM policy a
  8. ${ex.query}
  9. <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
  10. AND a.company_wechat_id IN
  11. <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
  12. #{item}
  13. </foreach>
  14. </if>
  15. <if test="ex.orderBy == null or ex.orderBy ==''">
  16. ORDER BY a.create_time DESC
  17. </if>
  18. ${ex.orderBy}
  19. </select>
  20. <select id="listAgreement" resultType="com.gree.mall.manager.bean.policy.AgreementVo">
  21. SELECT
  22. ${ex.selected}
  23. FROM agreement a
  24. ${ex.query}
  25. <if test="adminCompanyIds != null and adminCompanyIds.size > 0">
  26. AND a.company_wechat_id IN
  27. <foreach item="item" index="index" collection="adminCompanyIds" open="(" separator="," close=")">
  28. #{item}
  29. </foreach>
  30. </if>
  31. <if test="ex.orderBy == null or ex.orderBy ==''">
  32. ORDER BY a.create_time DESC
  33. </if>
  34. ${ex.orderBy}
  35. </select>
  36. </mapper>