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

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