This commit is contained in:
eson 2023-09-06 12:09:38 +08:00
parent 6d45293207
commit 729f085ed0

View File

@ -7,7 +7,6 @@ import (
"fusenapi/utils/auth" "fusenapi/utils/auth"
"fusenapi/utils/basic" "fusenapi/utils/basic"
"io" "io"
"log"
"net/http" "net/http"
"time" "time"
@ -73,7 +72,7 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us
return resp.SetStatus(basic.CodeOAuthGoogleApiErr, err.Error()) return resp.SetStatus(basic.CodeOAuthGoogleApiErr, err.Error())
} }
log.Println(r.Json()) logx.Error(r.Json())
googleId := r.Json().Get("id").Int() googleId := r.Json().Get("id").Int()
user, err := l.svcCtx.AllModels.FsUser.FindUserByGoogleId(context.TODO(), googleId) user, err := l.svcCtx.AllModels.FsUser.FindUserByGoogleId(context.TODO(), googleId)
@ -96,7 +95,9 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us
TraceId: uuid.NewString(), TraceId: uuid.NewString(),
CreateAt: time.Now().UTC(), CreateAt: time.Now().UTC(),
Extend: map[string]interface{}{ Extend: map[string]interface{}{
"google_id": googleId, "google_id": googleId,
"first_name": "",
"last_name": "",
}, },
} }