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} +