From 962985fa0a285cdc9cdd5c550150464047141134 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Mon, 25 Dec 2017 19:59:15 +0800 Subject: [PATCH] update --- .../core/impls/ClientManagerImpl.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 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 3fc376b84..097c7ca93 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 @@ -560,19 +560,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid String username = clientMoniker + client.getString("sub_merchant_id"); boolean duplicated = true; String pwd = RandomStringUtils.random(8, true, true); -// while (duplicated) { -// NewAccountBean account = new NewAccountBean(); -// account.setDisplayName(clientMoniker + " Admin"); -// account.setRole(PartnerRole.ADMIN.getCode()); -// account.setUsername(username); -// account.setPwd(pwd); -// try { -// newAccount(clientMoniker, account, manager, 1); -// duplicated = false; -// } catch (Exception e) { -// username += "1"; -// } -// } + while (duplicated) { + NewAccountBean account = new NewAccountBean(); + account.setDisplayName(clientMoniker + " Admin"); + account.setRole(PartnerRole.ADMIN.getCode()); + account.setUsername(username); + account.setPwd(pwd); + try { + newAccount(clientMoniker, account, manager, 1); + duplicated = false; + } catch (Exception e) { + username += "1"; + } + } sendInitEmail(client, username, pwd); }