PromotionCouponTemplateMapper.xml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.zsElectric.boot.business.mapper.PromotionCouponTemplateMapper">
  4. <!-- 获取优惠劵模板分页列表 -->
  5. <select id="getPromotionCouponTemplatePage" resultType="com.zsElectric.boot.business.model.vo.PromotionCouponTemplateVO">
  6. SELECT
  7. id,
  8. name,
  9. description,
  10. status,
  11. total_count,
  12. take_limit_count,
  13. failure_time,
  14. use_price,
  15. discount_price,
  16. valid_time_weeks,
  17. valid_time_hour,
  18. create_time,
  19. create_by,
  20. update_time,
  21. update_by
  22. FROM
  23. c_promotion_coupon_template
  24. <where>
  25. is_deleted = 0
  26. <if test="queryParams.name != null and queryParams.name != ''">
  27. AND name LIKE CONCAT('%', #{queryParams.name}, '%')
  28. </if>
  29. <if test="queryParams.status != null">
  30. AND status = #{queryParams.status}
  31. </if>
  32. <if test="queryParams.startTime != null">
  33. AND create_time <![CDATA[ >= ]]> #{queryParams.startTime,jdbcType=DATE}
  34. </if>
  35. <if test="queryParams.endTime != null">
  36. AND create_time <![CDATA[ <= ]]> #{queryParams.endTime,jdbcType=DATE}
  37. </if>
  38. </where>
  39. </select>
  40. </mapper>