From 3d86ba8a9b9a5479a66f1acc72f5b9619f56de78 Mon Sep 17 00:00:00 2001 From: Tayl0r <519104047@qq.com> Date: Thu, 1 Mar 2018 09:19:20 +0800 Subject: [PATCH] =?UTF-8?q?[Y]=20=E4=BF=AE=E5=A4=8D=E6=B8=85=E7=AE=97?= =?UTF-8?q?=E9=A2=84=E4=BC=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impls/PlatformClearAnalysisServiceImpl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/PlatformClearAnalysisServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/PlatformClearAnalysisServiceImpl.java index 79f8a3336..16ff14059 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/PlatformClearAnalysisServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/PlatformClearAnalysisServiceImpl.java @@ -174,7 +174,7 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService { params.put("settlement_fee", settleFee.getBigDecimal("settlement_fee")); params.put("channel", channel); params.put("last_update_date", new Date()); - JSONObject sysClearData = getSystemClearingAmount(dateStr, null, channel); + JSONObject sysClearData = getSystemClearingAmount(dateStr, aliSettleLog, channel); if (sysClearData != null && sysClearData.size() > 0) { params.put("sys_pay_fee", sysClearData.getBigDecimal("sys_pay_fee")); params.put("sys_refund_fee", sysClearData.getBigDecimal("sys_refund_fee")); @@ -292,22 +292,23 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService { return alipaySettleLog; } - public JSONObject getSystemClearingAmount(Date settle_date, SettlementLog settlementLog, String channel) throws Exception { + public JSONObject getSystemClearingAmount(Date settle_date, Object settlementLog, String channel) throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 02:00:00"); JSONObject sysLogs = new JSONObject(); String start_date = null; String end_date = null; if (StringUtils.equals("Alipay", channel)) { - JSONObject lastClearDay = estimateAnalysisMapper.findLastCleanDays(sdfClear.format(settle_date), 1); start_date = sdf.format(lastClearDay.getDate("date_str")); end_date = sdf.format(settle_date); - logger.info("Alipay System Settle Logs:"+start_date+"<====>" +end_date); - + logger.info("Alipay System Settle Logs:" + start_date + "<====>" + end_date); } else if (StringUtils.equals("Wechat", channel)) { - start_date = sdf.format(settlementLog.getStart()); - end_date = sdf.format(settlementLog.getEnd()); - logger.info("Wechat System Settle Logs:"+start_date+"<====>" +end_date); + SettlementLog wechatSettleLog = (SettlementLog) settlementLog; + start_date = sdf.format(wechatSettleLog.getStart()); + end_date = sdf.format(wechatSettleLog.getEnd()); + logger.info("Wechat System Settle Logs:" + start_date + "<====>" + end_date); + } else if (StringUtils.equals("AlipayOnline", channel)) { + } else { return null; }