fix
This commit is contained in:
parent
a71eca725e
commit
68a8d7ee4d
@ -66,7 +66,7 @@ func (l *ApplyForAgentLogic) ApplyForAgent(req *types.AgentApplyReq) (resp *type
|
|||||||
// 两种情况,1. 已注册账号然后申请代理 2. 未注册账号申请代理
|
// 两种情况,1. 已注册账号然后申请代理 2. 未注册账号申请代理
|
||||||
user, findUserErr := l.svcCtx.UserModel.FindOneByMobile(l.ctx, sql.NullString{String: encryptedMobile, Valid: true})
|
user, findUserErr := l.svcCtx.UserModel.FindOneByMobile(l.ctx, sql.NullString{String: encryptedMobile, Valid: true})
|
||||||
if findUserErr != nil && !errors.Is(findUserErr, model.ErrNotFound) {
|
if findUserErr != nil && !errors.Is(findUserErr, model.ErrNotFound) {
|
||||||
return errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "代理申请, 读取数据库获取用户失败, mobile: %s, err: %+v", encryptedMobile, err)
|
return errors.Wrapf(xerr.NewErrCode(xerr.DB_ERROR), "代理申请, 读取数据库获取用户失败, mobile: %s, err: %+v", encryptedMobile, findUserErr)
|
||||||
}
|
}
|
||||||
if user == nil {
|
if user == nil {
|
||||||
if claims != nil && claims.UserType == model.UserTypeNormal {
|
if claims != nil && claims.UserType == model.UserTypeNormal {
|
||||||
|
Loading…
Reference in New Issue
Block a user