From 29dc02371d48820fa68c28d89c2e8dfe9a385653 Mon Sep 17 00:00:00 2001 From: dengbw Date: Tue, 30 Aug 2022 17:32:55 +0800 Subject: [PATCH] order_830_3 --- admin/controllers/stats/Order.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/controllers/stats/Order.php b/admin/controllers/stats/Order.php index a6c9527a..7ed9c983 100644 --- a/admin/controllers/stats/Order.php +++ b/admin/controllers/stats/Order.php @@ -455,7 +455,7 @@ class order extends HD_Controller foreach ($days as $k3 => $v3) { $order_time = $this->getTime($k3); $c_time = $this->getTime($k3, 1); - //进店数 + //成交数 if ($params['type'] == 2) { $num_ord = $this->mdOrders->db->select('a.id') ->from('lc_receiver_orders_v2 as a') @@ -487,7 +487,7 @@ class order extends HD_Controller $num_into = 0; if ($params['type'] == 2) { $where_into = ['a.type' => 4, 'a.log' => '客户到店', 'a.c_time>=' => $c_time['s_time'], 'a.c_time<=' => $c_time['e_time'], - 'b.status>=' => 0, "b.biz_id in({$v['ids']})" => null, 'b.of_id' => $k2]; + 'b.status>=' => 0, 'b.of_id' => $k2]; if ($v['show'] == 'order') { if ($v['customer_ids'][$k3]) { $num_into = $this->mdUsersLog->db->select('a.id') @@ -500,12 +500,12 @@ class order extends HD_Controller $num_into = $this->mdUsersLog->db->select('a.id') ->from('lc_receiver_customer_oplogs as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where($where_into) + ->where(array_merge($where_into, ["b.biz_id in({$v['ids']})" => null])) ->count_all_results(); } } else { $where_into = ['a.type' => 4, 'a.log' => '客户到店', 'a.c_time>=' => $c_time['s_time'], 'a.c_time<=' => $c_time['e_time'], - 'b.status>=' => 0, "b.biz_id in({$v['ids']})" => null, 'b.of_id' => $k2, 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]; + 'b.status>=' => 0, 'b.of_id' => $k2, 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]; if ($v['show'] == 'order') { if ($v['customer_ids'][$k3]) { $num_into = $this->mdUsersLog->db->select('a.id') @@ -518,7 +518,7 @@ class order extends HD_Controller $num_into = $this->mdUsersLog->db->select('a.id') ->from('lc_receiver_customer_oplogs as a') ->join('lc_receiver_customers as b', "b.id=a.customer_id", 'left') - ->where($where_into) + ->where(array_merge($where_into, ["b.biz_id in({$v['ids']})" => null])) ->count_all_results(); } }