- SaveStoresVendorSnapshot中清除两天前的平台商品快照状态
This commit is contained in:
@@ -284,3 +284,12 @@ func GetVendorStoreSnapshot(db *DaoDB, excludeSnapshotAt time.Time) (snapshotLis
|
||||
err = GetRows(db, &snapshotList, sql, time.Now().Add(-48*time.Hour), excludeSnapshotAt)
|
||||
return snapshotList, err
|
||||
}
|
||||
|
||||
func DeleteVendorStoreSnapshot(db *DaoDB, minSnapshotAt time.Time) (err error) {
|
||||
_, err = ExecuteSQL(db, `
|
||||
DELETE t1
|
||||
FROM vendor_store_snapshot t1
|
||||
WHERE t1.snapshot_at < ?
|
||||
`, minSnapshotAt)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user