fix
This commit is contained in:
parent
d3c96184b8
commit
ff011f6452
|
@ -68,7 +68,7 @@ func InheritGuestIdResource(tx *gorm.DB, userId, guestId int64, afterDo func(txR
|
|||
Where("guest_id = ?", guestId).
|
||||
UpdateColumn("user_id", userId).Error
|
||||
if err != nil && err != gorm.ErrRecordNotFound {
|
||||
logx.Info(err, "找到user_id1 afterDo")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -77,16 +77,16 @@ func InheritGuestIdResource(tx *gorm.DB, userId, guestId int64, afterDo func(txR
|
|||
UpdateColumn("user_id", userId).Error
|
||||
|
||||
if err != nil && err != gorm.ErrRecordNotFound {
|
||||
logx.Info(err, "找到user_id1 afterDo")
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
err = txUserInfo.
|
||||
Where("guest_id = ?", guestId).
|
||||
UpdateColumn("user_id", userId).Error
|
||||
|
||||
logx.Info(err, "guest_id = ", guestId)
|
||||
if err != nil && err != gorm.ErrRecordNotFound {
|
||||
logx.Info(err, "找到user_id1 afterDo")
|
||||
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
@ -225,9 +225,11 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
|
|||
// txUserInfo.Statement.Table
|
||||
|
||||
if err != nil {
|
||||
logx.Info(err)
|
||||
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
logx.Info(err)
|
||||
err = txUserInfo.Create(uinfo).Error
|
||||
logx.Info(err)
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user