|
|
|
@ -1240,8 +1240,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
private void checkModifyRate(JSONObject org,JSONObject configJson,String rateName,String rateValueKey){
|
|
|
|
|
if(configJson.getString("rate_name").equals(rateName)){
|
|
|
|
|
if(org.containsKey(rateValueKey)){
|
|
|
|
|
if(configJson.getDouble("rate_value").compareTo(org.getDouble(rateValueKey)) > 0){
|
|
|
|
|
throw new ForbiddenException("费率参数大于旗下商户最低"+rateName+"费率,请重新输入===>");
|
|
|
|
|
if(configJson.getDouble("rate_value").compareTo(org.getDouble(rateValueKey)) < 0){
|
|
|
|
|
|
|
|
|
|
throw new ForbiddenException("费率参数小于旗下商户最低"+rateName+"费率,请重新输入");
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1249,8 +1250,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
private void checkAddRate(JSONObject config,String channel, String rateKey,JSONObject org,String rateValueKey){
|
|
|
|
|
if(config.containsKey(rateKey)){
|
|
|
|
|
if(org.containsKey(rateValueKey)){
|
|
|
|
|
if(config.getBigDecimal(rateKey).compareTo(org.getBigDecimal(rateValueKey)) > 0){
|
|
|
|
|
throw new ForbiddenException("费率参数大于旗下商户最低"+channel+"费率,请重新输入===>");
|
|
|
|
|
if(config.getBigDecimal(rateKey).compareTo(org.getBigDecimal(rateValueKey)) < 0){
|
|
|
|
|
throw new ForbiddenException("费率参数小于旗下商户最低"+channel+"费率,请重新输入");
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|