diff --git a/model/gmodel/fs_user_logic.go b/model/gmodel/fs_user_logic.go index ae9e50d7..50d5227c 100644 --- a/model/gmodel/fs_user_logic.go +++ b/model/gmodel/fs_user_logic.go @@ -137,15 +137,9 @@ type UserProfile struct { // 自平台的注册流程 func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterToken) (user *FsUser, err error) { - logcontent := "" - defer func() { - logx.Info("aaaa:", logcontent, " ", err.Error()) - }() - err = u.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error { user = &FsUser{} - var err error UserTx := tx.Model(user) err = UserTx.Where("email = ?", token.Email).Take(user).Error @@ -169,8 +163,6 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT return err } - logcontent += "create." - // 继承guest_id的资源表 err = InheritGuestIdResource(tx, user.Id, token.GuestId, func(txResouce, txUserMaterial, txUserInfo *gorm.DB) error { userProfile := &UserProfile{ @@ -191,13 +183,11 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT Ctime: &now, Utime: &now, } - logcontent += "profile." err = txUserInfo.Create(uinfo).Error if err == gorm.ErrRecordNotFound { return nil } - return err }) @@ -210,7 +200,6 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT return fmt.Errorf("the email had registered") }) - logcontent += "end" if err != nil && err != gorm.ErrRecordNotFound { return nil, err }