From dc3170429e411f5d69bbe26b09523fed3f5638a5 Mon Sep 17 00:00:00 2001
From: 何书鹏 <heshupeng@bronet.cn>
Date: Tue, 8 Feb 2022 17:25:35 +0800
Subject: [PATCH] 确认收货完善

---
 application/api/controller/Rider.php | 2 ++
 1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/application/api/controller/Rider.php b/application/api/controller/Rider.php
index 8860504..f359e0b 100644
--- a/application/api/controller/Rider.php
+++ b/application/api/controller/Rider.php
@@ -314,10 +314,12 @@ class Rider extends Api
     {
         $id = $this->request->post('id');
         $rider_order = RiderOrder::get($id);
+        empty($rider_order) && $this->error('骑手订单不存在');
         $ordermodel = new \app\api\model\Order();
         $order = $ordermodel
             ->where('id',$rider_order['order_id'])
             ->find();
+        empty($order) && $this->error('订单不存在');
         if ($order['rider_status'] == 20) $this->error('该订单已送达');
         $order->rider_status = '20';
         $order->save();
--
libgit2 0.24.0