后台服务
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

137 řádky
4.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.WxRefundOrderMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxRefundOrder">
  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="create_time" jdbcType="TIMESTAMP" property="createTime" />
  9. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  10. <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" />
  11. <result column="order_id" jdbcType="BIGINT" property="orderId" />
  12. <result column="pay_order_no" jdbcType="VARCHAR" property="payOrderNo" />
  13. <result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
  14. <result column="total_fee" jdbcType="INTEGER" property="totalFee" />
  15. <result column="refund_fee" jdbcType="INTEGER" property="refundFee" />
  16. <result column="refund_time_start" jdbcType="TIMESTAMP" property="refundTimeStart" />
  17. <result column="refund_time_end" jdbcType="TIMESTAMP" property="refundTimeEnd" />
  18. <result column="refund_vendor" jdbcType="INTEGER" property="refundVendor" />
  19. <result column="tt_pay_way" jdbcType="INTEGER" property="ttPayWay"/>
  20. <result column="refund_order_status" jdbcType="INTEGER" property="refundOrderStatus" />
  21. <result column="refund_id" jdbcType="VARCHAR" property="refundId" />
  22. <result column="fail_reason" jdbcType="VARCHAR" property="failReason" />
  23. </resultMap>
  24. <sql id="allColumns">
  25. `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`transaction_id`,`order_id`,`pay_order_no`,`c_user_id`,`total_fee`,`refund_fee`,`refund_time_start`,`refund_time_end`,`refund_vendor`,`tt_pay_way`,`refund_order_status`,`refund_id`,`fail_reason`
  26. </sql>
  27. <sql id="dynamicWhereConditions">
  28. where 1 = 1
  29. <if test=" null != id ">
  30. and `id` = #{id}
  31. </if>
  32. <if test=" null != tenantId and '' != tenantId">
  33. and `tenant_id` = #{tenantId}
  34. </if>
  35. <if test=" null != parentTenantId and '' != parentTenantId">
  36. and `parent_tenant_id` = #{parentTenantId}
  37. </if>
  38. <if test=" null != createTime ">
  39. and `create_time` = #{createTime}
  40. </if>
  41. <if test=" null != updateTime ">
  42. and `update_time` = #{updateTime}
  43. </if>
  44. <if test=" null != transactionId ">
  45. and `transaction_id` = #{transactionId}
  46. </if>
  47. <if test=" null != orderId ">
  48. and `order_id` = #{orderId}
  49. </if>
  50. <if test=" null != payOrderNo ">
  51. and `pay_order_no` like concat('%', #{payOrderNo},'%')
  52. </if>
  53. <if test=" null != cUserId ">
  54. and `c_user_id` = #{cUserId}
  55. </if>
  56. <if test=" null != totalFee ">
  57. and `total_fee` = #{totalFee}
  58. </if>
  59. <if test=" null != refundFee ">
  60. and `refund_fee` = #{refundFee}
  61. </if>
  62. <if test=" null != refundTimeStart ">
  63. and `refund_time_start` = #{refundTimeStart}
  64. </if>
  65. <if test=" null != refundTimeEnd ">
  66. and `refund_time_end` = #{refundTimeEnd}
  67. </if>
  68. <if test=" null != refundVendor ">
  69. and `refund_vendor` = #{refundVendor}
  70. </if>
  71. <if test=" null != refundOrderStatus ">
  72. and `refund_order_status` = #{refundOrderStatus}
  73. </if>
  74. <if test=" null != refundId ">
  75. and `refund_id` like concat('%', #{refundId},'%')
  76. </if>
  77. <if test=" null != failReason ">
  78. and `fail_reason` like concat('%', #{failReason},'%')
  79. </if>
  80. <if test=" null != notStatus ">
  81. and `refund_order_status` != #{notStatus}
  82. </if>
  83. <if test=" null != ids ">
  84. and id in
  85. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  86. #{idItem}
  87. </foreach>
  88. </if>
  89. and `refund_id` is not null
  90. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  91. </sql>
  92. <select id="findList" parameterType="com.iformall.domain.po.WxRefundOrder" resultMap="BaseResultMap">
  93. select
  94. <include refid="allColumns"/>
  95. from wx_refund_order
  96. <include refid="dynamicWhereConditions" />
  97. </select>
  98. </mapper>