SELECT id,
code,
order_master_id,
order_master_code,
total_money,
discount_money,
pay_money,
pay_type,
pay_status,
pay_time,
financial_detail_type,
create_by,
create_time,
remark
FROM financial_detail
DELETE FROM financial_detail WHERE id IN
#{financialDetailId}
UPDATE financial_detail
code = #{code},
order_master_id = #{orderMasterId},
order_master_code = #{orderMasterCode},
total_money = #{totalMoney},
discount_money = #{discountMoney},
pay_type = #{payType},
pay_status = #{payStatus},
pay_time = #{payTime},
pay_money = #{payMoney},
financial_detail_type = #{financialDetailType},
update_by = #{updateBy},
update_time = SYSDATE()
WHERE id = #{id}
INSERT INTO financial_detail(
code,
order_master_id,
order_master_code,
total_money,
discount_money,
pay_type,
pay_status,
pay_time,
pay_money,
financial_detail_type,
create_by,
create_time
)VALUES(
#{code},
#{orderMasterId},
#{orderMasterCode},
#{totalMoney},
#{discountMoney},
#{payType},
#{payStatus},
#{payTime},
#{payMoney},
#{financialDetailType},
#{createBy},
SYSDATE()
)