From 9d9499cfc84207752670f46623cd51e0558a8a3e Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 28 Apr 2020 11:52:04 +0800 Subject: [PATCH] =?UTF-8?q?add=20card=20=E5=BC=80=E9=80=9A=E9=82=AE?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/impls/ClientManagerImpl.java | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 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 1482ad7a6..f44f84a20 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 @@ -1216,9 +1216,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid int clientId = client.getIntValue("client_id"); isRiskyMerchant(client, clientBankAccountMapper.clientBankAccounts(clientId).get(0)); - if (client.getString("sub_merchant_id") == null || client.getString("sub_merchant_id").equals("")) { - throw new BadRequestException("该商户未设置微信 Sub Merchant ID!"); - } JSONObject cardFlowInfo = clientCardFlowMapper.findClient(clientId); client.putAll(clientConfigService.find(client.getIntValue("client_id"))); Integer open_status_to = cardFlowInfo != null? cardFlowInfo.getIntValue("open_status") : null; @@ -1229,20 +1226,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (pass == 1) { createKycAuthStatus(manager, client); clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "skip_clearing", false)); - if (client.getIntValue("source") == 4 || client.getIntValue("source") == 5) { - List accounts = clientAccountMapper.listAdminAccounts(client.getIntValue("client_id")); - JSONObject account = accounts.get(0); - //TODO 发送卡支付开通邮件 1.判断商户是否已开通跨境支付,若没有开通,init账号 -// sendInitEmail(client, account.getString("username"), "*****"); - saveClientAuditProcess(client.getIntValue("client_id"), open_status_to, 5, "合规通过", manager,2); - - clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "skip_clearing", false)); -// gatewayMerchantApply.notifyOrgMerchantStatus(client); - } else { - //TODO 发送卡支付开通邮件 1.判断商户是否已开通跨境支付,若没有开通,init账号 -// initAdminUserAndSendEmail(manager, clientMoniker, client); - saveClientAuditProcess(client.getIntValue("client_id"), open_status_to, 5, "合规通过", manager,2); + List accounts = clientAccountMapper.listAdminAccounts(clientId); + if (accounts != null && accounts.size() > 0) { + sendInitEmail(client, accounts.get(0).getString("username"), "*******"); + }else { + initAdminUserAndSendEmail(manager, clientMoniker, client); } + saveClientAuditProcess(client.getIntValue("client_id"), open_status_to, 5, "合规通过", manager,2); } clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id")); } @@ -1296,9 +1286,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } private void initAdminUserAndSendEmail(JSONObject manager, String clientMoniker, JSONObject client) { - if (StringUtils.isEmpty(client.getString("sub_merchant_id"))) { - throw new BadRequestException("Sub Merchant ID Can't be null "); - } String username = clientMoniker; boolean duplicated = true; String pwd = RandomStringUtils.random(8, true, true);