From 3c263af48486bdbdc2a272bedf3e0d0f9fb8e5ed Mon Sep 17 00:00:00 2001 From: lccsw <1127794702@qq.com> Date: Wed, 16 Feb 2022 15:16:47 +0800 Subject: [PATCH] edit-api-series_car --- api/controllers/wxapp/app/Series.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/api/controllers/wxapp/app/Series.php b/api/controllers/wxapp/app/Series.php index 61666895..ddbaf2c2 100644 --- a/api/controllers/wxapp/app/Series.php +++ b/api/controllers/wxapp/app/Series.php @@ -147,10 +147,20 @@ class Series extends Wxapp{ $count = $this->auto_attr_model->count($where); $lists = $this->auto_attr_model->select($where,'',$page,$size,'id,title'); }else{ //车辆级别 + $city_id = ''; + $biz_id = $this->session['new_biz_id'] ? $this->session['new_biz_id'] : intval($this->session['biz_id']); + if($biz_id){ + $biz = $this->biz_model->get(['id'=>$biz_id],'city_id'); + $city_id = $biz['city_id']; + } $where = [ 's_id' => $s_id, - 'status' => 1 ]; + if($city_id=='350900'){ //宁德市特殊判断 + $where['(status=1 or id=30)'] = null; + }else{ + $where['status'] = 1; + } $rows = $this->auto_cars_model->select($where,'id desc',$page,$size,'id,s_id,v_id'); if($rows){ $target_arr = array_unique(array_column($rows,'v_id')); @@ -189,8 +199,10 @@ class Series extends Wxapp{ $where_car = array( 's_id'=>$s_id, 'v_id' => $v_id, - 'status' => 1 ); + if($v_id!=113) { //哪吒 U 2021款Pro400巡航版 不判断状态 + $where_car['status'] = 1; + } $car = $this->auto_cars_model->get($where_car,'',$city_id); $biz_id == 70 && $car['price_book'] = 2000; //蕉城辉科写死定金 if(!$car){