From 73eceab30f8ebe07ab8f0de0bfcb2aebd4435bac Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Fri, 1 Sep 2023 19:06:02 +0800 Subject: [PATCH] update --- app/adminapi/logic/vehicle/VehicleLogic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/adminapi/logic/vehicle/VehicleLogic.php b/app/adminapi/logic/vehicle/VehicleLogic.php index c2e8897f..3465a1a2 100644 --- a/app/adminapi/logic/vehicle/VehicleLogic.php +++ b/app/adminapi/logic/vehicle/VehicleLogic.php @@ -110,8 +110,8 @@ class VehicleLogic extends BaseLogic } if($data['status'] == 2){ //获取租赁信息 - $rentInfo = VehicleRent::where('car_id',$data['id'])->find(); - $contract = Contract::where('id',$rentInfo['contract_id'])->find(); + $rentInfo = VehicleRent::where('car_id',$data['id'])->findOrEmpty()->toArray(); + $contract = Contract::where('id',$rentInfo['contract_id'])->findOrEmpty(); $rentInfo['contract_file'] = $contract['file']; $data['rent_info'] = !empty($rentInfo) ? $rentInfo : []; //获取物流信息