From 2f6738c3bb121a9f12756a37a60b98f71d7f1071 Mon Sep 17 00:00:00 2001 From: dulingling Date: Fri, 3 Apr 2020 16:12:10 +0800 Subject: [PATCH] =?UTF-8?q?Upd:=E5=95=86=E6=88=B7=E7=9A=84ext=5Fparams?= =?UTF-8?q?=E5=9C=A8=E5=95=86=E6=88=B7=E6=94=AF=E4=BB=98=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=B8=AD=E5=81=9A=E9=9D=A2=E6=9D=BF/=20=20=20=20=20enable=5Fpr?= =?UTF-8?q?esettle=20=E5=9C=A8=E6=B8=85=E7=AE=97=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E4=B8=AD=E6=B7=BB=E5=8A=A0=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../core/impls/ClientManagerImpl.java | 20 ++++++++++++------- .../templates/partner_payment_info.html | 3 +-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index b27108e1d..f712fd758 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.28 + 1.4.29 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index e04a0300c..11f9b0fd3 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -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); } } diff --git a/src/main/ui/static/payment/partner/templates/partner_payment_info.html b/src/main/ui/static/payment/partner/templates/partner_payment_info.html index 3944afdee..c42607419 100644 --- a/src/main/ui/static/payment/partner/templates/partner_payment_info.html +++ b/src/main/ui/static/payment/partner/templates/partner_payment_info.html @@ -594,11 +594,10 @@ -
+
Ext Config
-