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 1/7] =?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; } From 1c538488b9a4c26fb6ea10c285e07c72c893e8ce Mon Sep 17 00:00:00 2001 From: yixian Date: Thu, 1 Mar 2018 14:25:45 +0800 Subject: [PATCH 2/7] retail query daily transactions can choose dev only transactions --- .../appclient/core/RetailAppService.java | 2 +- .../core/impls/RetailAppServiceImp.java | 4 ++-- .../appclient/web/RetailAppController.java | 18 ++++++++++-------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java index 9c0ec74d3..ac99a87ba 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java @@ -62,7 +62,7 @@ public interface RetailAppService { JSONObject getClientCurrentRateNew(JSONObject device); - JSONObject listDailyTransactions(String dateStr, String timezone, JSONObject device); + JSONObject listDailyTransactions(String dateStr, String timezone, boolean thisDevOnly, JSONObject device); JSONObject getActivities(JSONObject device, String activity_page, int page, int limit); diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index c55d4b6a7..1c7edd376 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -952,7 +952,7 @@ public class RetailAppServiceImp implements RetailAppService { } @Override - public JSONObject listDailyTransactions(String dateStr, String timezone, JSONObject device) { + public JSONObject listDailyTransactions(String dateStr, String timezone, boolean thisDevOnly, JSONObject device) { try { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); dateFormat.setTimeZone(TimeZone.getTimeZone(timezone)); @@ -960,7 +960,7 @@ public class RetailAppServiceImp implements RetailAppService { String clientType = device.getString("client_type"); DeviceRegister register = deviceSupport.findRegister(clientType); String devId = null; - if (register.includeDevId()) { + if (register.includeDevId() || thisDevOnly) { devId = device.getString("dev_id"); } Date to = DateUtils.addDays(date, 1); diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java index c5c985f3c..368ed4069 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java @@ -116,7 +116,7 @@ public class RetailAppController { @RequestMapping(value = "/notice/{noticeId}", method = RequestMethod.PUT) public void updateNoticePartnerHasRead(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @PathVariable String noticeId, @RequestBody JSONObject account_param) { - if (!device.getString("account_id").equals(account_param.getString("account_id"))){ + if (!device.getString("account_id").equals(account_param.getString("account_id"))) { throw new ForbiddenException("You have no permission"); } retailAppService.updateReadStatus(device, noticeId); @@ -200,8 +200,9 @@ public class RetailAppController { @RequestMapping(value = "/daily_transactions/date/{dateStr}", method = RequestMethod.GET) public JSONObject listDailyTransactions(@PathVariable String dateStr, @RequestParam(defaultValue = "Australia/Melbourne") String timezone, + @RequestParam(defaultValue = "false") boolean thisdevice, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { - return retailAppService.listDailyTransactions(dateStr, timezone, device); + return retailAppService.listDailyTransactions(dateStr, timezone, thisdevice, device); } @RequestMapping(value = "/modify/retail_surcharge", method = RequestMethod.PUT) @@ -250,11 +251,11 @@ public class RetailAppController { } @RequestMapping(value = "/cash_back/clean_info", method = RequestMethod.GET) - public JSONObject getCashbackCleanInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device,@RequestParam(value = "client_id",required = false) String client_id) { - if (client_id==null){ - client_id=device.getString("client_id"); + public JSONObject getCashbackCleanInfo(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam(value = "client_id", required = false) String client_id) { + if (client_id == null) { + client_id = device.getString("client_id"); } - return retailAppService.getCashbackCleanInfo(device,client_id); + return retailAppService.getCashbackCleanInfo(device, client_id); } @RequestMapping(value = "/partner_signin_app_qrcode/{codeId}", method = RequestMethod.GET) @@ -289,9 +290,10 @@ public class RetailAppController { public JSONObject getAd(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { return retailAppService.getAd(device); } + @RequestMapping(value = "/ads/{article_id}", method = RequestMethod.GET) - public JSONObject getAdDetail(@PathVariable String article_id,@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { - return retailAppService.getAdDetail(device,article_id); + public JSONObject getAdDetail(@PathVariable String article_id, @ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { + return retailAppService.getAdDetail(device, article_id); } From 7f0c42f3b9137a7df92055058da649d3aae55beb Mon Sep 17 00:00:00 2001 From: Tayl0r <519104047@qq.com> Date: Thu, 1 Mar 2018 14:43:17 +0800 Subject: [PATCH 3/7] =?UTF-8?q?[Y]=20=E6=94=AF=E4=BB=98=E5=AE=9D=E7=BA=BF?= =?UTF-8?q?=E4=B8=8A=E6=B8=85=E7=AE=97=E9=A2=84=E4=BC=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/impls/PlatformClearAnalysisServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 16ff14059..7bba88849 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 @@ -17,6 +17,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageList; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; +import org.apache.commons.lang3.time.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; @@ -294,6 +295,7 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService { public JSONObject getSystemClearingAmount(Date settle_date, Object settlementLog, String channel) throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 02:00:00"); + SimpleDateFormat onlineSdf = new SimpleDateFormat("yyyyMMdd 02:00:00"); JSONObject sysLogs = new JSONObject(); String start_date = null; String end_date = null; @@ -308,7 +310,9 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService { end_date = sdf.format(wechatSettleLog.getEnd()); logger.info("Wechat System Settle Logs:" + start_date + "<====>" + end_date); } else if (StringUtils.equals("AlipayOnline", channel)) { - + JSONObject alipayOnlineSettleLog = (JSONObject) settlementLog; + start_date = onlineSdf.format(alipayOnlineSettleLog.getDate("min_date")); + end_date = onlineSdf.format(DateUtils.addDays(alipayOnlineSettleLog.getDate("max_date"), 1)); } else { return null; } From f1dcefc6edbb8c3ad2ba0750027163430769d8dd Mon Sep 17 00:00:00 2001 From: "eason.qian" Date: Thu, 1 Mar 2018 14:51:51 +0800 Subject: [PATCH 4/7] fix bd String --- .../manage/merchants/core/impls/ClientManagerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index a3f4daaa9..13549bb38 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -349,9 +349,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (bdConfig != null) { params.put("bd_group", bdConfig.getString("bd_group")); List listGroupBds = financialBDConfigMapper.listGroupBds(bdConfig.getString("bd_group")); - List bdUserId = listGroupBds.stream().map(groupBd->groupBd.getIntValue("manager_id")).collect(Collectors.toList()); + List bdUserId = listGroupBds.stream().map(groupBd->groupBd.getString("manager_id")).collect(Collectors.toList()); if(params.containsKey("bd_user")){ - if(!bdUserId.contains(params.getIntValue("bd_user"))){ + if(!bdUserId.contains(params.getString("bd_user"))){ params.remove("bd_user"); } } From 7a714d4862fa61d080229ce9607ab8a0db9c0743 Mon Sep 17 00:00:00 2001 From: Tayl0r <519104047@qq.com> Date: Thu, 1 Mar 2018 14:59:14 +0800 Subject: [PATCH 5/7] fix --- .../core/impls/PlatformClearAnalysisServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 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 7bba88849..1f89de678 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 @@ -311,8 +311,9 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService { logger.info("Wechat System Settle Logs:" + start_date + "<====>" + end_date); } else if (StringUtils.equals("AlipayOnline", channel)) { JSONObject alipayOnlineSettleLog = (JSONObject) settlementLog; - start_date = onlineSdf.format(alipayOnlineSettleLog.getDate("min_date")); - end_date = onlineSdf.format(DateUtils.addDays(alipayOnlineSettleLog.getDate("max_date"), 1)); + logger.info("AlipayOnline System Settle Logs:" + alipayOnlineSettleLog.getDate("min_time") + "<====>" + alipayOnlineSettleLog.getDate("max_time")); + start_date = onlineSdf.format(alipayOnlineSettleLog.getDate("min_time")); + end_date = onlineSdf.format(DateUtils.addDays(alipayOnlineSettleLog.getDate("max_time"), 1)); } else { return null; } From 33e3ef225fec630054fdf38a774b2e3230f8bada Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Thu, 1 Mar 2018 15:13:05 +0800 Subject: [PATCH 6/7] fix~ --- .../config/bdprize/templates/bd_prize_month_report.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/ui/static/config/bdprize/templates/bd_prize_month_report.html b/src/main/ui/static/config/bdprize/templates/bd_prize_month_report.html index 18540459f..7734b95f5 100644 --- a/src/main/ui/static/config/bdprize/templates/bd_prize_month_report.html +++ b/src/main/ui/static/config/bdprize/templates/bd_prize_month_report.html @@ -110,7 +110,7 @@
-
BD Leader Commission
+
BD Manager Commission
@@ -138,7 +138,7 @@ -
+
Director Commission
From 0e864e89a9f0c80d0250f27ca45887a1c07eee50 Mon Sep 17 00:00:00 2001 From: Tayl0r <519104047@qq.com> Date: Thu, 1 Mar 2018 15:15:02 +0800 Subject: [PATCH 7/7] fix --- .../core/impls/PlatformClearAnalysisServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 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 1f89de678..e0364ece3 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 @@ -295,7 +295,6 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService { public JSONObject getSystemClearingAmount(Date settle_date, Object settlementLog, String channel) throws Exception { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd 02:00:00"); - SimpleDateFormat onlineSdf = new SimpleDateFormat("yyyyMMdd 02:00:00"); JSONObject sysLogs = new JSONObject(); String start_date = null; String end_date = null; @@ -312,8 +311,8 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService { } else if (StringUtils.equals("AlipayOnline", channel)) { JSONObject alipayOnlineSettleLog = (JSONObject) settlementLog; logger.info("AlipayOnline System Settle Logs:" + alipayOnlineSettleLog.getDate("min_time") + "<====>" + alipayOnlineSettleLog.getDate("max_time")); - start_date = onlineSdf.format(alipayOnlineSettleLog.getDate("min_time")); - end_date = onlineSdf.format(DateUtils.addDays(alipayOnlineSettleLog.getDate("max_time"), 1)); + start_date = sdf.format(alipayOnlineSettleLog.getDate("min_time")); + end_date = sdf.format(DateUtils.addDays(alipayOnlineSettleLog.getDate("max_time"), 1)); } else { return null; }