order_816

This commit is contained in:
dengbw
2022-08-16 16:40:17 +08:00
parent 6abfbfabc5
commit 764403f107
+10 -6
View File
@@ -158,12 +158,16 @@ class order extends HD_Controller
}
//进店数
if ($params['type'] == 2) {
$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])
->count_all_results();
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])
->count_all_results();
}
} else {
$num_into = $this->mdUsersLog->db->select('a.id')
->from('lc_receiver_customer_oplogs as a')