KwpSettlementWalletMapper.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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.type = #{settlementWalletReq.payType}
  66. </where>
  67. order by w.update_time desc
  68. </select>
  69. <select id="detailLogisticsPayment" resultType="com.sckw.payment.model.dto.SettlementWalletDto">
  70. select
  71. <include refid="Base_Column_List"/>
  72. from kwp_settlement_wallet
  73. where id = #{id,jdbcType=BIGINT}
  74. </select>
  75. <select id="confirmLogisticsPayment" resultType="java.lang.Integer">
  76. insert into kwp_settlement_wallet ( <include refid="Base_Column_List"/>) value ();
  77. </select>
  78. <select id="pageList" resultType="com.sckw.payment.model.dto.SettlementWalletDto">
  79. select ksw.id,
  80. ksw.ent_id,
  81. ksw.settlement_id,
  82. ksw.order_type,
  83. ksw.channel,
  84. ksw.order_type,
  85. ksw.pay_time,
  86. ksw.pay_price,
  87. ksw.topay_price,
  88. ksw.type,
  89. ksw.remark,
  90. ksw.create_by,
  91. ksw.create_time,
  92. ksw.update_by,
  93. ksw.update_time
  94. from kwp_settlement_wallet ksw
  95. <where>
  96. ksw.del_flag = 0
  97. <if test="walletReq.id != null and walletReq.id != ''">
  98. and ksw.settlement_id = #{walletReq.id,jdbcType=INTEGER}
  99. </if>
  100. <if test="walletReq.orderType != null">
  101. and ksw.order_type = #{walletReq.orderType,jdbcType=INTEGER}
  102. </if>
  103. <if test="walletReq.payType != null">
  104. and ksw.type = #{walletReq.payType,jdbcType=INTEGER}
  105. </if>
  106. </where>
  107. </select>
  108. </mapper>