From bc4f598a36c16bf81b77fb16067e25d274c72794 Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 26 Mar 2020 14:27:30 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix=20=E4=BC=98=E5=8C=96=E5=95=86=E6=88=B7?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A2=9E=E5=80=BC=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/rservices/core/impl/RServicesApplyServiceImpl.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bf87b9d42..b3a8695e7 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.16 + 1.4.17 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java index a1f50a21c..eaff387e0 100644 --- a/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java @@ -100,6 +100,7 @@ public class RServicesApplyServiceImpl implements RServicesApplyService { serviceInfo.put("incremental_mode", 2); serviceInfo.put("incremental_rate_value", 0); } + serviceInfo.put("title", applyInfo.getString("title")); if (clientServices == null) { serviceInfo.put("incremental_id", UUID.randomUUID().toString()); serviceInfo.put("client_id", applyInfo.getIntValue("client_id")); From dbdbdc91bf4c7940defa9a88c18c1788a30797c7 Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 26 Mar 2020 14:36:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix=20=E4=BC=98=E5=8C=96=E5=95=86=E6=88=B7?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A2=9E=E5=80=BC=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../core/impls/ClientManagerImpl.java | 27 ++++++++++++------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index b3a8695e7..553b53d00 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.17 + 1.4.18 UTF-8 1.8.0 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 8aedaff3b..df87e3b4a 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 @@ -6592,15 +6592,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid saveIncrementalService.put("title", incrementalService.getString("title")); if (existIncrementalService == null) { clientIncrementalMapper.save(saveIncrementalService); - if (incrementalService.getBigDecimal("total_incremental_amount").compareTo(new BigDecimal(0)) > 0) { - saveIncrementalService.put("amount", incrementalService.getString("total_incremental_amount")); - saveIncrementalService.put("service_code", "RYCBSM"); - String title = incrementalService.getString("title"); - if (StringUtils.isBlank(title)) { - title = "RP跨境商城开通费用"; - } - saveIncrementalService.put("title", title); - rServicesApplyService.saveDebitDetail(saveIncrementalService, client); + if (StringUtils.equalsIgnoreCase("RP跨境商城", saveIncrementalService.getString("channel"))) { + afterGeekShopSave(saveIncrementalService, client); } } else { clientIncrementalMapper.update(saveIncrementalService); @@ -6678,6 +6671,22 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } } + private void afterGeekShopSave(JSONObject serviceInfo, JSONObject client) { + JSONObject clientConfig = clientConfigMapper.find(client.getIntValue("client_id")); + clientConfig.put("geek_shop_status", 1); + clientConfigMapper.update(clientConfig); + if (serviceInfo.getBigDecimal("total_incremental_amount").compareTo(new BigDecimal(0)) > 0) { + serviceInfo.put("amount", serviceInfo.getString("total_incremental_amount")); + serviceInfo.put("service_code", "RYCBSM"); + String title = serviceInfo.getString("title"); + if (StringUtils.isBlank(title)) { + title = "RP跨境商城开通费用"; + } + serviceInfo.put("title", title); + rServicesApplyService.saveDebitDetail(serviceInfo, client); + } + } + private String[] getChildClientIds(int clientId) { JSONObject mchConfig = merchantInfoProvider.getMchExtParams(clientId); List clientIds = new ArrayList<>(); From 3f613fd7975453ab6d59c3ec7b792eed10906015 Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 26 Mar 2020 17:38:28 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix=20=E5=95=86=E6=88=B7=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E4=BA=A4=E6=98=93=E8=B6=8B=E5=8A=BF=E7=BB=9F=E8=AE=A1=20?= =?UTF-8?q?=E6=97=85=E6=B8=B8=E5=87=BA=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/analysis/mappers/ClientAnalysisMapper.xml | 2 +- .../analysis/mappers/TransactionAnalysisMapper.xml | 12 ++++++------ .../payment/manage/mappers/system/ClientMapper.xml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 553b53d00..b5fa55d3c 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.18 + 1.4.19 UTF-8 1.8.0 diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml index 7177f3d33..a04331f11 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml @@ -60,7 +60,7 @@ WHERE create_time <= now() and (approve_result is null or approve_result !=0) and is_valid=1 - and (royalpayindustry = 1 or royalpayindustry like '100%') + and (royalpayindustry = 1 or (royalpayindustry like '100%' and CHAR_LENGTH(royalpayindustry)=5)) diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml index 068a5c177..ca47f7dbf 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/TransactionAnalysisMapper.xml @@ -1112,11 +1112,11 @@ sum(so.total) as total_amount, sum(so.orders) as orders, - count(Distinct IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'), so.client_id,0)) as industry_trans_clients, - SUM(IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'),so.total,0)) as industry_total_amount, - SUM(IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'),so.orders,0)) as industry_orders, - convert(SUM(IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'),so.total,0))/sum( so.total )*100,decimal(15,2)) as amount_pcent, - convert(SUM(IF((c.royalpayindustry =1 or c.royalpayindustry like '100%'),so.orders,0))/sum( so.orders )*100,decimal(15,2)) as order_pcent, + count(Distinct IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)), so.client_id,0)) as industry_trans_clients, + SUM(IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)),so.total,0)) as industry_total_amount, + SUM(IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)),so.orders,0)) as industry_orders, + convert(SUM(IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)),so.total,0))/sum( so.total )*100,decimal(15,2)) as amount_pcent, + convert(SUM(IF((c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)),so.orders,0))/sum( so.orders )*100,decimal(15,2)) as order_pcent, count(Distinct so.client_id) as industry_trans_clients, @@ -1164,7 +1164,7 @@ inner JOIN sys_clients c ON so.client_id = c.client_id AND c.is_valid = 1 - AND (c.royalpayindustry =1 or c.royalpayindustry like '100%') + AND (c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)) diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml index f6ccf6d31..d8c87e1da 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml @@ -90,7 +90,7 @@ AND c.business_structure=#{business_structure} - AND (c.royalpayindustry =1 or c.royalpayindustry like '100%') + AND (c.royalpayindustry =1 or (c.royalpayindustry like '100%' and CHAR_LENGTH(c.royalpayindustry)=5)) From d2e61ea9dfb19f1ddaf4c96d766b56697fc9422b Mon Sep 17 00:00:00 2001 From: luoyang Date: Fri, 27 Mar 2020 17:24:03 +0800 Subject: [PATCH 4/4] =?UTF-8?q?add=20=E5=95=86=E6=88=B7=E6=AC=A0=E6=AC=BE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/logview/web/LogRiskController.java | 9 ++- .../mappers/payment/TransactionMapper.java | 2 + .../manage/tradelog/core/TradeLogService.java | 2 +- .../core/impls/TradeLogServiceImpl.java | 14 ++-- .../mappers/payment/TransactionMapper.xml | 66 ++++++++++++++++--- src/main/ui/manage.html | 4 +- src/main/ui/static/analysis/pre_refund.js | 60 ++++++++++++----- .../static/analysis/templates/pre_refund.html | 61 ++++++----------- .../templates/pre_refund_partners.html | 50 ++++++++++++++ .../ui/static/menu/templates/main_menu.html | 4 +- 11 files changed, 192 insertions(+), 82 deletions(-) create mode 100644 src/main/ui/static/analysis/templates/pre_refund_partners.html diff --git a/pom.xml b/pom.xml index b5fa55d3c..be6d056b7 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.19 + 1.4.20 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/logview/web/LogRiskController.java b/src/main/java/au/com/royalpay/payment/manage/logview/web/LogRiskController.java index f38c9c53f..72372e9ce 100644 --- a/src/main/java/au/com/royalpay/payment/manage/logview/web/LogRiskController.java +++ b/src/main/java/au/com/royalpay/payment/manage/logview/web/LogRiskController.java @@ -85,6 +85,11 @@ public class LogRiskController { @GetMapping(value = "/pre_refund/list") public JSONObject listPreRefund(PreRefundQueryBean preRefundQueryBean) { - return tradeLogService.listPreRefundClients(preRefundQueryBean); + return tradeLogService.listPreRefundClients(preRefundQueryBean,null); } -} \ No newline at end of file + + @GetMapping(value = "/pre_geek_cost/list") + public JSONObject listPreGeekCost(PreRefundQueryBean preRefundQueryBean) { + return tradeLogService.listPreRefundClients(preRefundQueryBean, "geek"); + } +} diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.java index 9ba8b8f93..1aa16dbe8 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.java @@ -51,6 +51,8 @@ public interface TransactionMapper { PageList listPreRefundClients(PageBounds pagination); + PageList listPreGeekCostClients(PageBounds pagination); + JSONObject validAnalysis(@Param("from") Date from, @Param("to") Date to, @Param("channel") String channel, @Param("merchant_id") String merchantId); List listUnclearedTransactionsOfClient(@Param("client_id") int clientId, @Param("end") Date finish, @Param("settleDate") Date settleDate); diff --git a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/TradeLogService.java b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/TradeLogService.java index 50703c227..b7627151d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/TradeLogService.java +++ b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/TradeLogService.java @@ -56,7 +56,7 @@ public interface TradeLogService { void fullReleasePreAuthorization(JSONObject account, TradeLogQuery query)throws Exception; - JSONObject listPreRefundClients(PreRefundQueryBean params); + JSONObject listPreRefundClients(PreRefundQueryBean params, String preType); void exportSettlementLog(TradeLogQuery query, JSONObject partner, HttpServletResponse response); diff --git a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java index 4554f83b0..9ace49c48 100644 --- a/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/tradelog/core/impls/TradeLogServiceImpl.java @@ -74,7 +74,6 @@ import java.text.DecimalFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; -import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; @@ -1454,15 +1453,14 @@ public class TradeLogServiceImpl implements TradeLogService { } @Override - public JSONObject listPreRefundClients(PreRefundQueryBean params) { - String preRefundDataStr = stringRedisTemplate.boundValueOps("payment:pre_refund_data").get(); - if (StringUtils.isEmpty(preRefundDataStr)) { - JSONObject preRefundData = PageListUtils.buildPageListResult(transactionMapper.listPreRefundClients(new PageBounds(params.getPage(), params.getLimit()))); - stringRedisTemplate.boundValueOps("payment:pre_refund_data").set(preRefundData.toJSONString(), 1, TimeUnit.HOURS); - return preRefundData; + public JSONObject listPreRefundClients(PreRefundQueryBean params, String preType) { + PageList data = null; + if (StringUtils.equalsIgnoreCase("geek", preType)) { + data = transactionMapper.listPreGeekCostClients(new PageBounds(params.getPage(), params.getLimit())); } else { - return JSONObject.parseObject(preRefundDataStr); + data = transactionMapper.listPreRefundClients(new PageBounds(params.getPage(), params.getLimit())); } + return PageListUtils.buildPageListResult(data); } @Override diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml index 2eb204945..d04b5e7b5 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/payment/TransactionMapper.xml @@ -448,16 +448,62 @@ and t.transaction_time < #{to} +