diff --git a/business/model/dao/mt_avtivity_station.go b/business/model/dao/mt_avtivity_station.go index c2562c1b3..d298e7566 100644 --- a/business/model/dao/mt_avtivity_station.go +++ b/business/model/dao/mt_avtivity_station.go @@ -65,6 +65,7 @@ func GetStatistics(db *DaoDB, startTime, endTime time.Time, storeId []int, offse type StatisticsOrderObj struct { OrderCount int64 `json:"order_count"` + StoreCount int64 `json:"store_count"` Name string `json:"name"` Mobile string `json:"mobile"` } @@ -74,6 +75,7 @@ func StatisticsOrderCount(db *DaoDB, startTime, endTime time.Time, storeId []int sql := ` SELECT SQL_CALC_FOUND_ROWS COUNT(a.vendor_order_id) AS order_count, + COUNT(DISTINCT b.id) AS store_count, c.name AS name, c.mobile AS mobile FROM goods_order a