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

106 строки
3.2 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.WxMsgCallbackMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMsgCallback">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="batch_no" jdbcType="VARCHAR" property="batchNo" />
  8. <result column="phone" jdbcType="VARCHAR" property="phone" />
  9. <result column="begintime" jdbcType="INTEGER" property="begintime" />
  10. <result column="endtime" jdbcType="INTEGER" property="endtime" />
  11. <result column="status" jdbcType="INTEGER" property="status" />
  12. <result column="status_msg" jdbcType="VARCHAR" property="statusMsg" />
  13. <result column="sign" jdbcType="VARCHAR" property="sign" />
  14. <result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
  15. <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
  16. <result column="callback_id" jdbcType="BIGINT" property="callbackId" />
  17. <result column="msg_id" jdbcType="BIGINT" property="msgId" />
  18. </resultMap>
  19. <sql id="allColumns">
  20. `id`,`tenant_id`,`batch_no`,`phone`,`begintime`,`endtime`,`status`,`status_msg`,`sign`,`createtime`,`updatetime`,`msg_id`,`callback_id`
  21. </sql>
  22. <sql id="dynamicWhereConditions">
  23. where 1 = 1
  24. <if test=" null != id ">
  25. and `id` = #{id}
  26. </if>
  27. <if test=" null != tenantId ">
  28. and `tenant_id` = #{tenantId}
  29. </if>
  30. <if test=" null != batchNo ">
  31. and `batch_no` like concat('%', #{batchNo},'%')
  32. </if>
  33. <if test=" null != phone and phone!=''">
  34. and `phone` like concat('%', #{phone},'%')
  35. </if>
  36. <if test=" null != begintime ">
  37. and `begintime` = #{begintime}
  38. </if>
  39. <if test=" null != endtime ">
  40. and `endtime` = #{endtime}
  41. </if>
  42. <if test=" null != status ">
  43. and `status` = #{status}
  44. </if>
  45. <if test=" null != statusMsg ">
  46. and `status_msg` like concat('%', #{statusMsg},'%')
  47. </if>
  48. <if test=" null != sign ">
  49. and `sign` like concat('%', #{sign},'%')
  50. </if>
  51. <if test=" null != createtime ">
  52. and `createtime` = #{createtime}
  53. </if>
  54. <if test=" null != ids ">
  55. and id in
  56. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  57. #{idItem}
  58. </foreach>
  59. </if>
  60. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  61. </sql>
  62. <select id="findList" parameterType="com.iformall.domain.po.WxMsgCallback" resultMap="BaseResultMap">
  63. select <include refid="allColumns" /> from wx_msg_callback
  64. <include refid="dynamicWhereConditions" />
  65. </select>
  66. <select id="queryCallbackByBatchNoAndPhone" parameterType="com.iformall.domain.po.WxMsgCallback" resultMap="BaseResultMap">
  67. select * from wx_msg_callback where batch_no=#{batchNo} and phone=#{phone}
  68. </select>
  69. <select id="queryMsgSendTotal" parameterType="hashmap" resultType="int">
  70. select count(*) from wx_msg_callback where msg_id=#{msgId} and status=#{status}
  71. </select>
  72. </mapper>