From 9d5381a8d8c8c7e6293195bc20e758142b639dbe Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 8 Mar 2019 16:03:27 +0800 Subject: [PATCH] - up --- business/auth2/auth2.go | 4 ++-- business/auth2/authprovider/defauther.go | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index 9e067656b..b2023d43c 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -123,9 +123,9 @@ func createAuthInfo(user IUser, authBindInfo *AuthBindEx) (authInfo *AuthInfo) { } if user != nil { authInfo.UpdateByIUser(user) - globals.SugarLogger.Debugf("CreateAuthInfo id:%s, id2:%s, authInfo:%s", authInfo.GetID(), authInfo.GetID2(), authInfo.GetMobile(), utils.Format4Output(authInfo, true)) + globals.SugarLogger.Debugf("createAuthInfo id:%s, id2:%s, mobile:%s, authInfo:%s", authInfo.GetID(), authInfo.GetID2(), authInfo.GetMobile(), utils.Format4Output(authInfo, true)) } else { - globals.SugarLogger.Debugf("CreateAuthInfo authInfo:%s", utils.Format4Output(authInfo, true)) + globals.SugarLogger.Debugf("createAuthInfo authInfo:%s", utils.Format4Output(authInfo, true)) } SetUserInfo(token, authInfo, DefTokenDuration) return authInfo diff --git a/business/auth2/authprovider/defauther.go b/business/auth2/authprovider/defauther.go index 21fd4f30e..593728c93 100644 --- a/business/auth2/authprovider/defauther.go +++ b/business/auth2/authprovider/defauther.go @@ -14,9 +14,10 @@ type DefAuther struct { // 此函数为空 func (a *DefAuther) AddAuthBind(authBindEx *auth2.AuthBindEx, userName string) (err error) { - dao.WrapAddIDCULDEntity(&authBindEx.AuthBind, userName) - authBindEx.Status = model.AuthBindStatusNormal - err = dao.CreateEntity(nil, &authBindEx.AuthBind) + authBind := &authBindEx.AuthBind + dao.WrapAddIDCULDEntity(authBind, userName) + authBind.Status = model.AuthBindStatusNormal + err = dao.CreateEntity(nil, authBind) return err }