KwpSettlementWalletMapper.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.sckw.payment.dao.KwpSettlementWalletMapper">
  4. <resultMap id="BaseResultMap" type="com.sckw.payment.model.KwpSettlementWallet">
  5. <!--@mbg.generated-->
  6. <!--@Table kwp_settlement_wallet-->
  7. <id column="id" jdbcType="BIGINT" property="id"/>
  8. <result column="ent_id" jdbcType="BIGINT" property="entId"/>
  9. <result column="settlement_id" jdbcType="BIGINT" property="settlementId"/>
  10. <result column="order_type" jdbcType="INTEGER" property="orderType"/>
  11. <result column="channel" jdbcType="VARCHAR" property="channel"/>
  12. <result column="pay_time" jdbcType="TIMESTAMP" property="payTime"/>
  13. <result column="pay_price" jdbcType="DECIMAL" property="payPrice"/>
  14. <result column="topay_price" jdbcType="DECIMAL" property="topayPrice"/>
  15. <result column="type" jdbcType="INTEGER" property="type"/>
  16. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  17. <result column="status" jdbcType="INTEGER" property="status"/>
  18. <result column="create_by" jdbcType="BIGINT" property="createBy"/>
  19. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  20. <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
  21. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  22. <result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
  23. </resultMap>
  24. <sql id="Base_Column_List">
  25. id,
  26. ent_id,
  27. settlement_id,
  28. order_type,
  29. channel,
  30. pay_time,
  31. pay_price,
  32. topay_price,
  33. `type`,
  34. remark,
  35. `status`,
  36. create_by,
  37. create_time,
  38. update_by,
  39. update_time,
  40. del_flag
  41. </sql>
  42. <sql id="Join_Column_List">
  43. w.id,
  44. w.ent_id,
  45. w.settlement_id,
  46. w.order_type,
  47. w.channel,
  48. w.pay_time,
  49. w.pay_price,
  50. w.topay_price,
  51. w.`type`,
  52. w.remark,
  53. w.`status`,
  54. w.create_by,
  55. w.create_time,
  56. w.update_by,
  57. w.update_time,
  58. w.del_flag
  59. </sql>
  60. <select id="pageListLogisticsPayment" resultType="com.sckw.payment.model.dto.SettlementWalletDto">
  61. select
  62. <include refid="Join_Column_List"/>
  63. from kwp_settlement_wallet w
  64. <where>
  65. w.del_flag = 0
  66. <if test="settlementWalletReq.id != null and settlementWalletReq.id != ''">
  67. and w.settlement_id = #{settlementWalletReq.id,jdbcType=INTEGER}
  68. </if>
  69. <if test="settlementWalletReq.orderType != null">
  70. and w.order_type = #{settlementWalletReq.orderType,jdbcType=INTEGER}
  71. </if>
  72. <if test="settlementWalletReq.payType != null">
  73. and w.type = #{settlementWalletReq.payType,jdbcType=INTEGER}
  74. </if>
  75. </where>
  76. order by w.update_time desc
  77. </select>
  78. <select id="detailLogisticsPayment" resultType="com.sckw.payment.model.dto.SettlementWalletDto">
  79. select
  80. <include refid="Base_Column_List"/>
  81. from kwp_settlement_wallet
  82. where id = #{id,jdbcType=BIGINT}
  83. </select>
  84. <select id="confirmLogisticsPayment" resultType="java.lang.Integer">
  85. insert into kwp_settlement_wallet ( <include refid="Base_Column_List"/>) value ();
  86. </select>
  87. <select id="pageList" resultType="com.sckw.payment.model.dto.SettlementWalletDto">
  88. select ksw.id,
  89. ksw.ent_id,
  90. ksw.settlement_id,
  91. ksw.order_type,
  92. ksw.channel,
  93. ksw.order_type,
  94. ksw.pay_time,
  95. ksw.pay_price,
  96. ksw.topay_price,
  97. ksw.type,
  98. ksw.remark,
  99. ksw.create_by,
  100. ksw.create_time,
  101. ksw.update_by,
  102. ksw.update_time
  103. from kwp_settlement_wallet ksw
  104. <where>
  105. ksw.del_flag = 0
  106. <if test="walletReq.id != null and walletReq.id != ''">
  107. and ksw.settlement_id = #{walletReq.id,jdbcType=INTEGER}
  108. </if>
  109. <if test="walletReq.orderType != null">
  110. and ksw.order_type = #{walletReq.orderType,jdbcType=INTEGER}
  111. </if>
  112. <if test="walletReq.payType != null">
  113. and ksw.type = #{walletReq.payType,jdbcType=INTEGER}
  114. </if>
  115. </where>
  116. </select>
  117. </mapper>