瀏覽代碼

货拉拉跑腿地址不统一问题修复:地址也有潜在不一致:预估价发货地址用 province + city + dist + address,下单用 fullAddress;收货点名称预估价用 customName,下单可能用 showAddress,见 DispatchService.php (line 437) 和 HuolalaAdapter.php (line 77)

shizhongqi 2 月之前
父節點
當前提交
484d3b6931
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      common/components/delivery/services/DispatchService.php

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

@@ -435,7 +435,7 @@ class DispatchService
                 'addr_info' => [
                     [
                         'name' => $shop['merchantName'],
-                        'addr' => $shop['province'] . $shop['city'] . $shop['dist'] . $shop['address'],
+                        'addr' => $shop['fullAddress'],
                         'city_id' => $cityId,
                         'city_name' => $shop['city'],
                         'district_name' => $shop['dist'],
@@ -445,7 +445,7 @@ class DispatchService
                         'lat_lon' => ['lat' => (float)$shop['lat'], 'lon' => (float)$shop['long']],
                     ],
                     [
-                        'name' => $order['customName'],
+                        'name' => empty($order['showAddress']) ? $order['customName'] : $order['showAddress'],
                         'addr' => $order['fullAddress'],
                         'city_id' => $cityId,
                         'city_name' => $order['city'],
@@ -458,7 +458,7 @@ class DispatchService
                 ],
                 'vehicle_std' => $vehicleStd,
                 'spec_req' => array_values($specReq),
-                'coupon_id' => 123456, // TODO ??? 添加自动获取 coupon_id
+                //'coupon_id' => 0, // 优惠券信息,可以传指定券id,如果不传则会默认用最优券,如果不想用券则传0。下单时的券id需要和估价的策略一样,估价命中最优券,下单就必须传券id。不想用券就都传0
                 'invoice_type' => 1,
                 'order_service_type' => 1,
                 '_meta' => [