From d2e61ea9dfb19f1ddaf4c96d766b56697fc9422b Mon Sep 17 00:00:00 2001 From: luoyang Date: Fri, 27 Mar 2020 17:24:03 +0800 Subject: [PATCH] =?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} +