fix clearing date display

master
yixian 6 years ago
parent 4523d77eee
commit d6589d2917

@ -834,10 +834,11 @@ public class TradeLogServiceImpl implements TradeLogService {
JSONObject result = PageListUtils.buildPageListResult(logs);
result.put("analysis", transactionMapper.getClientAmountAnalysis(params));
if (query.getPage() == 1) {
if (!logs.isEmpty() && logs.size() > 0) {
if (!logs.isEmpty()) {
JSONObject clearingDetail = clearingDetailMapper.findByDetailId(logs.get(0).getIntValue("clear_detail_id"));
if (clearingDetail!=null){
JSONObject clearingLog = clearingLogMapper.findById(clearingDetail.getIntValue("clearing_id"));
if(clearingLog.getBooleanValue("editable")){
result.put("padding", true);
logs.get(0).put("padding",true);

@ -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">

Loading…
Cancel
Save