1
This commit is contained in:
@@ -93,14 +93,27 @@ func (d DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee i
|
|||||||
var (
|
var (
|
||||||
weight int
|
weight int
|
||||||
productDetail []*sfps2.ProductDetail
|
productDetail []*sfps2.ProductDetail
|
||||||
|
param = &sfps2.CreateOrderReq{}
|
||||||
)
|
)
|
||||||
if order.Weight >= 49500 || order.Weight <= model.NO {
|
if order.Weight >= 49500 || order.Weight <= model.NO {
|
||||||
weight = 49500
|
weight = 49500
|
||||||
} else {
|
} else {
|
||||||
weight = order.Weight
|
weight = order.Weight
|
||||||
}
|
}
|
||||||
|
// 城市维度获取顺丰门店id
|
||||||
param := &sfps2.CreateOrderReq{
|
if len(store.CityName) > 0 {
|
||||||
|
globals.SugarLogger.Debugf("sfps CreateWaybill store.CityName==%s", store.CityName)
|
||||||
|
for k, v := range sfps2.SFCityStoreIDs {
|
||||||
|
if strings.Contains(k, store.CityName) {
|
||||||
|
param.ShopId = v
|
||||||
|
} else {
|
||||||
|
return nil, errors.New("此城市暂时不在顺丰配送业务范围")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return nil, errors.New("门店不允许没有城市名,请检查门店信息")
|
||||||
|
}
|
||||||
|
param = &sfps2.CreateOrderReq{
|
||||||
ShopId: sfps2.SFShopStoreID,
|
ShopId: sfps2.SFShopStoreID,
|
||||||
ShopOrderId: order.VendorOrderID,
|
ShopOrderId: order.VendorOrderID,
|
||||||
OrderSource: GetVendorSource(order.VendorID),
|
OrderSource: GetVendorSource(order.VendorID),
|
||||||
@@ -219,6 +232,7 @@ func (d DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo
|
|||||||
}
|
}
|
||||||
// 城市维度获取顺丰门店id
|
// 城市维度获取顺丰门店id
|
||||||
if len(store.CityName) > 0 {
|
if len(store.CityName) > 0 {
|
||||||
|
globals.SugarLogger.Debugf("sfps GetWaybillFee store.CityName==%s", store.CityName)
|
||||||
for k, v := range sfps2.SFCityStoreIDs {
|
for k, v := range sfps2.SFCityStoreIDs {
|
||||||
if strings.Contains(k, store.CityName) {
|
if strings.Contains(k, store.CityName) {
|
||||||
param.ShopId = v
|
param.ShopId = v
|
||||||
|
|||||||
Reference in New Issue
Block a user