edit-api-series_car

This commit is contained in:
lccsw
2022-02-16 15:16:47 +08:00
parent ae1c9bff68
commit 3c263af484
+14 -2
View File
@@ -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){