From 5145f1eb0fc5450db71896cda4b2d3d792348a60 Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Fri, 8 Sep 2023 17:14:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A9=B3=E5=9B=9E=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/VehicleController.php | 26 ++++++++---------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/app/api/controller/VehicleController.php b/app/api/controller/VehicleController.php index 33c44aedc..7a2039004 100644 --- a/app/api/controller/VehicleController.php +++ b/app/api/controller/VehicleController.php @@ -324,23 +324,15 @@ class VehicleController extends BaseApiController return $this->fail($e->getMessage()); } }else{ - Db::startTrans(); - try{ - //更新 - $result = VehicleContract::where('id',$params['id'])->update([ - 'status' => 4, - 'reject_message' => $params['content'] - ]); - if($result){ - Db::commit(); - return $this->success('驳回成功'); - }else{ - Db::rollback(); - return $this->fail('驳回失败'); - } - }catch (\Exception $e) { - Db::rollback(); - return $this->fail($e->getMessage()); + //更新 + $result = VehicleContract::where('id',$params['id'])->update([ + 'status' => 4, + 'reject_message' => $params['content'] + ]); + if($result){ + return $this->success('驳回成功'); + }else{ + return $this->fail('驳回失败'); } } }