触犯红线通知

This commit is contained in:
Rosy-zhudan
2019-09-27 17:59:39 +08:00
parent 6f579e7f1b
commit 0c0ac4fd69
2 changed files with 30 additions and 25 deletions

View File

@@ -462,7 +462,7 @@ func GetStandardPickTimeOrderCountByDaDa(db *DaoDB, dayNum int, includeToday boo
//按时履约订单量, 仅统计商家自送门店
func GetStandardFinishTimeOrderCountBySelfDelivery(db *DaoDB, dayNum int, includeToday bool) (storeCountList []*model.StoreCount, err error) {
sql := `
SELECT jx_store_id store_id, order_created_at orderCreateTime, order_finished_at orderFinishTime
SELECT jx_store_id store_id, order_created_at, order_finished_at
FROM goods_order
where order_finished_at >= ? AND order_finished_at <= ?
AND status = ?
@@ -523,11 +523,9 @@ func GetStandardPickUpTimeOrderCountByDaDa(db *DaoDB, dayNum int, includeToday b
if err == nil && len(storeOrderStatusList) > 0 {
for _, value := range storeOrderStatusList {
if storeOrderTimeMapData[value.StoreID] == nil {
storeOrderTimeSubList := []*model.StoreOrderStatus{}
storeOrderTimeMapData[value.StoreID] = storeOrderTimeSubList
storeOrderTimeMapData[value.StoreID] = []*model.StoreOrderStatus{}
}
storeOrderTimeSubList := storeOrderTimeMapData[value.StoreID]
storeOrderTimeSubList = append(storeOrderTimeSubList, value)
storeOrderTimeMapData[value.StoreID] = append(storeOrderTimeMapData[value.StoreID], value)
}
for storeID, valueList := range storeOrderTimeMapData {
count := 0
@@ -556,7 +554,9 @@ func GetStandardPickUpTimeOrderCountByDaDa(db *DaoDB, dayNum int, includeToday b
count++
}
}
storeCountList = append(storeCountList, &model.StoreCount{storeID, count})
if count > 0 {
storeCountList = append(storeCountList, &model.StoreCount{storeID, count})
}
}
}