diff --git a/api/controllers/wxapp/licheb/Statistics.php b/api/controllers/wxapp/licheb/Statistics.php index ec1c7039..5d44ea54 100644 --- a/api/controllers/wxapp/licheb/Statistics.php +++ b/api/controllers/wxapp/licheb/Statistics.php @@ -674,8 +674,8 @@ class Statistics extends Wxapp{ $orders = $this->mdOrders->count($where); $where = [ 'a.status>=' => 0, - 'a.order_time>=' => $o_time['s_time'], - 'a.order_time<=' => $o_time['e_time'], + 'a.bill_time>=' => $o_time['s_time'], + 'a.bill_time<=' => $o_time['e_time'], 'a.status<>' => 2, 'b.pid_status' => 3, 'b.status in (1,2)' => null, diff --git a/common/libraries/receiver/Stats_entity.php b/common/libraries/receiver/Stats_entity.php index b8643fd6..32d3e67c 100644 --- a/common/libraries/receiver/Stats_entity.php +++ b/common/libraries/receiver/Stats_entity.php @@ -184,8 +184,8 @@ class Stats_entity{ if($type){ $where = [ 'a.status>=' => 0, - 'a.order_time>=' => $o_time['s_time'], - 'a.order_time<=' => $o_time['e_time'], + 'a.bill_time>=' => $o_time['s_time'], + 'a.bill_time<=' => $o_time['e_time'], 'a.status<>' => 2, 'b.pid_status' => 3, 'b.status in (1,2)' => null, @@ -221,8 +221,8 @@ class Stats_entity{ if($type){ $where = [ 'a.status>=' => 0, - 'a.order_time>=' => $o_time['s_time'], - 'a.order_time<=' => $o_time['e_time'], + 'a.bill_time>=' => $o_time['s_time'], + 'a.bill_time<=' => $o_time['e_time'], 'a.status<>' => 2, 'b.pid_status' => 3, 'b.status in (1,2)' => null, @@ -255,8 +255,8 @@ class Stats_entity{ if($type){ $where = [ 'a.status>=' => 0, - 'a.order_time>=' => $o_time['s_time'], - 'a.order_time<=' => $o_time['e_time'], + 'a.bill_time>=' => $o_time['s_time'], + 'a.bill_time<=' => $o_time['e_time'], 'a.status<>' => 2, 'b.pid_status' => 3, 'b.status in (1,2)' => null, @@ -293,8 +293,8 @@ class Stats_entity{ WHERE a.status >= 0 AND a.status <> 2 AND a.brand_id > 0 - AND a.order_time>= '{$o_time['s_time']}' - AND a.order_time<= '{$o_time['e_time']}' + AND a.bill_time>= '{$o_time['s_time']}' + AND a.bill_time<= '{$o_time['e_time']}' AND a.customer_id in (select id from lc_receiver_customers where status>=0 and biz_id in (select id from lc_biz where city_id={$city_id} and status=1)) AND b.pid_status = 3 AND b.status in (1,2) @@ -333,8 +333,8 @@ class Stats_entity{ if($type){ $where = [ 'a.status>=' => 0, - 'a.order_time>=' => $o_time['s_time'], - 'a.order_time<=' => $o_time['e_time'], + 'a.bill_time>=' => $o_time['s_time'], + 'a.bill_time<=' => $o_time['e_time'], 'a.status<>' => 2, 'b.pid_status' => 3, 'b.status in (1,2)' => null,