From 3bcc417e58e6ed35566e34bb3d16887665ef6794 Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Sun, 17 Jul 2022 20:34:24 +0800 Subject: [PATCH] edit-api-business2 --- api/controllers/wxapp/app/Business.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/controllers/wxapp/app/Business.php b/api/controllers/wxapp/app/Business.php index e646aa74..0b2aa616 100644 --- a/api/controllers/wxapp/app/Business.php +++ b/api/controllers/wxapp/app/Business.php @@ -50,8 +50,8 @@ class Business extends Wxapp{ //$if_pay = $this->app_liche_orders_model->count(['o_id'=>$oid,'status'=>1]); if($order && $s_id==$order['s_id'] && $v_id==$order['v_id']){ $row = $this->auto_business_model->get(['id'=>$business_id]); - }else{ - throw new Exception('当前地区不支持销售该车型', API_CODE_FAIL); + //}else{ + // throw new Exception('当前地区不支持销售该车型', API_CODE_FAIL); } //修改商务政策id if($s_id==$order['s_id'] && $v_id!=$row['v_id']){ @@ -71,6 +71,9 @@ class Business extends Wxapp{ } } } + if(!$row){ + throw new Exception('当前地区不支持销售该车型', API_CODE_FAIL); + } $car['price_car'] = $row['price_car']; $car['price_floor'] = $row['price_floor']; $dis_money = $car['price_car'] - $car['price_floor'];