订单日报添加结算金额字段

This commit is contained in:
Guoqs
2024-11-12 11:07:05 +08:00
parent a1f7b51aed
commit 93077b174e
4 changed files with 56 additions and 7 deletions

View File

@@ -16,6 +16,7 @@
<result column="service_amount" jdbcType="DECIMAL" property="serviceAmount" />
<result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
<result column="virtual_amount" jdbcType="DECIMAL" property="virtualAmount" />
<result column="settle_amount" jdbcType="DECIMAL" property="settleAmount" />
<result column="trade_date" jdbcType="VARCHAR" property="tradeDate" />
<result column="trade_amount" jdbcType="DECIMAL" property="tradeAmount" />
<result column="trade_fee" jdbcType="DECIMAL" property="tradeFee" />
@@ -26,7 +27,7 @@
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, trade_date,
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, settle_amount, trade_date,
trade_amount, trade_fee, create_time, update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@@ -46,13 +47,14 @@
insert into settle_order_report (settle_code, merchant_id, station_id,
order_codes, use_electricity, charge_num,
charge_time, electricity_amount, service_amount,
total_amount, virtual_amount, trade_date,
total_amount, virtual_amount, settle_amount, trade_date,
trade_amount, trade_fee, create_time,
update_time, del_flag)
values (#{settleCode,jdbcType=VARCHAR}, #{merchantId,jdbcType=VARCHAR}, #{stationId,jdbcType=VARCHAR},
#{orderCodes,jdbcType=LONGVARCHAR}, #{useElectricity,jdbcType=DECIMAL}, #{chargeNum,jdbcType=VARCHAR},
#{chargeTime,jdbcType=VARCHAR}, #{electricityAmount,jdbcType=DECIMAL}, #{serviceAmount,jdbcType=DECIMAL},
#{totalAmount,jdbcType=DECIMAL}, #{virtualAmount,jdbcType=DECIMAL}, #{tradeDate,jdbcType=VARCHAR},
#{totalAmount,jdbcType=DECIMAL}, #{virtualAmount,jdbcType=DECIMAL}, #{settleAmount,jdbcType=DECIMAL},
#{tradeDate,jdbcType=VARCHAR},
#{tradeAmount,jdbcType=DECIMAL}, #{tradeFee,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR})
</insert>
@@ -93,6 +95,9 @@
<if test="virtualAmount != null">
virtual_amount,
</if>
<if test="settleCode != null">
settle_amount,
</if>
<if test="tradeDate != null">
trade_date,
</if>
@@ -146,6 +151,9 @@
<if test="virtualAmount != null">
#{virtualAmount,jdbcType=DECIMAL},
</if>
<if test="settleCode != null">
#{settleAmount,jdbcType=DECIMAL},
</if>
<if test="tradeDate != null">
#{tradeDate,jdbcType=VARCHAR},
</if>
@@ -203,6 +211,9 @@
<if test="virtualAmount != null">
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
</if>
<if test="settleCode != null">
settle_amount = #{settleAmount,jdbcType=DECIMAL},
</if>
<if test="tradeDate != null">
trade_date = #{tradeDate,jdbcType=VARCHAR},
</if>
@@ -238,6 +249,7 @@
service_amount = #{serviceAmount,jdbcType=DECIMAL},
total_amount = #{totalAmount,jdbcType=DECIMAL},
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
settle_amount = #{settleAmount,jdbcType=DECIMAL},
trade_date = #{tradeDate,jdbcType=VARCHAR},
trade_amount = #{tradeAmount,jdbcType=DECIMAL},
trade_fee = #{tradeFee,jdbcType=DECIMAL},
@@ -305,6 +317,11 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.virtualAmount,jdbcType=DECIMAL}
</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="trade_date = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.tradeDate,jdbcType=VARCHAR}
@@ -345,7 +362,7 @@
<!--@mbg.generated-->
insert into settle_order_report
(settle_code, merchant_id, station_id, order_codes, use_electricity, charge_num,
charge_time, electricity_amount, service_amount, total_amount, virtual_amount,
charge_time, electricity_amount, service_amount, total_amount, virtual_amount, settle_amount,
trade_date, trade_amount, trade_fee, create_time, update_time, del_flag)
values
<foreach collection="list" item="item" separator=",">
@@ -353,7 +370,7 @@
#{item.orderCodes,jdbcType=LONGVARCHAR}, #{item.useElectricity,jdbcType=DECIMAL},
#{item.chargeNum,jdbcType=VARCHAR}, #{item.chargeTime,jdbcType=VARCHAR}, #{item.electricityAmount,jdbcType=DECIMAL},
#{item.serviceAmount,jdbcType=DECIMAL}, #{item.totalAmount,jdbcType=DECIMAL}, #{item.virtualAmount,jdbcType=DECIMAL},
#{item.tradeDate,jdbcType=VARCHAR}, #{item.tradeAmount,jdbcType=DECIMAL}, #{item.tradeFee,jdbcType=DECIMAL},
#{item.settleAmount,jdbcType=DECIMAL}, #{item.tradeDate,jdbcType=VARCHAR}, #{item.tradeAmount,jdbcType=DECIMAL}, #{item.tradeFee,jdbcType=DECIMAL},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR}
)
</foreach>
@@ -376,6 +393,7 @@
service_amount,
total_amount,
virtual_amount,
settle_amount,
trade_date,
trade_amount,
trade_fee,
@@ -399,6 +417,7 @@
#{serviceAmount,jdbcType=DECIMAL},
#{totalAmount,jdbcType=DECIMAL},
#{virtualAmount,jdbcType=DECIMAL},
#{settleAmount,jdbcType=DECIMAL},
#{tradeDate,jdbcType=VARCHAR},
#{tradeAmount,jdbcType=DECIMAL},
#{tradeFee,jdbcType=DECIMAL},
@@ -422,6 +441,7 @@
service_amount = #{serviceAmount,jdbcType=DECIMAL},
total_amount = #{totalAmount,jdbcType=DECIMAL},
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
settle_amount = #{settleAmount,jdbcType=DECIMAL},
trade_date = #{tradeDate,jdbcType=VARCHAR},
trade_amount = #{tradeAmount,jdbcType=DECIMAL},
trade_fee = #{tradeFee,jdbcType=DECIMAL},
@@ -470,6 +490,9 @@
<if test="virtualAmount != null">
virtual_amount,
</if>
<if test="settleAmount != null">
settle_amount,
</if>
<if test="tradeDate != null">
trade_date,
</if>
@@ -527,6 +550,9 @@
<if test="virtualAmount != null">
#{virtualAmount,jdbcType=DECIMAL},
</if>
<if test="settleAmount != null">
#{settleAmount,jdbcType=DECIMAL},
</if>
<if test="tradeDate != null">
#{tradeDate,jdbcType=VARCHAR},
</if>
@@ -584,6 +610,9 @@
<if test="virtualAmount != null">
virtual_amount = #{virtualAmount,jdbcType=DECIMAL},
</if>
<if test="settleAmount != null">
settle_amount = #{settleAmount,jdbcType=DECIMAL},
</if>
<if test="tradeDate != null">
trade_date = #{tradeDate,jdbcType=VARCHAR},
</if>
@@ -616,6 +645,7 @@
<result column="service_amount" property="serviceAmount" />
<result column="total_amount" property="totalAmount" />
<result column="virtual_amount" property="virtualAmount" />
<result column="settle_amount" property="settleAmount" />
<result column="trade_date" property="tradeDate" />
<result column="trade_amount" property="tradeAmount" />
<result column="trade_fee" property="tradeFee" />
@@ -710,6 +740,9 @@
<if test="virtualAmount != null">
virtual_amount,
</if>
<if test="settleAmount != null">
settle_amount,
</if>
<if test="tradeDate != null">
trade_date,
</if>
@@ -757,6 +790,9 @@
<if test="virtualAmount != null">
#{virtualAmount},
</if>
<if test="settleAmount != null">
#{settleAmount},
</if>
<if test="tradeDate != null">
#{tradeDate},
</if>
@@ -805,6 +841,9 @@
<if test="virtualAmount != null">
virtual_amount = #{virtualAmount},
</if>
<if test="settleAmount != null">
settle_amount = #{settleAmount},
</if>
<if test="tradeDate != null">
trade_date = #{tradeDate},
</if>
@@ -850,6 +889,7 @@
t1.service_amount as serviceAmount,
t1.total_amount as totalAmount,
t1.virtual_amount as virtualAmount,
t1.settle_amount as settleAmount,
t1.trade_date as tradeDate,
t1.trade_amount as tradeAmount,
t1.trade_fee as tradeFee