UPD:修复商户-用户账号绑定异常问题

master
duLingLing 5 years ago
parent f2ecb8a575
commit 06561d3c67

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.2.76</version> <version>1.2.77</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.6.1</jib-maven-plugin.version> <jib-maven-plugin.version>1.6.1</jib-maven-plugin.version>

@ -1653,8 +1653,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (account == null) { if (account == null) {
throw new BadRequestException("account not exists"); throw new BadRequestException("account not exists");
} }
if (clientAccountMapper.findByWechatOpenId(user.getString("openid")).size()>0 || clientAccountMapper.findByWechatUnionId(user.getString("unioinid")).size()>0) { if(user.getString("openid")!=null && !"".equals(user.getString("openid"))) {
throw new BadRequestException("The WeChat has been linked to other accounts"); 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(); JSONObject res = new JSONObject();
if (StringUtils.equals(user.getString("openid"), account.getString("wechat_openid"))) { if (StringUtils.equals(user.getString("openid"), account.getString("wechat_openid"))) {

Loading…
Cancel
Save