This commit is contained in:
Mrx
2026-02-04 17:09:17 +08:00
parent 1a44eab144
commit bfbdf983b0
38 changed files with 1719 additions and 1725 deletions

View File

@@ -68,6 +68,9 @@ func (l *MobileCodeLoginLogic) MobileCodeLogin(req *types.MobileCodeLoginReq) (r
userID = registeredUserID
l.Infof("手机登录, 自动注册用户成功, userId: %s, mobile: %s", userID, encryptedMobile)
} else {
if user.Disable == 1 {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.USER_DISABLED), "用户已被封禁")
}
userID = user.Id
}
token, err := l.svcCtx.UserService.GeneralUserToken(l.ctx, userID)