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

@@ -79,6 +79,10 @@ func (l *ApplyForAgentLogic) ApplyForAgent(req *types.AgentApplyReq) (resp *type
return errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "代理申请, 注册用户失败: %+v", err)
}
} else {
// 被封禁用户禁止登录/申请
if user.Disable == 1 {
return errors.Wrapf(xerr.NewErrCode(xerr.USER_DISABLED), "账号已被封禁")
}
if claims != nil && claims.UserType == model.UserTypeTemp {
// 临时用户,转为正式用户
err = l.svcCtx.UserService.TempUserBindUser(l.ctx, session, user.Id)