后台服务
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.

WxMsgMapper.xml 4.5 KiB

2 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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.WxMsgMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.msg.WxMsg">
  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="model_id" jdbcType="BIGINT" property="modelId" />
  9. <result column="msg" jdbcType="VARCHAR" property="msg" />
  10. <result column="sendtime" jdbcType="TIMESTAMP" property="sendtime" />
  11. <result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
  12. <result column="expect_send_number" jdbcType="VARCHAR" property="expectSendNumber" />
  13. <result column="success_number" jdbcType="VARCHAR" property="successNumber" />
  14. <result column="error_number" jdbcType="VARCHAR" property="errorNumber" />
  15. <result column="return_result" jdbcType="VARCHAR" property="returnResult" />
  16. <result column="phones" jdbcType="VARCHAR" property="phones" />
  17. <result column="signature" jdbcType="VARCHAR" property="signature" />
  18. <result column="isright" jdbcType="INTEGER" property="isright" />
  19. <result column="name" jdbcType="VARCHAR" property="name" />
  20. <result column="sendstatus" jdbcType="INTEGER" property="sendstatus" />
  21. <result column="excelpath" jdbcType="VARCHAR" property="excelpath" />
  22. <result column="label" jdbcType="VARCHAR" property="label" />
  23. <result column="tags" jdbcType="VARCHAR" property="tags" />
  24. <result column="status" jdbcType="INTEGER" property="status" />
  25. <result column="way" jdbcType="INTEGER" property="way" />
  26. <result column="coupon_inject_id" jdbcType="BIGINT" property="couponInjectId" />
  27. </resultMap>
  28. <sql id="allColumns">
  29. `id`,`tenant_id`,`parent_tenant_id`,`model_id`,`msg`,`sendtime`,`createtime`,`expect_send_number`,`success_number`,`error_number`,`return_result`,`phones`,`signature`,`isright`,`name`,`sendstatus`,`excelpath`,`label`,`tags`,`status`,`way`,`coupon_inject_id`
  30. </sql>
  31. <sql id="dynamicWhereConditions">
  32. where 1 = 1
  33. <if test=" null != id ">
  34. and `id` = #{id}
  35. </if>
  36. <if test=" null != tenantId and '' != tenantId">
  37. and `tenant_id` = #{tenantId}
  38. </if>
  39. <if test=" null != parentTenantId and '' != parentTenantId">
  40. and `parent_tenant_id` = #{parentTenantId}
  41. </if>
  42. <if test=" null != modelId ">
  43. and `model_id` = #{modelId}
  44. </if>
  45. <if test=" null != msg ">
  46. and `msg` like concat('%', #{msg},'%')
  47. </if>
  48. <if test=" null != sendtime ">
  49. and `sendtime` = #{sendtime}
  50. </if>
  51. <if test=" null != createtime ">
  52. and `createtime` = #{createtime}
  53. </if>
  54. <if test=" null != expectSendNumber ">
  55. and `expect_send_number` like concat('%', #{expectSendNumber},'%')
  56. </if>
  57. <if test=" null != successNumber ">
  58. and `success_number` like concat('%', #{successNumber},'%')
  59. </if>
  60. <if test=" null != errorNumber ">
  61. and `error_number` like concat('%', #{errorNumber},'%')
  62. </if>
  63. <if test=" null != returnResult ">
  64. and `return_result` like concat('%', #{returnResult},'%')
  65. </if>
  66. <if test=" null != phones ">
  67. and `phones` like concat('%', #{phones},'%')
  68. </if>
  69. <if test=" null != signature ">
  70. and `signature` like concat('%', #{signature},'%')
  71. </if>
  72. <if test=" null != isright ">
  73. and `isright` = #{isright}
  74. </if>
  75. <if test=" null != name ">
  76. and `name` like concat('%', #{name},'%')
  77. </if>
  78. <if test=" null != sendstatus ">
  79. and `sendstatus` = #{sendstatus}
  80. </if>
  81. <if test=" null != status ">
  82. and `status` = #{status}
  83. </if>
  84. <if test=" null != way ">
  85. and `way` = #{way}
  86. </if>
  87. <if test=" null != couponInjectId ">
  88. and `coupon_inject_id` = #{couponInjectId}
  89. </if>
  90. <if test=" null != ids ">
  91. and id in
  92. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  93. #{idItem}
  94. </foreach>
  95. </if>
  96. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  97. </sql>
  98. <select id="findList" parameterType="com.iformall.domain.po.msg.WxMsg" resultMap="BaseResultMap">
  99. select
  100. <include refid="allColumns"/>
  101. from wx_msg
  102. <include refid="dynamicWhereConditions" />
  103. </select>
  104. </mapper>