fix
This commit is contained in:
parent
45ef0b8bc9
commit
58e2068170
|
@ -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 {
|
||||
|
|
|
@ -59,7 +59,7 @@ func MetadataModulePATCH(tx *gorm.DB, module string, tableStructPointer any, upd
|
|||
WHEN metadata IS NULL THEN ?
|
||||
ELSE JSON_MERGE_PATCH(metadata, ?)
|
||||
END
|
||||
WHERE order_sn = '%s' and %s;`
|
||||
WHERE module = '%s' and %s;`
|
||||
|
||||
var err error
|
||||
var metadata []byte
|
||||
|
|
Loading…
Reference in New Issue
Block a user