From 3d8e666404a03cc6e4f0051679af5b87a50c7455 Mon Sep 17 00:00:00 2001 From: zengchaoxin Date: Fri, 15 Nov 2019 18:46:33 +0800 Subject: [PATCH] test5 --- frontend/controllers/CarController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/controllers/CarController.php b/frontend/controllers/CarController.php index f24b0f2..611b598 100644 --- a/frontend/controllers/CarController.php +++ b/frontend/controllers/CarController.php @@ -553,7 +553,7 @@ class CarController extends BaseController if($res->getStatusCode() == 200) { $obj = json_decode($res->getBody()); if($obj->data && $obj->data->UserInfo && $obj->data->UserInfo->CarUsedType != '') { - $car_user_info = CarUseT::where('name', $obj->data->UserInfo->CarUsedType)->first(); + $car_user_info = CarUseT::find()->where(['name', $obj->data->UserInfo->CarUsedType])->one(); if($car_user_info) { $obj->data->UserInfo->CarUsedType = $car_user_info->id; }