order_826_2

This commit is contained in:
dengbw
2022-08-26 17:29:52 +08:00
parent a5ee2c060e
commit 6d56878b75
+12 -12
View File
@@ -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();
}