From 06561d3c6725a353d79480948d6a02753742ca18 Mon Sep 17 00:00:00 2001 From: duLingLing Date: Thu, 7 Nov 2019 15:06:26 +0800 Subject: [PATCH] =?UTF-8?q?UPD:=E4=BF=AE=E5=A4=8D=E5=95=86=E6=88=B7-?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=B4=A6=E5=8F=B7=E7=BB=91=E5=AE=9A=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../merchants/core/impls/ClientManagerImpl.java | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index dce5495b6..b822fce08 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.2.76 + 1.2.77 UTF-8 1.6.1 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 7734f5090..d1539284d 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 @@ -1653,8 +1653,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (account == null) { throw new BadRequestException("account not exists"); } - if (clientAccountMapper.findByWechatOpenId(user.getString("openid")).size()>0 || clientAccountMapper.findByWechatUnionId(user.getString("unioinid")).size()>0) { - throw new BadRequestException("The WeChat has been linked to other accounts"); + if(user.getString("openid")!=null && !"".equals(user.getString("openid"))) { + if (clientAccountMapper.findByWechatOpenId(user.getString("openid")).size() > 0) { + throw new BadRequestException("The WeChat has been linked to other accounts"); + } + } + if(user.getString("unioinid")!=null && !"".equals(user.getString("unioinid"))){ + if(clientAccountMapper.findByWechatUnionId(user.getString("unioinid")).size()>0 ){ + throw new BadRequestException("The WeChat has been linked to other accounts"); + } } JSONObject res = new JSONObject(); if (StringUtils.equals(user.getString("openid"), account.getString("wechat_openid"))) {