From 32fbf9491bdbab0dd207d1e4a600299bb8df46bb Mon Sep 17 00:00:00 2001 From: richboo111 Date: Mon, 22 Aug 2022 10:41:45 +0800 Subject: [PATCH] =?UTF-8?q?wx=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/auth2/auth2.go | 2 ++ controllers/auth2.go | 1 + 2 files changed, 3 insertions(+) diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index f838bfffc..9457d05cb 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -396,11 +396,13 @@ 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, err := dao.GetUserByID(dao.GetDB(), "mobile", mobile) + globals.SugarLogger.Debug("user===============", user) if err != nil { return errors.New("此接口有执行顺序,请先调用注册登录接口:【第一步:Login,第二不:TiktokDecrypt】") } authInfo.AuthBindInfo.UserID = user.UserID //handler.UnbindAuth(user.GetID(), newAuthInfo.GetAuthType(), newAuthInfo.GetAuthTypeID(), user.GetName()) + globals.SugarLogger.Debug("authInfo.AuthBindInfo,user.GetName()===============", authInfo.AuthBindInfo, user.GetName()) err = handler.AddAuthBind(authInfo.AuthBindInfo, user.GetName()) } else { err = ErrIllegalAuthType diff --git a/controllers/auth2.go b/controllers/auth2.go index 27ac53507..16dd72bdd 100644 --- a/controllers/auth2.go +++ b/controllers/auth2.go @@ -343,6 +343,7 @@ func (c *Auth2Controller) AddAuthBindWithMobile() { if err != nil { return retVal, "", err } + globals.SugarLogger.Debug("打印newAuthInfo==============", newAuthInfo) err = auth2.AddAuthBindWithMobile(newAuthInfo, params.Mobile) return retVal, "", err })