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 }