INSERT INTO cash_record_refund (
jwcode,
name,
market,
order_code,
bank_code,
permanent_gold,
free_gold,
submitter_id,
submitter_market,
remark,
reject_reason,
refund_reason,
refund_model,
executor,
refund_channels,
refund_time,
refund_remark,
refund_voucher,
refund_currency,
refund_amount,
related_id,
audit_id,
status
) VALUES (
#{jwcode},
#{name},
#{market},
#{orderCode},
#{bankCode},
#{partRefundGold},
#{partRefundFree},
#{submitterId},
#{submitterMarket},
#{remark},
#{rejectReason},
#{refundReason},
#{refundModel},
#{executor},
#{refundChannels},
#{refundTime},
#{refundRemark},
#{refundVoucher},
#{refundCurrency},
#{refundAmount},
#{originalOrderId},
#{auditId},
#{status}
);
insert into lhl_audit
(
area_servise,
area_finance,
area_charge,
head_finance
)
values(
#{areaServise},
#{areaFinance},
#{areaCharge},
#{headFinance}
)
update cash_record_refund
set
status = 10,
refund_model = #{refundModel},
refund_reason = #{refundReason}
where id = #{id}
update cash_record_refund set status = 11
where id = #{id}
update cash_record_refund set status = #{status},executor = #{executor},reject_reason = #{rejectReason}
where id = #{id}
update cash_record_refund set refund_currency = #{refundCurrency},
refund_amount = #{refundAmount},
refund_channels = #{refundChannels},
refund_time = #{refundTime},
refund_remark = #{refundRemark},
refund_voucher = #{refundVoucher},
status = #{status},
executor = #{executor}
where id = #{id}
update cash_record_collection
set status = #{status}
and id = #{id}
and order_code = #{orderCode}
update lhl_audit
area_servise = #{areaServise},
area_finance = #{areaFinance},
area_charge = #{areaCharge},
head_finance = #{headFinance},
where id = #{auditId}