|
|
|
@ -390,6 +390,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
return PageListUtils.buildPageListResult(partners);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void orgIds(JSONObject params, int orgId) {
|
|
|
|
|
JSONObject param = new JSONObject();
|
|
|
|
|
param.put("parent_org_id", params.getString("org_id"));
|
|
|
|
@ -1267,23 +1268,27 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
// clientMapper.updateCleanDays(clientId, config.getCleanDays());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 + "费率,请重新输入");
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 + "费率,请重新输入");
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2159,6 +2164,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
clearClientCache(clientId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setClientTaxInSurcharge(String clientMoniker, boolean taxInSurcharge) {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
JSONObject update = new JSONObject();
|
|
|
|
|
int clientId = client.getIntValue("client_id");
|
|
|
|
|
update.put("client_id", clientId);
|
|
|
|
|
update.put("tax_in_surcharge", taxInSurcharge);
|
|
|
|
|
clientMapper.update(update);
|
|
|
|
|
clearClientCache(clientId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> listClientsForSettlement() {
|
|
|
|
|
return clientMapper.listClientsForSettlement();
|
|
|
|
@ -2994,6 +3013,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
@CacheEvict(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
|
|
|
|
|
public String subMerchantApplication(String clientMoniker, SubMerchantIdApply subMerchantApply, JSONObject manager) {
|
|
|
|
|