【R】自定义费率fix

master
liuxinxin 5 years ago
parent 7f871d1aa4
commit 87324141db

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

@ -2724,7 +2724,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} else {
BigDecimal rate_value = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat").getBigDecimal("rate_value");
if (customer_surcharge_rate.compareTo(PlatformEnvironment.getEnv().getMaxCustomerSurchargeRate()) > 0
|| customer_surcharge_rate.compareTo(rate_value) < 0) {
|| customer_surcharge_rate.compareTo(rate_value) <= 0) {
throw new ForbiddenException("Invalid Range");
}
clientModifySupport.processClientConfigModify(new CustomerSurchargeRateModify(account, clientMoniker, customer_surcharge_rate));
@ -4237,10 +4237,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
if (appClientBean.getCustomerSurchargeRate() != null) {
if (appClientBean.getCustomerSurchargeRate() <= 0) {
throw new ForbiddenException("customerSurchargeRate is 0");
}
BigDecimal customerSurchargeRate = new BigDecimal(appClientBean.getCustomerSurchargeRate()).setScale(2, RoundingMode.HALF_DOWN);
BigDecimal rateValue = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat").getBigDecimal("rate_value");
if (customerSurchargeRate.compareTo(PlatformEnvironment.getEnv().getMaxCustomerSurchargeRate()) > 0
|| customerSurchargeRate.compareTo(rateValue) <= 0) {
throw new ForbiddenException("Invalid Range");
}
setCustomerSurchargeRate(account, client.getString("client_moniker"), customerSurchargeRate);
}
clientInfoCacheSupport.clearClientCache(client_id);

Loading…
Cancel
Save