Browse Source

取消跑腿订单后,更新跑腿订单的状态 orderStatus 统一在回调中更新(不在控制器API中修改)

shizhongqi 7 tháng trước cách đây
mục cha
commit
8a3911db0c

+ 1 - 1
app-ghs/controllers/DeliveryController.php

@@ -427,7 +427,7 @@ class DeliveryController extends BaseController
 
             $ghsOrder = OrderClass::getById($ghsOrderId, true, 'id, sendDistance, sendStatus, deliveryId, purchaseId, status');
             $ghsOrder->sendDistance = 0;
-            $ghsOrder->sendStatus = -1;
+            //$ghsOrder->sendStatus = -1;
             // $ghsOrder->deliveryId = ''; // 为了获取上一次的配送记录,不要置空
             $ghsOrder->sendTip = 0;
             if (!$ghsOrder->save()) {

+ 2 - 1
app-hd/controllers/DeliveryController.php

@@ -289,9 +289,10 @@ class DeliveryController extends BaseController
 
             $Order = OrderClass::getById($hdOrderId, true, 'id, sendDistance, sendStatus, deliveryId');
             $Order->sendDistance = 0;
-            $Order->sendStatus = -1;
+            //$Order->sendStatus = -1;
             $Order->status = 2;
             //$Order->deliveryId = '';
+            $Order->sendTip = 0;
             if (!$Order->save()) {
                 Yii::error('保存批发订单失败: ' . json_encode($Order->errors));
                 util::fail('保存批发订单失败');