From d884624aad6fb40f7c0bca5a116d79e4055d380b Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Tue, 29 Aug 2023 15:15:39 +0800 Subject: [PATCH] fix --- model/gmodel/fs_user_logic.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/gmodel/fs_user_logic.go b/model/gmodel/fs_user_logic.go index f331bec8..16f12b89 100644 --- a/model/gmodel/fs_user_logic.go +++ b/model/gmodel/fs_user_logic.go @@ -145,6 +145,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT err := u.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { var err error + UserTx := tx.Model(user) err = UserTx.Where("email = ?", token.Email).Take(user).Error if err == gorm.ErrRecordNotFound { @@ -203,6 +204,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT }) logcontent += "end" + logx.Error(err) if err != nil && err != gorm.ErrRecordNotFound { return nil, err }