后台服务
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

116 satır
3.8 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="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
  8. <result column="batch_no" jdbcType="VARCHAR" property="batchNo" />
  9. <result column="phone" jdbcType="VARCHAR" property="phone" />
  10. <result column="begintime" jdbcType="INTEGER" property="begintime" />
  11. <result column="endtime" jdbcType="INTEGER" property="endtime" />
  12. <result column="status" jdbcType="INTEGER" property="status" />
  13. <result column="status_msg" jdbcType="VARCHAR" property="statusMsg" />
  14. <result column="sign" jdbcType="VARCHAR" property="sign" />
  15. <result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
  16. <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
  17. <result column="callback_id" jdbcType="BIGINT" property="callbackId" />
  18. <result column="msg_id" jdbcType="BIGINT" property="msgId" />
  19. <result column="business_id" jdbcType="BIGINT" property="businessId"/>
  20. </resultMap>
  21. <sql id="allColumns">
  22. `id`,`tenant_id`,`parent_tenant_id`,`batch_no`,`phone`,`begintime`,`endtime`,`status`,`status_msg`,`sign`,`createtime`,`updatetime`,`msg_id`,`callback_id`,`business_id`
  23. </sql>
  24. <sql id="dynamicWhereConditions">
  25. where 1 = 1
  26. <if test=" null != id ">
  27. and `id` = #{id}
  28. </if>
  29. <if test=" null != tenantId and '' != tenantId">
  30. and `tenant_id` = #{tenantId}
  31. </if>
  32. <if test=" null != parentTenantId and '' != parentTenantId">
  33. and `parent_tenant_id` = #{parentTenantId}
  34. </if>
  35. <if test=" null != batchNo ">
  36. and `batch_no` like concat('%', #{batchNo},'%')
  37. </if>
  38. <if test=" null != phone and phone!=''">
  39. and `phone` like concat('%', #{phone},'%')
  40. </if>
  41. <if test=" null != begintime ">
  42. and `begintime` = #{begintime}
  43. </if>
  44. <if test=" null != endtime ">
  45. and `endtime` = #{endtime}
  46. </if>
  47. <if test=" null != status ">
  48. and `status` = #{status}
  49. </if>
  50. <if test=" null != statusMsg ">
  51. and `status_msg` like concat('%', #{statusMsg},'%')
  52. </if>
  53. <if test=" null != sign ">
  54. and `sign` like concat('%', #{sign},'%')
  55. </if>
  56. <if test=" null != createtime ">
  57. and `createtime` = #{createtime}
  58. </if>
  59. <if test="createStartTime != null">
  60. AND `createtime` &gt;= #{createStartTime}
  61. </if>
  62. <if test=" null != ids ">
  63. and id in
  64. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  65. #{idItem}
  66. </foreach>
  67. </if>
  68. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  69. </sql>
  70. <select id="findList" parameterType="com.iformall.domain.po.WxMsgCallback" resultMap="BaseResultMap">
  71. select
  72. <include refid="allColumns"/>
  73. from wx_msg_callback
  74. <include refid="dynamicWhereConditions" />
  75. </select>
  76. <select id="queryCallbackByBatchNoAndPhone" parameterType="com.iformall.domain.po.WxMsgCallback"
  77. resultMap="BaseResultMap">
  78. select * from wx_msg_callback where batch_no=#{batchNo} and phone=#{phone}
  79. </select>
  80. <select id="queryMsgSendTotal" parameterType="hashmap" resultType="int">
  81. select count(*) from wx_msg_callback where msg_id=#{msgId} and status=#{status}
  82. </select>
  83. <update id="updateByBatchNo" parameterType="com.iformall.domain.po.WxMsgCallback">
  84. update wx_msg_callback set status=#{status},status_msg=#{statusMsg} where `batch_no` = #{batchNo}
  85. </update>
  86. </mapper>