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

76 строки
2.6 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.PushLimitMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.PushLimit">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="msg_amount" jdbcType="INTEGER" property="msgAmount"/>
  8. <result column="coupon_amount" jdbcType="INTEGER" property="couponAmount"/>
  9. <result column="coupon_day" jdbcType="INTEGER" property="couponDay"/>
  10. <result column="time_start" jdbcType="VARCHAR" property="timeStart"/>
  11. <result column="time_end" jdbcType="VARCHAR" property="timeEnd"/>
  12. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  13. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`tenant_id`,`msg_amount`,`coupon_amount`,`coupon_day`,`time_start`,`time_end`,`create_time`,`update_time`
  17. </sql>
  18. <sql id="dynamicWhereConditions">
  19. where 1 = 1
  20. <if test=" null != id ">
  21. and `id` = #{id}
  22. </if>
  23. <if test=" null != tenantId ">
  24. and `tenant_id` = #{tenantId}
  25. </if>
  26. <if test=" null != msgAmount ">
  27. and `msg_amount` = #{msgAmount}
  28. </if>
  29. <if test=" null != couponAmount ">
  30. and `coupon_amount` = #{couponAmount}
  31. </if>
  32. <if test=" null != couponDay ">
  33. and `coupon_day` = #{couponDay}
  34. </if>
  35. <if test=" null != timeStart ">
  36. and `time_start` like concat('%', #{timeStart},'%')
  37. </if>
  38. <if test=" null != timeEnd ">
  39. and `time_end` like concat('%', #{timeEnd},'%')
  40. </if>
  41. <if test=" null != createTime ">
  42. and `create_time` = #{createTime}
  43. </if>
  44. <if test=" null != updateTime ">
  45. and `update_time` = #{updateTime}
  46. </if>
  47. <if test=" null != ids ">
  48. and id in
  49. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  50. #{idItem}
  51. </foreach>
  52. </if>
  53. <if test=" null != sortColumns">order by ${sortColumns}</if>
  54. </sql>
  55. <select id="findList" parameterType="com.iformall.domain.po.PushLimit" resultMap="BaseResultMap">
  56. select
  57. <include refid="allColumns"/>
  58. from push_limit
  59. <include refid="dynamicWhereConditions"/>
  60. </select>
  61. </mapper>