From 6d56878b754994426885fdfb48b47dfbebe2f503 Mon Sep 17 00:00:00 2001 From: dengbw Date: Fri, 26 Aug 2022 17:29:52 +0800 Subject: [PATCH] order_826_2 --- admin/controllers/stats/Order.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/admin/controllers/stats/Order.php b/admin/controllers/stats/Order.php index fcadad43..497fc4d8 100644 --- a/admin/controllers/stats/Order.php +++ b/admin/controllers/stats/Order.php @@ -205,12 +205,12 @@ class order extends HD_Controller $order_time = $this->getTime($k2); $c_time = $this->getTime($k2, 1); if ($params['type'] == 2) { - $num = $this->mdOrders->count(["biz_id in({$str_ids})" => null, 'status>=' => 0, 'order_time>=' => $order_time['s_time'], 'order_time<=' => $order_time['e_time']]); + $num = $this->mdOrders->count(["biz_id in({$str_ids})" => null, 'status in(0,1)' => null, 'order_time>=' => $order_time['s_time'], 'order_time<=' => $order_time['e_time']]); } else { $num = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where(["a.biz_id in({$str_ids})" => null, 'a.status>=' => 0, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] + ->where(["a.biz_id in({$str_ids})" => null, 'a.status in(0,1)' => null, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] , 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]) ->count_all_results(); } @@ -230,12 +230,12 @@ class order extends HD_Controller $order_time = $this->getTime($k3); $c_time = $this->getTime($k3, 1); if ($params['type'] == 2) { - $num = $this->mdOrders->count(["biz_id in({$v['ids']})" => null, 'brand_id' => $k2, 'status>=' => 0, 'order_time>=' => $order_time['s_time'], 'order_time<=' => $order_time['e_time']]); + $num = $this->mdOrders->count(["biz_id in({$v['ids']})" => null, 'brand_id' => $k2, 'status in(0,1)' => null, 'order_time>=' => $order_time['s_time'], 'order_time<=' => $order_time['e_time']]); } else { $num = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where(["a.biz_id in({$v['ids']})" => null, 'a.brand_id' => $k2, 'a.status>=' => 0, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] + ->where(["a.biz_id in({$v['ids']})" => null, 'a.brand_id' => $k2, 'a.status in(0,1)' => null, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] , 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]) ->count_all_results(); } @@ -262,14 +262,14 @@ class order extends HD_Controller $num_ord = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where(["a.biz_id in({$v['ids']})" => null, 'a.status>=' => 0, 'a.order_time>=' => $order_time['s_time'] + ->where(["a.biz_id in({$v['ids']})" => null, 'a.status in(0,1)' => null, 'a.order_time>=' => $order_time['s_time'] , 'a.order_time<=' => $order_time['e_time'], 'b.of_id' => $k2]) ->count_all_results(); } else { $num_ord = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where(["a.biz_id in({$v['ids']})" => null, 'a.status>=' => 0, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] + ->where(["a.biz_id in({$v['ids']})" => null, 'a.status in(0,1)' => null, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] , 'b.of_id' => $k2, 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]) ->count_all_results(); } @@ -339,14 +339,14 @@ class order extends HD_Controller $num_ord = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where(["a.biz_id in({$v['ids']})" => null, 'a.status>=' => 0, 'a.order_time>=' => $order_time['s_time'] + ->where(["a.biz_id in({$v['ids']})" => null, 'a.status in(0,1)' => null, 'a.order_time>=' => $order_time['s_time'] , 'a.order_time<=' => $order_time['e_time'], 'b.of_id' => $k2]) ->count_all_results(); } else { $num_ord = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where(["a.biz_id in({$v['ids']})" => null, 'a.status>=' => 0, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] + ->where(["a.biz_id in({$v['ids']})" => null, 'a.status in(0,1)' => null, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] , 'b.of_id' => $k2, 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]) ->count_all_results(); } @@ -412,12 +412,12 @@ class order extends HD_Controller $c_time = $this->getTime($k2, 1); if ($params['type'] == 2) { $num = $this->mdOrders->count(["biz_id in({$str_ids})" => null, 'brand_id' => $brand_id, - 'status>=' => 0, 'order_time>=' => $order_time['s_time'], 'order_time<=' => $order_time['e_time']]); + 'status in(0,1)' => null, 'order_time>=' => $order_time['s_time'], 'order_time<=' => $order_time['e_time']]); } else { $num = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where(["a.biz_id in({$str_ids})" => null, 'a.brand_id' => $brand_id, 'a.status>=' => 0, 'a.order_time>=' => $order_time['s_time'] + ->where(["a.biz_id in({$str_ids})" => null, 'a.brand_id' => $brand_id, 'a.status in(0,1)' => null, 'a.order_time>=' => $order_time['s_time'] , 'a.order_time<=' => $order_time['e_time'], 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]) ->count_all_results(); } @@ -476,14 +476,14 @@ class order extends HD_Controller $num_ord = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where(["a.biz_id in({$v['ids']})" => null, 'a.brand_id' => $brand_id, 'a.status>=' => 0, 'a.order_time>=' => $order_time['s_time'] + ->where(["a.biz_id in({$v['ids']})" => null, 'a.brand_id' => $brand_id, 'a.status in(0,1)' => null, 'a.order_time>=' => $order_time['s_time'] , 'a.order_time<=' => $order_time['e_time'], 'b.of_id' => $k2]) ->count_all_results(); } else { $num_ord = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where(["a.biz_id in({$v['ids']})" => null, 'a.brand_id' => $brand_id, 'a.status>=' => 0, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] + ->where(["a.biz_id in({$v['ids']})" => null, 'a.brand_id' => $brand_id, 'a.status in(0,1)' => null, 'a.order_time>=' => $order_time['s_time'], 'a.order_time<=' => $order_time['e_time'] , 'b.of_id' => $k2, 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]) ->count_all_results(); }