- 门店报警信息按城市排序

This commit is contained in:
gazebo
2019-09-16 15:33:29 +08:00
parent 0a0c051d50
commit ea58ab6f79
2 changed files with 5 additions and 2 deletions

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
}