From 63798c4fa60ebb11dd47377b9af0bb8d79d9e6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Mon, 27 Jun 2022 18:46:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=96=E9=9F=B3=E6=8E=A5=E5=8F=A3=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/auth2/auth2.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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())