保存提现金额信息

This commit is contained in:
2023-09-22 15:25:21 +08:00
parent 098768249b
commit 6319856269
3 changed files with 116 additions and 8 deletions

View File

@@ -9,6 +9,9 @@
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
<result column="withdraw_code" jdbcType="VARCHAR" property="withdrawCode" />
<result column="withdraw_status" jdbcType="VARCHAR" property="withdrawStatus" />
<result column="withdraw_amt" jdbcType="DECIMAL" property="withdrawAmt" />
<result column="fee_amt" jdbcType="DECIMAL" property="feeAmt" />
<result column="credited_amt" jdbcType="DECIMAL" property="creditedAmt" />
<result column="application_time" jdbcType="TIMESTAMP" property="applicationTime" />
<result column="arrival_time" jdbcType="TIMESTAMP" property="arrivalTime" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
@@ -19,8 +22,9 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, merchant_id, order_no, withdraw_code, withdraw_status, application_time, arrival_time,
create_by, create_time, update_by, update_time, del_flag
id, merchant_id, order_no, withdraw_code, withdraw_status, withdraw_amt, fee_amt,
credited_amt, application_time, arrival_time, create_by, create_time, update_by,
update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -37,11 +41,13 @@
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_withdraw_info (merchant_id, order_no, withdraw_code,
withdraw_status, application_time, arrival_time,
withdraw_status, withdraw_amt, fee_amt,
credited_amt, application_time, arrival_time,
create_by, create_time, update_by,
update_time, del_flag)
values (#{merchantId,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, #{withdrawCode,jdbcType=VARCHAR},
#{withdrawStatus,jdbcType=VARCHAR}, #{applicationTime,jdbcType=TIMESTAMP}, #{arrivalTime,jdbcType=TIMESTAMP},
#{withdrawStatus,jdbcType=VARCHAR}, #{withdrawAmt,jdbcType=DECIMAL}, #{feeAmt,jdbcType=DECIMAL},
#{creditedAmt,jdbcType=DECIMAL}, #{applicationTime,jdbcType=TIMESTAMP}, #{arrivalTime,jdbcType=TIMESTAMP},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR})
</insert>
@@ -61,6 +67,15 @@
<if test="withdrawStatus != null">
withdraw_status,
</if>
<if test="withdrawAmt != null">
withdraw_amt,
</if>
<if test="feeAmt != null">
fee_amt,
</if>
<if test="creditedAmt != null">
credited_amt,
</if>
<if test="applicationTime != null">
application_time,
</if>
@@ -96,6 +111,15 @@
<if test="withdrawStatus != null">
#{withdrawStatus,jdbcType=VARCHAR},
</if>
<if test="withdrawAmt != null">
#{withdrawAmt,jdbcType=DECIMAL},
</if>
<if test="feeAmt != null">
#{feeAmt,jdbcType=DECIMAL},
</if>
<if test="creditedAmt != null">
#{creditedAmt,jdbcType=DECIMAL},
</if>
<if test="applicationTime != null">
#{applicationTime,jdbcType=TIMESTAMP},
</if>
@@ -135,6 +159,15 @@
<if test="withdrawStatus != null">
withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
</if>
<if test="withdrawAmt != null">
withdraw_amt = #{withdrawAmt,jdbcType=DECIMAL},
</if>
<if test="feeAmt != null">
fee_amt = #{feeAmt,jdbcType=DECIMAL},
</if>
<if test="creditedAmt != null">
credited_amt = #{creditedAmt,jdbcType=DECIMAL},
</if>
<if test="applicationTime != null">
application_time = #{applicationTime,jdbcType=TIMESTAMP},
</if>
@@ -166,6 +199,9 @@
order_no = #{orderNo,jdbcType=VARCHAR},
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
withdraw_amt = #{withdrawAmt,jdbcType=DECIMAL},
fee_amt = #{feeAmt,jdbcType=DECIMAL},
credited_amt = #{creditedAmt,jdbcType=DECIMAL},
application_time = #{applicationTime,jdbcType=TIMESTAMP},
arrival_time = #{arrivalTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
@@ -199,6 +235,21 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.withdrawStatus,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="withdraw_amt = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.withdrawAmt,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="fee_amt = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.feeAmt,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="credited_amt = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.creditedAmt,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="application_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.applicationTime,jdbcType=TIMESTAMP}
@@ -243,12 +294,14 @@
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_withdraw_info
(merchant_id, order_no, withdraw_code, withdraw_status, application_time, arrival_time,
create_by, create_time, update_by, update_time, del_flag)
(merchant_id, order_no, withdraw_code, withdraw_status, withdraw_amt, fee_amt, credited_amt,
application_time, arrival_time, create_by, create_time, update_by, update_time,
del_flag)
values
<foreach collection="list" item="item" separator=",">
(#{item.merchantId,jdbcType=VARCHAR}, #{item.orderNo,jdbcType=VARCHAR}, #{item.withdrawCode,jdbcType=VARCHAR},
#{item.withdrawStatus,jdbcType=VARCHAR}, #{item.applicationTime,jdbcType=TIMESTAMP},
#{item.withdrawStatus,jdbcType=VARCHAR}, #{item.withdrawAmt,jdbcType=DECIMAL},
#{item.feeAmt,jdbcType=DECIMAL}, #{item.creditedAmt,jdbcType=DECIMAL}, #{item.applicationTime,jdbcType=TIMESTAMP},
#{item.arrivalTime,jdbcType=TIMESTAMP}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR}
)
@@ -265,6 +318,9 @@
order_no,
withdraw_code,
withdraw_status,
withdraw_amt,
fee_amt,
credited_amt,
application_time,
arrival_time,
create_by,
@@ -282,6 +338,9 @@
#{orderNo,jdbcType=VARCHAR},
#{withdrawCode,jdbcType=VARCHAR},
#{withdrawStatus,jdbcType=VARCHAR},
#{withdrawAmt,jdbcType=DECIMAL},
#{feeAmt,jdbcType=DECIMAL},
#{creditedAmt,jdbcType=DECIMAL},
#{applicationTime,jdbcType=TIMESTAMP},
#{arrivalTime,jdbcType=TIMESTAMP},
#{createBy,jdbcType=VARCHAR},
@@ -299,6 +358,9 @@
order_no = #{orderNo,jdbcType=VARCHAR},
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
withdraw_amt = #{withdrawAmt,jdbcType=DECIMAL},
fee_amt = #{feeAmt,jdbcType=DECIMAL},
credited_amt = #{creditedAmt,jdbcType=DECIMAL},
application_time = #{applicationTime,jdbcType=TIMESTAMP},
arrival_time = #{arrivalTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
@@ -327,6 +389,15 @@
<if test="withdrawStatus != null">
withdraw_status,
</if>
<if test="withdrawAmt != null">
withdraw_amt,
</if>
<if test="feeAmt != null">
fee_amt,
</if>
<if test="creditedAmt != null">
credited_amt,
</if>
<if test="applicationTime != null">
application_time,
</if>
@@ -366,6 +437,15 @@
<if test="withdrawStatus != null">
#{withdrawStatus,jdbcType=VARCHAR},
</if>
<if test="withdrawAmt != null">
#{withdrawAmt,jdbcType=DECIMAL},
</if>
<if test="feeAmt != null">
#{feeAmt,jdbcType=DECIMAL},
</if>
<if test="creditedAmt != null">
#{creditedAmt,jdbcType=DECIMAL},
</if>
<if test="applicationTime != null">
#{applicationTime,jdbcType=TIMESTAMP},
</if>
@@ -405,6 +485,15 @@
<if test="withdrawStatus != null">
withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
</if>
<if test="withdrawAmt != null">
withdraw_amt = #{withdrawAmt,jdbcType=DECIMAL},
</if>
<if test="feeAmt != null">
fee_amt = #{feeAmt,jdbcType=DECIMAL},
</if>
<if test="creditedAmt != null">
credited_amt = #{creditedAmt,jdbcType=DECIMAL},
</if>
<if test="applicationTime != null">
application_time = #{applicationTime,jdbcType=TIMESTAMP},
</if>
@@ -464,7 +553,7 @@
left join order_basic_info t5 on t5.order_code = t2.order_code and t5.del_flag = '0'
where t1.del_flag = '0'
and t2.order_code in
<foreach collection="orderCodeList" item="orderCode" open="(" separator="," close=")">
<foreach close=")" collection="orderCodeList" item="orderCode" open="(" separator=",">
#{orderCode,jdbcType=VARCHAR}
</foreach>
</select>