diff --git a/app/store/controller/Order.php b/app/store/controller/Order.php index e8a22026..ebf4e51e 100644 --- a/app/store/controller/Order.php +++ b/app/store/controller/Order.php @@ -307,8 +307,13 @@ class Order extends Controller public function updateDelivery(int $delivery_id): Json { $model = new DeliveryModel; + if(!$model->where('delivery_id', $delivery_id)->find()) + { + return $this->renderError('该物流记录不存在'); + } + $model->where('delivery_id', $delivery_id)->save($this->postForm()); - return $this->renderSuccess('ok'); + return $this->renderSuccess('修改成功'); }