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

127 строки
3.7 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.WxCouponInjectMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCouponInject">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="name" jdbcType="VARCHAR" property="name" />
  8. <result column="m_user_id" jdbcType="BIGINT" property="mUserId" />
  9. <result column="send_type" jdbcType="INTEGER" property="sendType" />
  10. <result column="coupon_id" jdbcType="BIGINT" property="couponId" />
  11. <result column="coupon_name" jdbcType="VARCHAR" property="couponName" />
  12. <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
  13. <result column="send_amount" jdbcType="INTEGER" property="sendAmount" />
  14. <result column="status" jdbcType="INTEGER" property="status" />
  15. <result column="error_msg" jdbcType="VARCHAR" property="errorMsg" />
  16. <result column="tags" jdbcType="VARCHAR" property="tags" />
  17. <result column="msg_id" jdbcType="BIGINT" property="msgId" />
  18. <result column="model_id" jdbcType="BIGINT" property="modelId" />
  19. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  20. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  21. </resultMap>
  22. <sql id="allColumns">
  23. `id`,`tenant_id`,`name`,`m_user_id`,`send_type`,`coupon_id`,`coupon_name`,`send_time`,`send_amount`,`status`,`error_msg`,`tags`,`msg_id`,`create_time`,`update_time`,`model_id`
  24. </sql>
  25. <sql id="dynamicWhereConditions">
  26. where 1 = 1
  27. <if test=" null != id ">
  28. and `id` = #{id}
  29. </if>
  30. <if test=" null != tenantId ">
  31. and `tenant_id`= #{tenantId}
  32. </if>
  33. <if test=" null != name ">
  34. and `name` like concat('%', #{name},'%')
  35. </if>
  36. <if test=" null != mUserId ">
  37. and `m_user_id` like concat('%', #{mUserId},'%')
  38. </if>
  39. <if test=" null != sendType ">
  40. and `send_type` = #{sendType}
  41. </if>
  42. <if test=" null != couponId ">
  43. and `coupon_id` = #{couponId}
  44. </if>
  45. <if test=" null != couponName ">
  46. and `coupon_name` like concat('%', #{couponName},'%')
  47. </if>
  48. <if test=" null != sendTime ">
  49. and `send_time` = #{sendTime}
  50. </if>
  51. <if test=" null != sendTimeStart and null!=sendTimeEnd ">
  52. and `send_time` >= #{sendTimeStart} and `send_time` &lt;= #{sendTimeEnd}
  53. </if>
  54. <if test=" null != sendAmount ">
  55. and `send_amount` = #{sendAmount}
  56. </if>
  57. <if test=" null != status ">
  58. and `status` = #{status}
  59. </if>
  60. <if test=" null != errorMsg ">
  61. and `error_msg` like concat('%', #{errorMsg},'%')
  62. </if>
  63. <if test=" null != tags ">
  64. and `tags` like concat('%', #{tags},'%')
  65. </if>
  66. <if test=" null != createTime ">
  67. and `create_time` = #{createTime}
  68. </if>
  69. <if test=" null != updateTime ">
  70. and `update_time` = #{updateTime}
  71. </if>
  72. <if test=" null != msgId ">
  73. and `msg_id` = #{msgId}
  74. </if>
  75. <if test=" null != ids ">
  76. and id in
  77. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  78. #{idItem}
  79. </foreach>
  80. </if>
  81. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  82. </sql>
  83. <select id="findList" parameterType="com.iformall.domain.po.WxCouponInject" resultMap="BaseResultMap">
  84. select <include refid="allColumns" /> from wx_coupon_inject
  85. <include refid="dynamicWhereConditions" />
  86. </select>
  87. </mapper>