From b41ec6f817d0164b4c545ee7ff6689283da44ce8 Mon Sep 17 00:00:00 2001 From: dengbw Date: Tue, 16 Aug 2022 17:46:11 +0800 Subject: [PATCH] order_816_3 --- admin/controllers/stats/Order.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/admin/controllers/stats/Order.php b/admin/controllers/stats/Order.php index 48a113b4..34f7941d 100644 --- a/admin/controllers/stats/Order.php +++ b/admin/controllers/stats/Order.php @@ -165,16 +165,12 @@ class order extends HD_Controller 'b.status>=' => 0, 'b.biz_id' => $k, 'b.of_id' => $k2]) ->count_all_results(); } else { - if ($params['num_into']) { - $num_into = $params['num_into']; - } else { - $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(['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' => $k, 'b.of_id' => $k2, 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]) - ->count_all_results(); - } + $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(['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' => $k, 'b.of_id' => $k2, 'b.c_time>=' => $c_time['s_time'], 'b.c_time<=' => $c_time['e_time']]) + ->count_all_results(); } $into_sum[$k3] += $num_into; $stats_into[] = $num_into;