mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-09-03 05:14:18 +08:00
feat 优化微信授权的功能
This commit is contained in:
@@ -448,13 +448,15 @@ public class UserServiceImpl implements IUserService {
|
|||||||
|
|
||||||
// 已有授权,返回已绑定微信。 没有授权,绑定微信
|
// 已有授权,返回已绑定微信。 没有授权,绑定微信
|
||||||
if (!StringUtils.isBlank(unionId)) {
|
if (!StringUtils.isBlank(unionId)) {
|
||||||
UserAuth userAuthUnionId = userAuthMapper.selectOne(new QueryWrapper<UserAuth>()
|
if (unionId.equals("0") == false) {
|
||||||
.eq("unionid", unionId)
|
UserAuth userAuthUnionId = userAuthMapper.selectOne(new QueryWrapper<UserAuth>()
|
||||||
.last("limit 1"));
|
.eq("unionid", unionId)
|
||||||
|
.last("limit 1"));
|
||||||
|
|
||||||
if (userAuthUnionId != null && !userId.equals(userAuthUnionId.getUserId())) {
|
if (userAuthUnionId != null && !userId.equals(userAuthUnionId.getUserId())) {
|
||||||
// 该微信已绑定
|
// 该微信已绑定
|
||||||
throw new OperateException("该微信已绑定");
|
throw new OperateException("该微信已绑定");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user