|
|
|
@ -561,9 +561,15 @@
|
|
|
|
|
<select id="listSettlementLog" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
SELECT t.client_id,DATE(t.transaction_time) clearing_time,
|
|
|
|
|
ifnull(cd.report_date,date(t.transaction_time)) report_date,
|
|
|
|
|
<if test="merge_settle!=null">1 as merge_settle,</if>
|
|
|
|
|
SUM(cd.tax_amount) tax_amount,
|
|
|
|
|
SUM(cd.total_charge) total_charge,
|
|
|
|
|
<if test="merge_settle!=null">
|
|
|
|
|
SUM(cd.tax_amount) tax_amount,
|
|
|
|
|
SUM(cd.total_charge) total_charge,
|
|
|
|
|
1 as merge_settle,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="merge_settle==null">
|
|
|
|
|
cd.tax_amount,
|
|
|
|
|
cd.total_charge,
|
|
|
|
|
</if>
|
|
|
|
|
SUM(t.clearing_amount) total,
|
|
|
|
|
sum(if(LOCATE('MERCHANT',t.system_transaction_id),t.clearing_amount,0)) income,
|
|
|
|
|
sum(if(LOCATE('SURCHARGE',t.system_transaction_id),t.clearing_amount,0)) fee,
|
|
|
|
|