生成运营商日报表

This commit is contained in:
Guoqs
2025-02-20 15:31:32 +08:00
parent df848f0eb0
commit 04bd04186c
7 changed files with 122 additions and 135 deletions

View File

@@ -11,6 +11,7 @@
<result column="clearing_time" jdbcType="TIMESTAMP" property="clearingTime" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="order_source" jdbcType="VARCHAR" property="orderSource" />
<result column="settle_amount" jdbcType="DECIMAL" property="settleAmount" />
<result column="receivable_amount" jdbcType="DECIMAL" property="receivableAmount" />
<result column="should_clearing_amount" jdbcType="DECIMAL" property="shouldClearingAmount" />
<result column="actual_clearing_amount" jdbcType="DECIMAL" property="actualClearingAmount" />
@@ -26,8 +27,9 @@
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, bill_status, trade_date, clearing_bill_code, clearing_time, merchant_id, order_source,
receivable_amount, should_clearing_amount, actual_clearing_amount, fee_amount, withdrawable_amount,
withdraw_code, create_by, create_time, update_by, update_time, del_flag
settle_amount, receivable_amount, should_clearing_amount, actual_clearing_amount,
fee_amount, withdrawable_amount, withdraw_code, create_by, create_time, update_by,
update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -41,23 +43,6 @@
delete from clearing_bill_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingBillInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_bill_info (bill_status, trade_date, clearing_bill_code,
clearing_time, merchant_id, order_source,
receivable_amount, should_clearing_amount,
actual_clearing_amount, fee_amount, withdrawable_amount,
withdraw_code, create_by, create_time,
update_by, update_time, del_flag
)
values (#{billStatus,jdbcType=VARCHAR}, #{tradeDate,jdbcType=VARCHAR}, #{clearingBillCode,jdbcType=VARCHAR},
#{clearingTime,jdbcType=TIMESTAMP}, #{merchantId,jdbcType=VARCHAR}, #{orderSource,jdbcType=VARCHAR},
#{receivableAmount,jdbcType=DECIMAL}, #{shouldClearingAmount,jdbcType=DECIMAL},
#{actualClearingAmount,jdbcType=DECIMAL}, #{feeAmount,jdbcType=DECIMAL}, #{withdrawableAmount,jdbcType=DECIMAL},
#{withdrawCode,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingBillInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_bill_info
@@ -80,6 +65,9 @@
<if test="orderSource != null">
order_source,
</if>
<if test="settleAmount != null">
settle_amount,
</if>
<if test="receivableAmount != null">
receivable_amount,
</if>
@@ -133,6 +121,9 @@
<if test="orderSource != null">
#{orderSource,jdbcType=VARCHAR},
</if>
<if test="settleAmount != null">
#{settleAmount,jdbcType=DECIMAL},
</if>
<if test="receivableAmount != null">
#{receivableAmount,jdbcType=DECIMAL},
</if>
@@ -190,6 +181,9 @@
<if test="orderSource != null">
order_source = #{orderSource,jdbcType=VARCHAR},
</if>
<if test="settleAmount != null">
settle_amount = #{settleAmount,jdbcType=DECIMAL},
</if>
<if test="receivableAmount != null">
receivable_amount = #{receivableAmount,jdbcType=DECIMAL},
</if>
@@ -226,28 +220,6 @@
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.ClearingBillInfo">
<!--@mbg.generated-->
update clearing_bill_info
set bill_status = #{billStatus,jdbcType=VARCHAR},
trade_date = #{tradeDate,jdbcType=VARCHAR},
clearing_bill_code = #{clearingBillCode,jdbcType=VARCHAR},
clearing_time = #{clearingTime,jdbcType=TIMESTAMP},
merchant_id = #{merchantId,jdbcType=VARCHAR},
order_source = #{orderSource,jdbcType=VARCHAR},
receivable_amount = #{receivableAmount,jdbcType=DECIMAL},
should_clearing_amount = #{shouldClearingAmount,jdbcType=DECIMAL},
actual_clearing_amount = #{actualClearingAmount,jdbcType=DECIMAL},
fee_amount = #{feeAmount,jdbcType=DECIMAL},
withdrawable_amount = #{withdrawableAmount,jdbcType=DECIMAL},
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update clearing_bill_info
@@ -282,6 +254,11 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.orderSource,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="settle_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.settleAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="receivable_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.receivableAmount,jdbcType=DECIMAL}
@@ -389,6 +366,13 @@
</if>
</foreach>
</trim>
<trim prefix="settle_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.settleAmount != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.settleAmount,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="receivable_amount = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.receivableAmount != null">
@@ -476,18 +460,19 @@
<!--@mbg.generated-->
insert into clearing_bill_info
(bill_status, trade_date, clearing_bill_code, clearing_time, merchant_id, order_source,
receivable_amount, should_clearing_amount, actual_clearing_amount, fee_amount,
withdrawable_amount, withdraw_code, create_by, create_time, update_by, update_time,
del_flag)
settle_amount, receivable_amount, should_clearing_amount, actual_clearing_amount,
fee_amount, withdrawable_amount, withdraw_code, create_by, create_time, update_by,
update_time, del_flag)
values
<foreach collection="list" item="item" separator=",">
(#{item.billStatus,jdbcType=VARCHAR}, #{item.tradeDate,jdbcType=VARCHAR}, #{item.clearingBillCode,jdbcType=VARCHAR},
#{item.clearingTime,jdbcType=TIMESTAMP}, #{item.merchantId,jdbcType=VARCHAR}, #{item.orderSource,jdbcType=VARCHAR},
#{item.receivableAmount,jdbcType=DECIMAL}, #{item.shouldClearingAmount,jdbcType=DECIMAL},
#{item.actualClearingAmount,jdbcType=DECIMAL}, #{item.feeAmount,jdbcType=DECIMAL},
#{item.withdrawableAmount,jdbcType=DECIMAL}, #{item.withdrawCode,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR})
#{item.settleAmount,jdbcType=DECIMAL}, #{item.receivableAmount,jdbcType=DECIMAL},
#{item.shouldClearingAmount,jdbcType=DECIMAL}, #{item.actualClearingAmount,jdbcType=DECIMAL},
#{item.feeAmount,jdbcType=DECIMAL}, #{item.withdrawableAmount,jdbcType=DECIMAL},
#{item.withdrawCode,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR}
)
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingBillInfo" useGeneratedKeys="true">
@@ -503,6 +488,7 @@
clearing_time,
merchant_id,
order_source,
settle_amount,
receivable_amount,
should_clearing_amount,
actual_clearing_amount,
@@ -526,6 +512,7 @@
#{clearingTime,jdbcType=TIMESTAMP},
#{merchantId,jdbcType=VARCHAR},
#{orderSource,jdbcType=VARCHAR},
#{settleAmount,jdbcType=DECIMAL},
#{receivableAmount,jdbcType=DECIMAL},
#{shouldClearingAmount,jdbcType=DECIMAL},
#{actualClearingAmount,jdbcType=DECIMAL},
@@ -549,6 +536,7 @@
clearing_time = #{clearingTime,jdbcType=TIMESTAMP},
merchant_id = #{merchantId,jdbcType=VARCHAR},
order_source = #{orderSource,jdbcType=VARCHAR},
settle_amount = #{settleAmount,jdbcType=DECIMAL},
receivable_amount = #{receivableAmount,jdbcType=DECIMAL},
should_clearing_amount = #{shouldClearingAmount,jdbcType=DECIMAL},
actual_clearing_amount = #{actualClearingAmount,jdbcType=DECIMAL},
@@ -587,6 +575,9 @@
<if test="orderSource != null">
order_source,
</if>
<if test="settleAmount != null">
settle_amount,
</if>
<if test="receivableAmount != null">
receivable_amount,
</if>
@@ -644,6 +635,9 @@
<if test="orderSource != null">
#{orderSource,jdbcType=VARCHAR},
</if>
<if test="settleAmount != null">
#{settleAmount,jdbcType=DECIMAL},
</if>
<if test="receivableAmount != null">
#{receivableAmount,jdbcType=DECIMAL},
</if>
@@ -701,6 +695,9 @@
<if test="orderSource != null">
order_source = #{orderSource,jdbcType=VARCHAR},
</if>
<if test="settleAmount != null">
settle_amount = #{settleAmount,jdbcType=DECIMAL},
</if>
<if test="receivableAmount != null">
receivable_amount = #{receivableAmount,jdbcType=DECIMAL},
</if>