Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

59 строки
2.1 KiB

  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.iformall.mapper.WxCouponPresentMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCouponPresent">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="user_id" jdbcType="BIGINT" property="userId"/>
  8. <result column="coupon_id" jdbcType="BIGINT" property="couponId"/>
  9. <result column="coupon_name" jdbcType="VARCHAR" property="couponName"/>
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  11. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  12. <result column="send_amount" jdbcType="INTEGER" property="sendAmount"/>
  13. </resultMap>
  14. <sql id="allColumns">
  15. `id`,`tenant_id`,`coupon_id`,`coupon_name`,`user_id`,`create_time`,`update_time`,`send_amount`
  16. </sql>
  17. <sql id="dynamicWhereConditions">
  18. where 1 = 1
  19. <if test=" null != id ">
  20. and `id` = #{id}
  21. </if>
  22. <if test=" null != tenantId ">
  23. and `tenant_id` = #{tenantId}
  24. </if>
  25. <if test=" null != couponId ">
  26. and `coupon_id` = #{couponId}
  27. </if>
  28. <if test=" null != couponName ">
  29. and `coupon_name` like concat('%', #{couponName},'%')
  30. </if>
  31. <if test=" null != phones ">
  32. and `phones` like concat('%', #{phones},'%')
  33. </if>
  34. <if test=" null != sendTimeStart and null!=sendTimeEnd ">
  35. and `create_date` between #{sendTimeStart} and #{sendTimeEnd}
  36. </if>
  37. <if test=" null != updateTime ">
  38. and `update_date` = #{updateTime}
  39. </if>
  40. <if test=" null != ids ">
  41. and id in
  42. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  43. #{idItem}
  44. </foreach>
  45. </if>
  46. <if test=" null != sortColumns">order by ${sortColumns}</if>
  47. </sql>
  48. <select id="findList" parameterType="com.iformall.domain.po.WxCouponPresent" resultMap="BaseResultMap">
  49. select
  50. <include refid="allColumns"/>
  51. from wx_coupon_present
  52. <include refid="dynamicWhereConditions"/>
  53. </select>
  54. </mapper>