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

master
dulingling 4 years ago
parent b74792a7e7
commit 991388c607

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>2.3.62</version>
<version>2.3.63</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<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()) {
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"))) {
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<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 (newConfig.getBigDecimal("cb_bankpay_rate_value") != null) {

Loading…
Cancel
Save