From db2c41f0ce3327b24aede801aa31b720e32709de Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 14:40:08 +0800 Subject: [PATCH] fix --- model/gmodel/fs_user_logic.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model/gmodel/fs_user_logic.go b/model/gmodel/fs_user_logic.go index 2931ef26..87c1c487 100644 --- a/model/gmodel/fs_user_logic.go +++ b/model/gmodel/fs_user_logic.go @@ -6,9 +6,9 @@ import ( "fmt" "fusenapi/utils/auth" - "log" "time" + "github.com/zeromicro/go-zero/core/logx" "gorm.io/gorm" ) @@ -159,7 +159,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT user.LastName = &LastName err = UserTx.Create(user).Error - log.Println("create") + logx.Info("create") if err != nil { return err } @@ -200,7 +200,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT return err }) - if err != nil { + if err != nil && err != gorm.ErrRecordNotFound { return nil, err }