Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

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