f
This commit is contained in:
@@ -49,7 +49,14 @@ func (l *WxH5AuthLogic) WxH5Auth(req *types.WXH5AuthReq) (resp *types.WXH5AuthRe
|
||||
var userID int64
|
||||
var userType int64
|
||||
if userAuth != nil {
|
||||
// 已存在用户,直接登录
|
||||
// 已存在用户,直接登录(被封禁用户禁止登录)
|
||||
user, err := l.svcCtx.UserModel.FindOne(l.ctx, userAuth.UserId)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "查询用户失败: %v", err)
|
||||
}
|
||||
if user.Disable == 1 {
|
||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.USER_DISABLED), "账号已被封禁")
|
||||
}
|
||||
userID = userAuth.UserId
|
||||
userType = model.UserTypeNormal
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user