修改计费订单ID类型为Long,优化相关逻辑
This commit is contained in:
@@ -30,24 +30,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from prc_pay_bill
|
||||
</sql>
|
||||
|
||||
<select id="selectByBillId" parameterType="String" resultMap="PrcPayBillResult">
|
||||
<select id="selectByBillId" parameterType="Long" resultMap="PrcPayBillResult">
|
||||
<include refid="selectPrcPayBillVo"/>
|
||||
where bill_id = #{billId}
|
||||
</select>
|
||||
|
||||
<select id="selectByPayBillId" parameterType="String" resultMap="PrcPayBillResult">
|
||||
<select id="selectByPayBillId" parameterType="Long" resultMap="PrcPayBillResult">
|
||||
<include refid="selectPrcPayBillVo"/>
|
||||
where pay_bill_id = #{payBillId}
|
||||
</select>
|
||||
|
||||
<insert id="insertPrcPayBill" parameterType="PrcPayBill">
|
||||
<insert id="insertPrcPayBill" parameterType="PrcPayBill" useGeneratedKeys="true" keyProperty="payBillId">
|
||||
insert into prc_pay_bill (
|
||||
pay_bill_id, bill_id, currency, product_amount, redline_amount,
|
||||
bill_id, currency, product_amount, redline_amount,
|
||||
cost_amount, pay_total,
|
||||
belong_saler, belong_saler_code, settlement_man, settlement_man_code,
|
||||
create_by, create_time
|
||||
) values (
|
||||
#{payBillId}, #{billId}, #{currency}, #{productAmount}, #{redlineAmount},
|
||||
#{billId}, #{currency}, #{productAmount}, #{redlineAmount},
|
||||
#{costAmount}, #{payTotal},
|
||||
#{belongSaler}, #{belongSalerCode}, #{settlementMan}, #{settlementManCode},
|
||||
#{createBy}, sysdate()
|
||||
@@ -70,14 +70,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where bill_id = #{billId}
|
||||
</update>
|
||||
|
||||
<insert id="upsertPrcPayBill" parameterType="PrcPayBill">
|
||||
<insert id="upsertPrcPayBill" parameterType="PrcPayBill" useGeneratedKeys="true" keyProperty="payBillId">
|
||||
insert into prc_pay_bill (
|
||||
pay_bill_id, bill_id, currency, product_amount, redline_amount,
|
||||
bill_id, currency, product_amount, redline_amount,
|
||||
cost_amount, pay_total,
|
||||
belong_saler, belong_saler_code, settlement_man, settlement_man_code,
|
||||
create_by, create_time
|
||||
) values (
|
||||
#{payBillId}, #{billId}, #{currency}, #{productAmount}, #{redlineAmount},
|
||||
#{billId}, #{currency}, #{productAmount}, #{redlineAmount},
|
||||
#{costAmount}, #{payTotal},
|
||||
#{belongSaler}, #{belongSalerCode}, #{settlementMan}, #{settlementManCode},
|
||||
#{createBy}, sysdate()
|
||||
@@ -98,11 +98,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<insert id="insertMissingPayBills">
|
||||
insert into prc_pay_bill (
|
||||
pay_bill_id, bill_id, currency, pay_total,
|
||||
bill_id, currency, pay_total,
|
||||
belong_saler, belong_saler_code, settlement_man, settlement_man_code,
|
||||
create_by, create_time, update_by, update_time
|
||||
)
|
||||
select replace(uuid(), '-', ''), o.bill_id, ifnull(nullif(o.currency, ''), 'CNY'), 0,
|
||||
select o.bill_id, ifnull(nullif(o.currency, ''), 'CNY'), 0,
|
||||
o.belong_saler, o.belong_saler_code, o.settlement_man, o.settlement_man_code,
|
||||
#{operator}, sysdate(), #{operator}, sysdate()
|
||||
from prc_order_bill o
|
||||
@@ -129,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<foreach collection="billIds" item="billId" open="(" separator="," close=")">#{billId}</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteByBillId" parameterType="String">
|
||||
<delete id="deleteByBillId" parameterType="Long">
|
||||
delete from prc_pay_bill where bill_id = #{billId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user