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

123 строки
3.6 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.WxPayOrderMapper">
  4. <resultMap id="BaseResultMap" type="com.simple.domain.po.WxPayOrder">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  8. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  9. <result column="order_id" jdbcType="BIGINT" property="orderId" />
  10. <result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
  11. <result column="ip" jdbcType="VARCHAR" property="ip" />
  12. <result column="pay_amount" jdbcType="INTEGER" property="payAmount" />
  13. <result column="pay_time_start" jdbcType="TIMESTAMP" property="payTimeStart" />
  14. <result column="pay_time_end" jdbcType="TIMESTAMP" property="payTimeEnd" />
  15. <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
  16. <result column="pay_vendor" jdbcType="INTEGER" property="payVendor" />
  17. <result column="pay_order_no" jdbcType="VARCHAR" property="payOrderNo" />
  18. <result column="pay_order_status" jdbcType="INTEGER" property="payOrderStatus" />
  19. <result column="fail_reason" jdbcType="VARCHAR" property="failReason" />
  20. </resultMap>
  21. <sql id="allColumns">
  22. `id`,`tenant_id`,`create_time`,`update_time`,`order_id`,`c_user_id`,`ip`,`pay_amount`,`pay_time_start`,`pay_time_end`,`transaction_id`,`pay_vendor`,`pay_order_no`,`pay_order_status`,`fail_reason`
  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 ">
  30. and `tenant_id` like concat('%', #{tenantId},'%')
  31. </if>
  32. <if test=" null != createTime ">
  33. and `create_time` = #{createTime}
  34. </if>
  35. <if test=" null != updateTime ">
  36. and `update_time` = #{updateTime}
  37. </if>
  38. <if test=" null != orderId ">
  39. and `order_id` = #{orderId}
  40. </if>
  41. <if test=" null != cUserId ">
  42. and `c_user_id` = #{cUserId}
  43. </if>
  44. <if test=" null != ip ">
  45. and `ip` like concat('%', #{ip},'%')
  46. </if>
  47. <if test=" null != payAmount ">
  48. and `pay_amount` = #{payAmount}
  49. </if>
  50. <if test=" null != payTimeStart ">
  51. and `pay_time_start` = #{payTimeStart}
  52. </if>
  53. <if test=" null != payTimeEnd ">
  54. and `pay_time_end` = #{payTimeEnd}
  55. </if>
  56. <if test=" null != transactionId ">
  57. and `transaction_id` like concat('%', #{transactionId},'%')
  58. </if>
  59. <if test=" null != payVendor ">
  60. and `pay_vendor` = #{payVendor}
  61. </if>
  62. <if test=" null != payOrderNo ">
  63. and `pay_order_no` like concat('%', #{payOrderNo},'%')
  64. </if>
  65. <if test=" null != payOrderStatus ">
  66. and `pay_order_status` = #{payOrderStatus}
  67. </if>
  68. <if test=" null != failReason ">
  69. and `fail_reason` like concat('%', #{failReason},'%')
  70. </if>
  71. <if test=" null != ids ">
  72. and id in
  73. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  74. #{idItem}
  75. </foreach>
  76. </if>
  77. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  78. </sql>
  79. <select id="findList" parameterType="com.simple.domain.po.WxPayOrder" resultMap="BaseResultMap">
  80. select <include refid="allColumns" /> from wx_pay_order
  81. <include refid="dynamicWhereConditions" />
  82. </select>
  83. </mapper>