Upd:商户的ext_params在商户支付配置中做面板/

enable_presettle 在清算设置中添加选项
master
dulingling 5 years ago
parent 6da96d24d7
commit d8655ef3e6

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

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

@ -594,11 +594,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="panel panel-default" ng-if="paymentInfo.ext_params"> <div class="panel panel-default" ng-if="('100000000'|withRole) && paymentInfo.ext_params">
<div class="panel-heading">Ext Config</div> <div class="panel-heading">Ext Config</div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal" > <div class="form-horizontal" >
<!-- 此处 遍历 循环 -->
<div class="form-group" ng-repeat="param in convertExtParams"> <div class="form-group" ng-repeat="param in convertExtParams">
<label class="col-sm-2 control-label">{{param.name.toUpperCase()}}</label> <label class="col-sm-2 control-label">{{param.name.toUpperCase()}}</label>
<div class="col-sm-10"> <div class="col-sm-10">

Loading…
Cancel
Save