This commit is contained in:
小鱼开发
2024-07-02 10:10:26 +08:00
parent 459416e5f4
commit 1965729ebc
2 changed files with 10 additions and 11 deletions
+3 -4
View File
@@ -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);