浏览代码

1.顺丰跑腿创建订单时要根据是否专人直送来设置 is_person_direct 2.fix bug: 门店查询未获取 shopName 字段

shizhongqi 7 月之前
父节点
当前提交
6f1e7cd6b7

+ 1 - 1
common/components/delivery/services/DispatchService.php

@@ -117,7 +117,7 @@ class DispatchService
         if(!in_array($orderType, ['xhOrder', 'xhGhsOrder'])){
             util::fail('订单类型错误');
         }
-        $shop = ShopClass::getById($shopId, false, 'id,merchantName,fullAddress,lat,long,city,dist,floor,mobile,merchantName');
+        $shop = ShopClass::getById($shopId, false, 'id,merchantName,shopName,fullAddress,lat,long,city,dist,floor,mobile,merchantName');
 
         $adapter = $this->getAdapter();
         $orderData = $adapter->formatOrderData($order, $orderType, $shop, $params);

+ 1 - 1
common/components/delivery/services/adapter/ShunfengAdapter.php

@@ -123,7 +123,7 @@ class ShunfengAdapter extends Shunfeng implements Adapter
             // ==================== 可选字段 ====================
             'lbs_type' => 2, // 坐标类型(1:百度坐标,2:高德坐标(国测坐标),默认为高德坐标系)
             'is_insured' => 0, // 是否保价(0:非保价)
-            'is_person_direct' => 0, // 是否专人直送(0:否)
+            'is_person_direct' => isset($params['type']) && $params['type'] == '专人直送' ? 1 : 0, // 是否专人直送(0:否,1:是
             'vehicle' => 0, // 配送交通工具(0:否,1:电动车,2:小轿车)
             'declared_value' => 0, // 保价金额(单位:分)
             'gratuity_fee' => 0, // 订单小费(单位:分)