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