order_830_3

This commit is contained in:
dengbw
2022-08-30 17:32:55 +08:00
parent b65a4e3068
commit 6991fa5847
+5 -5
View File
@@ -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();
}
}