update notify

This commit is contained in:
unknown 2023-09-09 20:29:10 +08:00
parent d1b2294e0c
commit 25228c773f

View File

@ -164,7 +164,7 @@ class IndexController extends BaseApiController
$cars = json_decode($contract['cars_info'], true);
$data = [];
foreach ($cars as $k => $v) {
$hasCar = VehicleRent::where('car_id',$v['id'])->find();
$hasCar = VehicleRent::where('car_id',$v['id'])->findOrEmpty();
if($hasCar->isEmpty()){
$data[$k]['car_id'] = $v['id'];
$data[$k]['car_license'] = $v['license'];
@ -432,7 +432,7 @@ class IndexController extends BaseApiController
if ($result && isset($param['status']) && $param['status'] == 3) {
$data = [];
foreach ($cars as $k => $v) {
$hasCar = VehicleRent::where('car_id',$v['id'])->find();
$hasCar = VehicleRent::where('car_id',$v['id'])->findOrEmpty();
if($hasCar->isEmpty()) {
$data[$k]['car_id'] = $v['id'];
$data[$k]['car_license'] = $v['license'];