From d3cb52c8696e3bc9bbf2138a352c56a5b6af4b54 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 6 Nov 2019 16:48:54 +0800 Subject: [PATCH 1/2] fix pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 05ac6f933..73e8b23bd 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.2.72 + 1.2.73 UTF-8 1.4.0 From 2212a028296f8ad2dd33fe00f6917429d95d8c7a Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 7 Nov 2019 06:55:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=20=E5=95=86=E6=88=B7=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=20size>0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/appclient/core/impls/RetailAppServiceImp.java | 2 +- .../application/core/impls/SimpleClientApplyServiceImpl.java | 4 ++-- .../manage/merchants/core/impls/ClientManagerImpl.java | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 73e8b23bd..6df944b8e 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.2.73 + 1.2.74 UTF-8 1.4.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java index 1e12421b4..b8388f94d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java @@ -2196,7 +2196,7 @@ public class RetailAppServiceImp implements RetailAppService { throw new BadRequestException("Verification code is wrong"); } List account = clientAccountMapper.findByPhone(contactPhone, "+" + nationCode); - if (account != null) { + if (account != null && account.size()>0) { throw new BadRequestException("Mobile phone number has been bound to other users, please unbind it before binding"); } 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 33cb0305b..3cc6c9bd0 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 @@ -281,7 +281,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { nation_code = "+" + nation_code; } List account = clientAccountMapper.findByPhone(contact_phone, nation_code); - if (account != null) { + if (account != null && account.size()>0) { throw new ForbiddenException("用户名已被注册"); } } @@ -599,7 +599,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { JSONObject apply = sysClientPreMapperMapper.findByUserName(username); List account = clientAccountMapper.findByPhone(apply.getString("contact_phone"), "+61"); - if (account != null) { + if (account != null && account.size() > 0) { throw new ForbiddenException("The user name has been registered"); } String clientMoniker = generateClientMoniker(); 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 fb8f5d81a..5eac5ab73 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 @@ -1579,7 +1579,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } private void checkPhoneAndWechatExist(NewAccountBean account) { - if (clientAccountMapper.findByPhone(account.getContactPhone(), account.getNation_code().startsWith("+")?account.getNation_code():"+"+account.getNation_code()) != null) { + List accounts = clientAccountMapper.findByPhone(account.getContactPhone(), account.getNation_code().startsWith("+") ? account.getNation_code() : "+" + account.getNation_code()); + if ( accounts != null && accounts.size()>0) { throw new BadRequestException("Mobile phone number has been bound to other accounts"); } }