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