|
|
|
@ -407,7 +407,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
// donothing
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
|
|
|
|
|
JSONObject clientConfig = clientConfigService.find(client.getIntValue("client_id"));
|
|
|
|
|
if(client.containsKey("enable_presettle")){
|
|
|
|
|
clientConfig.put("enable_presettle",client.getBoolean("enable_presettle"));
|
|
|
|
|
}
|
|
|
|
|
if(client.containsKey("ext_params")){
|
|
|
|
|
clientConfig.put("ext_params",client.getString("ext_params"));
|
|
|
|
|
}
|
|
|
|
|
client.putAll(clientConfig);
|
|
|
|
|
client.put("unsubscribe", mailUnsubMapper.findOneByClientMoniker(clientMoniker) == null ? false : true);
|
|
|
|
|
client.put("show_all_permission", true);
|
|
|
|
|
int role = manager != null ? manager.getIntValue("role") : 0;
|
|
|
|
@ -3444,12 +3451,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void setClientPreSettle(JSONObject account, String clientMoniker, boolean presettle) {
|
|
|
|
|
public void setClientPreSettle(JSONObject manager, String clientMoniker, boolean presettle) {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account, clientMoniker, "enable_presettle", presettle));
|
|
|
|
|
clientModifySupport.processClientModify( new SwitchAllowSurchargeCreditModify(manager, clientMoniker, "enable_presettle", presettle));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -6795,15 +6802,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new InvalidShortIdException();
|
|
|
|
|
}
|
|
|
|
|
JSONObject clientConfig = clientConfigMapper.find(client.getInteger("client_id"));
|
|
|
|
|
JSONObject extParmas = JSONObject.parseObject(clientConfig.getString("ext_params"));
|
|
|
|
|
JSONObject extParmas = JSONObject.parseObject(client.getString("ext_params"));
|
|
|
|
|
if("true".equals(params.getString("value"))||"false".equals(params.getString("value"))){
|
|
|
|
|
extParmas.put(params.getString("key"),params.getBoolean("value"));
|
|
|
|
|
}else{
|
|
|
|
|
extParmas.put(params.getString("key"),params.getString("value"));
|
|
|
|
|
}
|
|
|
|
|
clientConfig.put("ext_params",extParmas.toString());
|
|
|
|
|
clientConfigMapper.update(clientConfig);
|
|
|
|
|
client.put("ext_params",extParmas.toString());
|
|
|
|
|
clientMapper.update(client);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|