|
|
@@ -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, '取消失败');
|