This commit is contained in:
Rosy-zhudan
2019-09-17 08:31:04 +08:00
13 changed files with 350 additions and 11 deletions

View File

@@ -0,0 +1,2 @@
package dao

View File

@@ -301,9 +301,11 @@ func FormalizeStoreStatus(db *DaoDB, storeID, storeStatus int) (err error) {
func GetVendorStoreSnapshot(db *DaoDB, snapshotAt time.Time) (snapshotList []*model.VendorStoreSnapshot, err error) {
sql := `
SELECT *
SELECT t1.*
FROM vendor_store_snapshot t1
WHERE t1.snapshot_at = ?`
LEFT JOIN store t2 ON t2.id = t1.store_id
WHERE t1.snapshot_at = ?
ORDER BY t2.city_code, t1.store_id, t1.vendor_id`
err = GetRows(db, &snapshotList, sql, snapshotAt)
return snapshotList, err
}