后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PushLimitMapper.xml 3.2 KiB

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