From 718e2f95476b2021fcea8a70c1d5291850e60f09 Mon Sep 17 00:00:00 2001 From: dulingling Date: Tue, 18 Aug 2020 18:18:46 +0800 Subject: [PATCH] =?UTF-8?q?upd:=E5=95=86=E6=88=B7=E5=8C=BA=E5=88=86?= =?UTF-8?q?=E5=8D=A1=E8=B4=B9=E7=8E=87=E6=B7=BB=E5=8A=A0=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E4=B9=8B=E5=89=8D=E6=B7=BB=E5=8A=A0=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E8=B4=B9=E7=8E=87=E6=9C=89=E6=95=88=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../merchants/core/impls/ClientManagerImpl.java | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 5beff15b1..7ac9ee1e2 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.3.62 + 2.3.63 UTF-8 2.4.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 2588d9008..ab21ff682 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 @@ -1967,11 +1967,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (!clientRateMapper.listClientRatesForSaving(clientId, config.getDate("active_time"), config.getDate("expiry_time"), config.getBigDecimal("rate_value"), config.getInteger("clean_days"), channel).isEmpty()) { return; } - List existRate = clientRateMapper.listCurrentClientRates(clientId, config.getDate("active_time"), channel); - for (JSONObject rateLog : existRate) { - rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1)); - clientRateMapper.updateConfig(rateLog); - } if (StringUtils.equalsIgnoreCase("rpaypmt_card", config.getString("type"))) { JSONObject extRateParams = JsonHelper.newJson(json -> { json.put("domestic_rate_value", subRateObject(config.getBigDecimal("rate_value"), config.getIntValue("clean_days"))); @@ -1979,6 +1974,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid json.put("overseas_rate_value", subRateObject(extRates.getBigDecimal("international_rate_value"), config.getIntValue("clean_days") + 1)); }); newConfig.put("ext_rates", extRateParams.toJSONString()); + }else{ + List existRate = clientRateMapper.listCurrentClientRates(clientId, config.getDate("active_time"), channel); + for (JSONObject rateLog : existRate) { + rateLog.put("expiry_time", DateUtils.addDays(config.getDate("active_time"), -1)); + clientRateMapper.updateConfig(rateLog); + } } if ("cb_bankpay".equalsIgnoreCase(channel)) { if (newConfig.getBigDecimal("cb_bankpay_rate_value") != null) {