This commit is contained in:
邹宗楠
2023-08-15 10:27:51 +08:00
parent 55713f7477
commit bacb4d8d5e
6 changed files with 285 additions and 30 deletions

View File

@@ -1691,3 +1691,19 @@ func GetStoreBaseByVendorStoreID(vendorStoreID string, vendorID int) (storeDetai
}
return storeDetail, err
}
type StatisticsStore struct {
Count int64 `json:"count"` // 条数
Status int `json:"status"` // 状态
}
// StatisticsStoreInfo 统计所有的门店信息
func StatisticsStoreInfo() ([]*StatisticsStore, error) {
statistics := make([]*StatisticsStore, 0, 0)
sql := ` select count(s.status) , s.status from store s GROUP BY s.status `
if err := GetRows(GetDB(), &statistics, sql, nil); err != nil {
return nil, err
}
return statistics, nil
}