- GetStores返回订单数据OrderCount

This commit is contained in:
gazebo
2019-06-28 14:07:29 +08:00
parent 5c8a5c157a
commit be0aca2865

View File

@@ -45,6 +45,8 @@ type StoreExt struct {
CourierMapStr string `json:"-"`
StoreMaps []interface{} `orm:"-"`
CourierMaps []interface{} `orm:"-"`
OrderCount int `json:"orderCount"`
}
type StoresInfo struct {
@@ -387,6 +389,7 @@ func filterStoreByOrderInfo(db *dao.DaoDB, inStores []*StoreExt, orderTimeFrom,
for _, v := range inStores {
orderCount := storeOrderCountMap[v.ID]
if orderCount >= orderCountFrom && orderCount <= orderCountTo {
v.OrderCount = orderCount
outStores = append(outStores, v)
}
}