This commit is contained in:
Mrx
2026-02-02 14:58:48 +08:00
parent 67eea00b63
commit 11c1c2f930
18 changed files with 124 additions and 37 deletions

View File

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