This commit is contained in:
2023-09-21 23:47:34 +08:00
parent 45ef0b8bc9
commit 58e2068170
2 changed files with 4 additions and 4 deletions

View File

@@ -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 {