upd:商户区分卡费率添加,不失效之前添加记录的费率有效时间

master
dulingling 4 years ago
parent b74792a7e7
commit 991388c607

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>2.3.62</version> <version>2.3.63</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>2.4.0</jib-maven-plugin.version> <jib-maven-plugin.version>2.4.0</jib-maven-plugin.version>

@ -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()) { if (!clientRateMapper.listClientRatesForSaving(clientId, config.getDate("active_time"), config.getDate("expiry_time"), config.getBigDecimal("rate_value"), config.getInteger("clean_days"), channel).isEmpty()) {
return; return;
} }
List<JSONObject> 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"))) { if (StringUtils.equalsIgnoreCase("rpaypmt_card", config.getString("type"))) {
JSONObject extRateParams = JsonHelper.newJson(json -> { JSONObject extRateParams = JsonHelper.newJson(json -> {
json.put("domestic_rate_value", subRateObject(config.getBigDecimal("rate_value"), config.getIntValue("clean_days"))); 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)); json.put("overseas_rate_value", subRateObject(extRates.getBigDecimal("international_rate_value"), config.getIntValue("clean_days") + 1));
}); });
newConfig.put("ext_rates", extRateParams.toJSONString()); newConfig.put("ext_rates", extRateParams.toJSONString());
}else{
List<JSONObject> 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 ("cb_bankpay".equalsIgnoreCase(channel)) {
if (newConfig.getBigDecimal("cb_bankpay_rate_value") != null) { if (newConfig.getBigDecimal("cb_bankpay_rate_value") != null) {

Loading…
Cancel
Save