From a9bb6143b505b4f43746be547b5cca7f595e3158 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Tue, 29 May 2018 17:45:18 +0800 Subject: [PATCH] update --- .../application/core/impls/SimpleClientApplyServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java index 21561226e..22b1bb925 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java @@ -163,6 +163,9 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { if (client == null) { throw new BadRequestException("Merchant not found"); } + if(client.getBooleanValue("mail_confirm")){ + throw new BadRequestException("mail address has been verified"); + } String key = checkOrGenerateVerifyMailKey(address, null); Context ctx = new Context(); ctx.setVariable("url", PlatformEnvironment.getEnv().concatUrl("/register/account/mail/" + address + "/verify/" + key + "/jump?username="+username)); @@ -292,6 +295,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { sysClient.put("merchant_id", availableMerchant.getMerchantId()); sysClient.put("sub_merchant_id",tempSubMerchantId); sysClient.put("common_sub_merchant_id",1); + sysClient.put("credential_code", RandomStringUtils.random(32, true, true)); clientMapper.save(sysClient); int clientId = sysClient.getIntValue("client_id");