|
|
@@ -309,18 +309,21 @@ class DispatchService
|
|
|
$adapter = $this->adapters['shunfeng'];
|
|
|
// is_person_direct -- 店铺是否支持专人直送,0不支持 1支持 2只能发独享专送
|
|
|
$isPersonDirect = $adapter->getIsPersonDirect();
|
|
|
- if($isPersonDirect != 2){
|
|
|
- //$customSettings = $this->adapters['shunfeng']->getCustomSettings();
|
|
|
- $customSettings = [];//自定义用户设置:默认不专人直送
|
|
|
- $preparedData['shunfeng'] = $this->prepareShunfengData($order, $shop, $customSettings);
|
|
|
- }
|
|
|
+ if($isPersonDirect != 2){
|
|
|
+ $customSettings = [];//自定义用户设置:默认不专人直送
|
|
|
+ $preparedData['shunfeng'] = $this->prepareShunfengData($order, $shop, $customSettings);
|
|
|
+ }
|
|
|
|
|
|
//添加专人直送的订单数据
|
|
|
- if(in_array($isPersonDirect, [1, 2])){
|
|
|
+ if(in_array($isPersonDirect, [1, 2])){ // 支持专人直送
|
|
|
$customSettings = ['isPersonDirect' => 1];//自定义用户设置:专人直送
|
|
|
$preparedData['shunfeng_1v1'] = $this->prepareShunfengData($order, $shop, $customSettings);
|
|
|
Yii::info('预创建订单 shunfeng_1v1 request data: ' . json_encode($preparedData['shunfeng_1v1']));
|
|
|
}
|
|
|
+ // else{
|
|
|
+ // $customSettings = [];//自定义用户设置:默认不专人直送
|
|
|
+ // $preparedData['shunfeng'] = $this->prepareShunfengData($order, $shop, $customSettings);
|
|
|
+ // }
|
|
|
} catch (\Exception $e) {
|
|
|
Yii::warning("Shunfeng 数据准备失败: {$e->getMessage()}");
|
|
|
}
|
|
|
@@ -555,13 +558,13 @@ class DispatchService
|
|
|
'product_type' => 4, // 物品类型(4:鲜花绿植)
|
|
|
'push_time' => time(), // 推单时间(秒级时间戳)
|
|
|
//shop 平台级开发者需要传入
|
|
|
- 'shop' => [ // 发货店铺信息
|
|
|
- 'shop_name' => $shop['merchantName'], // 店铺名称
|
|
|
- 'shop_address' => $shop['fullAddress'], // 店铺地址
|
|
|
- 'shop_lng' => (string)$shop['long'], // 店铺经度
|
|
|
- 'shop_lat' => (string)$shop['lat'], // 店铺纬度
|
|
|
- 'shop_phone' => $shop['mobile'], // 店铺联系电话
|
|
|
- ],
|
|
|
+ // 'shop' => [ // 发货店铺信息
|
|
|
+ // 'shop_name' => $shop['merchantName'], // 店铺名称
|
|
|
+ // 'shop_address' => $shop['fullAddress'], // 店铺地址
|
|
|
+ // 'shop_lng' => (string)$shop['long'], // 店铺经度
|
|
|
+ // 'shop_lat' => (string)$shop['lat'], // 店铺纬度
|
|
|
+ // 'shop_phone' => $shop['mobile'], // 店铺联系电话
|
|
|
+ // ],
|
|
|
//-------------------------- 非必填 -------------------------------
|
|
|
'city_name' => $order['city'], // 发单城市
|
|
|
//'order_source' => '6', // 订单接入来源(6:京东秒送,可自定义)
|