From c9c93283f9db0cdf8b6444fe7c499ac9f1a2b013 Mon Sep 17 00:00:00 2001 From: lccsw <1127794702@qq.com> Date: Sun, 24 Jul 2022 12:02:44 +0800 Subject: [PATCH] edit-api-static --- api/controllers/wxapp/liche/Statistics.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/controllers/wxapp/liche/Statistics.php b/api/controllers/wxapp/liche/Statistics.php index a78a69f8..db097c24 100644 --- a/api/controllers/wxapp/liche/Statistics.php +++ b/api/controllers/wxapp/liche/Statistics.php @@ -15,6 +15,7 @@ class Statistics extends Wxapp{ $this->load->model('receiver/receiver_clue_statistics_model','statistics_model'); $this->load->model('receiver/receiver_clues_model','clues_model'); $this->load->model('receiver/order/receiver_orders_model','orders_model'); + $this->load->model('receiver/order/receiver_orders_v2_model'); $this->load->model('auto/auto_brand_model'); $this->load->model('auto/auto_series_model'); @@ -198,15 +199,16 @@ class Statistics extends Wxapp{ !$page && $page = 1; !$size && $size = 20; $t1 = 'lc_receiver_clues'; - $t2 = 'lc_receiver_orders'; + $t2 = 'lc_receiver_orders_v2'; $where = [ "{$t1}.recommend_id" => $this->session['uid'], + "{$t2}.status" => 1 ]; if($type){ - $where["{$t2}.status"] = 6; + $where["{$t2}.id in (select o_id from lc_receiver_order_status where pid_status=5 and status=1)"] = null; }else{ - $where["{$t2}.status>"] = 0; + $where["{$t2}.id in (select o_id from lc_receiver_order_status where pid_status=0 and status=1)"] = null; } $count = $this->clues_model->count_order($where); $lists = []; @@ -226,7 +228,7 @@ class Statistics extends Wxapp{ $attrs_arr = array_merge($version_arr,$color_arr); $attrs = $this->auto_attr_model->get_map_by_ids($attrs_arr,'id,title'); - $status_arr = $this->orders_model->get_status(); + $status_arr = $this->receiver_orders_v2_model->get_status(); foreach($rows as $key=>$val){ $brand_name = isset($brands[$val['brand_id']]) ? $brands[$val['brand_id']][0]['name'] : '';