fix
This commit is contained in:
@@ -65,7 +65,7 @@ func InheritGuestIdResource(tx *gorm.DB, userId, guestId int64, afterDo func(txR
|
||||
if guestId != 0 {
|
||||
// 继承guest_id的资源表
|
||||
err = txRes.
|
||||
Where("guest_id = ?", guestId).
|
||||
Where("guest_id = ? and module != 'clear' and module != 'temp'", guestId).
|
||||
UpdateColumn("user_id", userId).Error
|
||||
if err != nil && err != gorm.ErrRecordNotFound {
|
||||
|
||||
@@ -73,7 +73,7 @@ func InheritGuestIdResource(tx *gorm.DB, userId, guestId int64, afterDo func(txR
|
||||
}
|
||||
|
||||
err = txUserMaterial.
|
||||
Where("guest_id = ?", guestId).
|
||||
Where("guest_id = ? and module != 'clear' and module != 'temp'", guestId).
|
||||
UpdateColumn("user_id", userId).Error
|
||||
|
||||
if err != nil && err != gorm.ErrRecordNotFound {
|
||||
@@ -82,7 +82,7 @@ func InheritGuestIdResource(tx *gorm.DB, userId, guestId int64, afterDo func(txR
|
||||
}
|
||||
|
||||
err = txUserInfo.
|
||||
Where("guest_id = ?", guestId).
|
||||
Where("guest_id = ? and module != 'clear' and module != 'temp' ", guestId).
|
||||
UpdateColumn("user_id", userId).Error
|
||||
logx.Info(err, "guest_id = ", guestId)
|
||||
if err != nil && err != gorm.ErrRecordNotFound {
|
||||
|
||||
Reference in New Issue
Block a user