This commit is contained in:
gazebo
2020-01-06 16:54:54 +08:00
parent 170cd63936
commit c92996a1d9

View File

@@ -153,11 +153,11 @@ func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVeri
createName := ctx.GetRealRemoteIP()
authType := auth2.AuthTypeMobile
if manTokenInfo != nil && mobileVerifyCode == "" {
user, err2 := dao.GetUserByID(dao.GetDB(), "user_id", manTokenInfo.GetID())
manUser, err2 := dao.GetUserByID(dao.GetDB(), "user_id", manTokenInfo.GetID())
if err = err2; err != nil {
return nil, err
}
if user.Type&(model.UserTypeOperator|model.UserTypeBoss) == 0 {
if manUser.Type&(model.UserTypeOperator|model.UserTypeBoss) == 0 {
return nil, fmt.Errorf("管理员才能添加商户")
}
if utils.Pointer2String(user.Mobile) == "" {