Quellcode durchsuchen

达达增加重新下单

林琦海 vor 5 Jahren
Ursprung
Commit
2b212ef289

+ 9 - 0
app-ghs/controllers/TestController.php

@@ -46,6 +46,15 @@ class TestController extends BaseController
         util::success($res);
     }
 
+    //重发快递
+    public function actionDadaReAdd()
+    {
+        $orderSn = 'XSD_CS26316851';
+        $orderInfo = OrderClass::getByOrderSn($orderSn);
+        $res = DadaExpressServices::reAddOrder($orderInfo);
+        util::success($res);
+    }
+
     //达达状态查询
     public function actionDadaOrderStatus()
     {

+ 13 - 0
biz-ghs/express/services/DadaExpressServices.php

@@ -71,6 +71,19 @@ class DadaExpressServices
         return $res;
     }
 
+    //订单重发
+    public static function reAddOrder($orderInfo)
+    {
+        if(empty($orderInfo)){
+            util::fail("订单不存在");
+        }
+        $sjId = $orderInfo['merchantId'];
+        $sourceId = SjExpressClass::getSourceId($sjId);
+        $orderParams = self::orderParams($orderInfo);
+        $res = dada::reAddOrder($sourceId,$orderParams);
+        return $res;
+    }
+
     //组装订单参数
     public static function orderParams($orderInfo)
     {