From aed4c8beb86ed8421c27e9f2ab3ae5407a209914 Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Fri, 1 Apr 2022 10:03:18 +0800 Subject: [PATCH] edit-api-business --- admin/controllers/receiver/orderv2/Orders.php | 4 ++-- admin/libraries/Ordersv2List.php | 2 +- api/controllers/wxapp/app/Business.php | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/admin/controllers/receiver/orderv2/Orders.php b/admin/controllers/receiver/orderv2/Orders.php index 74235ddd..7b69de1b 100644 --- a/admin/controllers/receiver/orderv2/Orders.php +++ b/admin/controllers/receiver/orderv2/Orders.php @@ -64,7 +64,7 @@ class Orders extends HD_Controller if($key2){ $where_s = []; $key==1 && $where_s["{$t1}.payway"] = 0;//分期 - $key==3 && $where_s["{$t1}.id in (select o_id from lc_app_liche_orders where status=1 group by o_id)"] = null; + $key==3 && $where_s["{$t1}.id in (select o_id from lc_receiver_order_status where pid_status=0 and status=2)"] = null; if($key2){ $where_s["{$t2}.pid_status"] = $value['pid_status']; $up_key = $key2+1; @@ -77,7 +77,7 @@ class Orders extends HD_Controller "id not in (select o_id from lc_receiver_order_status where pid_status={$value['pid_status']} and status=1)" => null ]; $key==1 && $where_s['payway'] = 0; - $key==3 && $where_s['id in (select o_id from lc_app_liche_orders where status=1 group by o_id)'] = null; + $key==3 && $where_s['id in (select o_id from lc_receiver_order_status where pid_status=0 and status=2)'] = null; $where_s = array_merge($where,$where_s); $count2 = $this->receiver_orders_v2_model->count($where_s); } diff --git a/admin/libraries/Ordersv2List.php b/admin/libraries/Ordersv2List.php index 33be8982..2f1e8429 100644 --- a/admin/libraries/Ordersv2List.php +++ b/admin/libraries/Ordersv2List.php @@ -193,7 +193,7 @@ class Ordersv2List {$this->t1}.cor_id,{$this->t1}.incor_id,{$this->t1}.money_json,{$this->t1}.payway,{$this->t1}.status,{$this->t1}.c_time, {$this->t1}.biz_id,{$this->t1}.bill_time,{$this->t1}.customer_id,{$this->t1}.owner_name,{$this->t1}.owner_mobile,{$this->t1}.main_type,{$this->t1}.info_json"; if($params['status_pid']==3){ - $where["{$this->t1}.id in (select o_id from lc_app_liche_orders where status=1 group by o_id)"] = null; + $where["{$this->t1}.id in (select o_id from lc_receiver_order_status where pid_status=0 and status=2)"] = null; } if(strlen($params['status_pid'])){ $where["{$this->t1}.id>="] = Orders_v2_entity::V2_START_ID; diff --git a/api/controllers/wxapp/app/Business.php b/api/controllers/wxapp/app/Business.php index 626850fe..b5215b84 100644 --- a/api/controllers/wxapp/app/Business.php +++ b/api/controllers/wxapp/app/Business.php @@ -35,10 +35,9 @@ class Business extends Wxapp{ 'status'=>1, 'if_effect'=>1, 'city_id'=>$city_id, - 'year' => date('Y'), - 'month' => intval(date('m')) ]; - $row = $this->auto_business_model->get($where); + $rows = $this->auto_business_model->select($where,'id desc',1,1); + $row = $rows[0]; if(!$row){ throw new Exception('当前地区不支持销售该车型', API_CODE_FAIL); }