|
|
|
@ -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"))) {
|
|
|
|
|