bug
This commit is contained in:
@@ -723,6 +723,7 @@ class Statistics extends Wxapp{
|
||||
protected function get_stats_days()
|
||||
{
|
||||
$days = intval($this->input_param('days'));
|
||||
$province_id = intval($this->input_param('province_id'));
|
||||
$city_id = intval($this->input_param('city_id'));
|
||||
!$days && $days = 7;
|
||||
$customers = $orders = $xAxis = [];
|
||||
@@ -733,10 +734,9 @@ class Statistics extends Wxapp{
|
||||
$xAxis[] = $days > 7 ? date('d', strtotime($s_time)) : date('n-d', strtotime($s_time));
|
||||
$where = [
|
||||
'status>=' => 0,
|
||||
'cs_biz_id!=' => -1,
|
||||
'c_time>=' => $c_time['s_time'],
|
||||
'c_time<=' => $c_time['e_time'],
|
||||
"biz_id in (select id from lc_biz where city_id={$city_id} and status=1)" => null
|
||||
"biz_id in (select id from lc_biz where province_id={$province_id} and status=1)" => null
|
||||
];
|
||||
$customers[] = $this->customers_model->count($where);
|
||||
$where = [
|
||||
@@ -744,8 +744,7 @@ class Statistics extends Wxapp{
|
||||
'order_time>=' => $o_time['s_time'],
|
||||
'order_time<=' => $o_time['e_time'],
|
||||
"customer_id in (
|
||||
select id from lc_receiver_customers where status>=0 and cs_biz_id!=-1 and
|
||||
biz_id in (select id from lc_biz where city_id={$city_id} and status=1)
|
||||
select id from lc_receiver_customers where status>=0 and biz_id in (select id from lc_biz where province_id={$province_id} and status=1)
|
||||
)" => null
|
||||
];
|
||||
$orders[] = $this->mdOrders->count($where);
|
||||
|
||||
Reference in New Issue
Block a user