Upd:修复管理端微信绑定查询已绑定用户报错问题

master
duLingLing 5 years ago
parent ded82ea5d9
commit 5ba4873bfa

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

@ -94,5 +94,9 @@ public interface ClientAccountMapper {
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1", excludeColumns = {"salt", "password_hash"})
JSONObject findByWechatOpenId(@Param("wechat_openid")String openid);
List<JSONObject> findByWechatOpenId(@Param("wechat_openid")String openid);
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1", excludeColumns = {"salt", "password_hash"})
List<JSONObject> findByWechatUnionId(@Param("wx_unionid")String unionId);
}

@ -1653,7 +1653,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (account == null) {
throw new BadRequestException("account not exists");
}
if (clientAccountMapper.findByWechatOpenId(user.getString("openid")) != null || clientAccountMapper.findByWxUnioinId(user.getString("unioinid")) != null) {
if (clientAccountMapper.findByWechatOpenId(user.getString("openid")).size()>1 || clientAccountMapper.findByWechatUnionId(user.getString("unioinid")).size()>1) {
throw new BadRequestException("The WeChat has been linked to other accounts");
}
JSONObject res = new JSONObject();

Loading…
Cancel
Save