소스 검색

Wesmiler 人人车 初始化项目 0816

APPLE 3 년 전
부모
커밋
83b7e11757
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      application/api/controller/v1/Taxi.php

+ 2 - 1
application/api/controller/v1/Taxi.php

@@ -473,11 +473,12 @@ class Taxi extends ApiController
                 return IResponse::failure('取消失败');
             }
 
-            if (!\app\common\model\Taxi::where(['taxi_user_id' => $taxiUid, 'id' => $row['taxi_id']])->update(['status' => 1])) {
+            if ($row['taxi_id'] && !\app\common\model\Taxi::where(['taxi_user_id' => $taxiUid, 'id' => $row['taxi_id']])->update(['status' => 1])) {
                 Db::rollback();
                 return IResponse::failure('取消失败');
             }
 
+            Db::commit();
             return $this->ApiJson(0, '取消成功', $row);
         }
         return $this->ApiJson(-1, '取消失败');