diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 78f2c2275..a9955d1f8 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -394,6 +394,7 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro sql2 := ` SELECT COUNT(*) count FROM goods_order WHERE IF(store_id = 0, jx_store_id ,store_id) = ? + WHERE order_created_at > ? AND order_created_at < ? ` storeID := 0 if order.StoreID == 0 { @@ -401,7 +402,7 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro } else { storeID = order.StoreID } - sqlParams2 := []interface{}{storeID} + sqlParams2 := []interface{}{storeID, time.Now().Format("2006-01-02 00:00:00"), time.Now().Format("2006-01-02 23:59:59")} if err = dao.GetRow(db, &count, sql2, sqlParams2); err == nil { order.StoreDayOrderCount = count.Count }