Browse Source

限制条件

shish 8 months ago
parent
commit
6c30353fc4
1 changed files with 13 additions and 0 deletions
  1. 13 0
      app-ghs/controllers/DeliveryController.php

+ 13 - 0
app-ghs/controllers/DeliveryController.php

@@ -207,6 +207,19 @@ class DeliveryController extends BaseController
 
         $orderId = intval($post['orderId']);
         $order = OrderClass::getById($orderId);
+        if (empty($order)) {
+            util::fail('没有找到订单');
+        }
+        if ($order['mainId'] != $this->mainId) {
+            util::fail('不是你的订单');
+        }
+        if (empty($order['address'])) {
+            util::fail('客户地址缺失');
+        }
+        if (empty($order['long']) || empty($order['lat'])) {
+            util::fail('客户地址信息缺失');
+        }
+
         $shop = ShopClass::getById($this->shopId);
         $order['weight'] = $weight;
         $order['remark'] = $remark;