From 038a1fc148d143b0f1bfe7d14881ee81f0708cca Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Tue, 17 Oct 2023 17:56:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=9F=E8=B5=81=E8=AF=A6=E6=83=85=E4=BC=A0?= =?UTF-8?q?=E5=80=BC=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/VehicleController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/api/controller/VehicleController.php b/app/api/controller/VehicleController.php index 39557bab8..5fd083a74 100644 --- a/app/api/controller/VehicleController.php +++ b/app/api/controller/VehicleController.php @@ -437,10 +437,11 @@ class VehicleController extends BaseApiController $id = $this->request->get('car_id'); //获取数据 if(!empty($id) && $id != 'undefined'){ - $data = VehicleRent::where('id',$id)->where('status',2)->findOrEmpty(); + $data = VehicleRent::where('car_id',$id)->where('status',2)->findOrEmpty(); }else{ $data = VehicleRent::where('rent_company_id',$this->userInfo['company_id'])->where('status',2)->findOrEmpty(); } + dump($data);die; if($data->isEmpty()){ return $this->fail('数据不存在'); }