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 }