From 759c752455b87117cdba0272472dfdf46f56c103 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Thu, 8 Mar 2018 18:49:54 +0800 Subject: [PATCH] update --- .../core/impls/ClientManagerImpl.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) 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 87d19dbf5..887f2150f 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 @@ -3123,33 +3123,32 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER) { result.put("is_ordinary", true); if (!expire && waring) { - String [] key = {result.getString("expire_days")}; - result.put("contract_info",editContractOrdinaryWaring(key,config.getString("sys_contract_ordinary_waring"))); + String[] key = { result.getString("expire_days") }; + result.put("contract_info", editContractOrdinaryWaring(key, config.getString("sys_contract_ordinary_waring"))); } if (expire) { - result.put("contract_info",config.getString("sys_contract_ordinary_info")); + result.put("contract_info", config.getString("sys_contract_ordinary_info")); } return result; - } - if (!(PartnerRole.getRole(account.getIntValue("role")) == PartnerRole.CASHIER)) { + } else { + result.put("contract_info", config.getString("sys_contract_info")); result.put("is_ordinary", false); if (!expire && waring) { - String[] key = {result.getString("expire_days")}; + String[] key = { result.getString("expire_days") }; result.put("contract_info", editContractOrdinaryWaring(key, config.getString("sys_contract_waring"))); } if (expire) { result.put("contract_info", config.getString("sys_contract_info")); } + JSONObject file = clientContractService.getOrGenerateSourceAgreement(account.getIntValue("client_id")); + result.put("file_url", file.getString("file_value")); return result; } - JSONObject file = clientContractService.getOrGenerateSourceAgreement(account.getIntValue("client_id")); - result.put("file_url", file.getString("file_value")); - result.put("contract_info", config.getString("sys_contract_info")); - return result; + } private String editContractOrdinaryWaring(String[] key, String sourceStr) { - if(StringUtils.isEmpty(sourceStr) || ArrayUtils.isEmpty(key)){ + if (StringUtils.isEmpty(sourceStr) || ArrayUtils.isEmpty(key)) { return ""; } for (int i = 0; i < key.length; i++) {