From b7db80a5afb38959bbe64b55ffcccb35291c9e72 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Thu, 11 Aug 2022 18:15:21 +0800 Subject: [PATCH] test --- business/auth2/auth2.go | 3 ++- business/auth2/authprovider/defauther.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index 07288ae7d..066ef3ed2 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -263,6 +263,7 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string } else { // 返回authBind中UserID为空表示只是认证,但本地没有记录,这种情况会返回临时TOKEN if authBindEx.UserHint != nil && authBindEx.UserID == "" { + globals.SugarLogger.Debug("进入") // 利用得到受信任的信息查找用户 // if authBindEx.UserHint.Mobile != "" { // user = userProvider.GetUser(authBindEx.UserHint.Mobile, UserIDMobile) @@ -273,7 +274,7 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string // if user != nil { // authBindEx.UserID = user.GetID() // } - + //if user3:=api.DingDingAPI.GetUserID(a) if user2 := userProvider.GetUser(authBindEx.UserHint.Email, UserIDMobile); user2 != nil { user = user2 } diff --git a/business/auth2/authprovider/defauther.go b/business/auth2/authprovider/defauther.go index d4836f048..8133e5eb8 100644 --- a/business/auth2/authprovider/defauther.go +++ b/business/auth2/authprovider/defauther.go @@ -80,9 +80,9 @@ func (a *DefAuther) UnionFindAuthBind(curAuthType, curAuthTypeID string, unionAu dao.UpdateEntity(db, authBind, "TypeID") } } else if dao.IsNoRowsError(err) { // 直接找不到,尝试unionID - if unionID != "" || openID != "" { // 且有unionID + if unionID != "" { // 且有unionID var authBindList []*model.AuthBind - authBindList, err = dao.GetUserBindAuthInfo(db, "", model.AuthBindTypeAuth, unionAuthTypeList, openID, unionID, nil) + authBindList, err = dao.GetUserBindAuthInfo(db, "", model.AuthBindTypeAuth, unionAuthTypeList, "", unionID, nil) if err != nil { return nil, err }