This commit is contained in:
Mrx
2026-02-02 13:15:13 +08:00
parent e30a5d3342
commit e44793c89e
15 changed files with 97 additions and 39 deletions

View File

@@ -64,6 +64,10 @@ func (l *MobileCodeLoginLogic) MobileCodeLogin(req *types.MobileCodeLoginReq) (r
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "手机登录, 注册用户失败: %+v", err)
}
} else {
// 封禁用户禁止登录
if user.Disable == model.UserDisableBanned {
return nil, xerr.NewErrCode(xerr.USER_DISABLED)
}
userID = user.Id
}
token, err := l.svcCtx.UserService.GeneralUserToken(l.ctx, userID, model.UserTypeNormal)