Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

107 rader
3.3 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. <result column="business_id" jdbcType="BIGINT" property="businessId"/>
  19. </resultMap>
  20. <sql id="allColumns">
  21. `id`,`tenant_id`,`batch_no`,`phone`,`begintime`,`endtime`,`status`,`status_msg`,`sign`,`createtime`,`updatetime`,`msg_id`,`callback_id`,`business_id`
  22. </sql>
  23. <sql id="dynamicWhereConditions">
  24. where 1 = 1
  25. <if test=" null != id ">
  26. and `id` = #{id}
  27. </if>
  28. <if test=" null != tenantId ">
  29. and `tenant_id` = #{tenantId}
  30. </if>
  31. <if test=" null != batchNo ">
  32. and `batch_no` like concat('%', #{batchNo},'%')
  33. </if>
  34. <if test=" null != phone and phone!=''">
  35. and `phone` like concat('%', #{phone},'%')
  36. </if>
  37. <if test=" null != begintime ">
  38. and `begintime` = #{begintime}
  39. </if>
  40. <if test=" null != endtime ">
  41. and `endtime` = #{endtime}
  42. </if>
  43. <if test=" null != status ">
  44. and `status` = #{status}
  45. </if>
  46. <if test=" null != statusMsg ">
  47. and `status_msg` like concat('%', #{statusMsg},'%')
  48. </if>
  49. <if test=" null != sign ">
  50. and `sign` like concat('%', #{sign},'%')
  51. </if>
  52. <if test=" null != createtime ">
  53. and `createtime` = #{createtime}
  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.WxMsgCallback" resultMap="BaseResultMap">
  64. select <include refid="allColumns" /> from wx_msg_callback
  65. <include refid="dynamicWhereConditions" />
  66. </select>
  67. <select id="queryCallbackByBatchNoAndPhone" parameterType="com.iformall.domain.po.WxMsgCallback" resultMap="BaseResultMap">
  68. select * from wx_msg_callback where batch_no=#{batchNo} and phone=#{phone}
  69. </select>
  70. <select id="queryMsgSendTotal" parameterType="hashmap" resultType="int">
  71. select count(*) from wx_msg_callback where msg_id=#{msgId} and status=#{status}
  72. </select>
  73. </mapper>