|
|
|
@ -280,7 +280,9 @@
|
|
|
|
|
|
|
|
|
|
<select id="listSettlementLog" resultType="com.alibaba.fastjson.JSONObject">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
SELECT t.client_id,DATE(t.transaction_time) clearing_time,SUM(t.clearing_amount) total,
|
|
|
|
|
SELECT t.client_id,DATE(t.transaction_time) clearing_time,
|
|
|
|
|
ifnull(cd.report_date,date(t.transaction_time)) report_date,
|
|
|
|
|
SUM(t.clearing_amount) total,
|
|
|
|
|
sum(if(LOCATE('MERCHANT',t.system_transaction_id),clearing_amount,0)) income,
|
|
|
|
|
sum(if(LOCATE('SURCHARGE',t.system_transaction_id),clearing_amount,0)) fee,
|
|
|
|
|
(SELECT min(r.rate_value) FROM sys_client_rates r WHERE r.client_id = t.client_id
|
|
|
|
@ -288,6 +290,7 @@
|
|
|
|
|
AND date(r.active_time) <= DATE(t.clearing_time)) rate,
|
|
|
|
|
t.clearing_order clear_detail_id
|
|
|
|
|
FROM pmt_transactions t
|
|
|
|
|
left join log_clearing_detail cd on cd.clear_detail_id=t.clearing_order
|
|
|
|
|
WHERE t.channel='Settlement'
|
|
|
|
|
]]>
|
|
|
|
|
<if test="client_ids!=null">
|
|
|
|
|