diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index 5c5ebd61c..3eea6ae23 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -390,7 +390,10 @@ func AddAuthBind(user IUser, newAuthInfo *AuthInfo) (err error) { func AddAuthBindWithMobile(authInfo *AuthInfo, mobile string) (err error) { if handler := authers[authInfo.AuthBindInfo.Type]; handler != nil { - user, _ := dao.GetUserByID(dao.GetDB(), "mobile", mobile) + user, err := dao.GetUserByID(dao.GetDB(), "mobile", mobile) + if err != nil { + return errors.New("此接口有执行顺序,请先调用注册登录接口:【第一步:Login,第二不:TiktokDecrypt】") + } authInfo.AuthBindInfo.UserID = user.UserID //handler.UnbindAuth(user.GetID(), newAuthInfo.GetAuthType(), newAuthInfo.GetAuthTypeID(), user.GetName()) err = handler.AddAuthBind(authInfo.AuthBindInfo, user.GetName())