fix 日志记录

master
luoyang 6 years ago
parent ee04d98b58
commit 5c6f3a60c2

@ -3251,7 +3251,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
clientModifySupport.processClientConfigModify(new SurchargeModeModify(account, clientMoniker, surcharge_mode)); clientModifySupport.processClientModify(new SurchargeModeModify(account, clientMoniker, surcharge_mode));
if ("distributed".equals(surcharge_mode)) { if ("distributed".equals(surcharge_mode)) {
JSONObject surchargeAccount = clientsSurchargeAccountsMapper.find(client.getIntValue("client_id")); JSONObject surchargeAccount = clientsSurchargeAccountsMapper.find(client.getIntValue("client_id"));
@ -3283,7 +3283,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account, clientMoniker, "allow_surcharge_credit", allow_surcharge_credit)); clientModifySupport.processClientModify(new SwitchAllowSurchargeCreditModify(account, clientMoniker, "allow_surcharge_credit", allow_surcharge_credit));
} }
@Override @Override

@ -1,12 +1,13 @@
package au.com.royalpay.payment.manage.merchants.entity.impls; package au.com.royalpay.payment.manage.merchants.entity.impls;
import au.com.royalpay.payment.manage.merchants.entity.ClientConfigModify; import au.com.royalpay.payment.manage.merchants.entity.ClientConfigModify;
import au.com.royalpay.payment.manage.merchants.entity.ClientModify;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
/** /**
* Create by yixian at 2018-04-12 16:43 * Create by yixian at 2018-04-12 16:43
*/ */
public class SurchargeModeModify extends ClientConfigModify { public class SurchargeModeModify extends ClientModify {
private String surcharge_mode; private String surcharge_mode;

@ -0,0 +1,32 @@
package au.com.royalpay.payment.manage.merchants.entity.impls;
import au.com.royalpay.payment.manage.merchants.entity.ClientConfigModify;
import au.com.royalpay.payment.manage.merchants.entity.ClientModify;
import com.alibaba.fastjson.JSONObject;
/**
* Create by yixian at 2018-04-12 16:43
*/
public class SwitchAllowSurchargeCreditModify extends ClientModify {
private String key;
private boolean value;
public SwitchAllowSurchargeCreditModify(JSONObject account, String clientMoniker, String key, boolean value) {
super(account, clientMoniker);
this.key = key;
this.value = value;
}
@Override
protected String business() {
return (value?"开启 ":"关闭 ")+key;
}
@Override
protected JSONObject getModifyResult() {
JSONObject modify = new JSONObject();
modify.put(key, value);
return modify;
}
}
Loading…
Cancel
Save