diff --git a/model/gmodel/fs_user_logic.go b/model/gmodel/fs_user_logic.go index f331bec8..74fc6a00 100644 --- a/model/gmodel/fs_user_logic.go +++ b/model/gmodel/fs_user_logic.go @@ -136,15 +136,19 @@ type UserProfile struct { // 自平台的注册流程 func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterToken) (*FsUser, error) { + + var err error + user := &FsUser{} logcontent := "" defer func() { - logx.Info("aaaa:", logcontent) + logx.Info("aaaa:", logcontent, err) }() - err := u.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { + 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 {