Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -256,6 +256,15 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe
|
|||||||
Lng: jxutils.IntCoordinate2Standard(order.ConsigneeLng),
|
Lng: jxutils.IntCoordinate2Standard(order.ConsigneeLng),
|
||||||
})
|
})
|
||||||
coords, err = api.BaiDuNaviAPI.BatchCoordinateConvert(coords, baidunavi.CoordSysGCJ02, baidunavi.CoordSysBaiDu)
|
coords, err = api.BaiDuNaviAPI.BatchCoordinateConvert(coords, baidunavi.CoordSysGCJ02, baidunavi.CoordSysBaiDu)
|
||||||
|
weight := 4
|
||||||
|
tempWeight := 0
|
||||||
|
if order.Weight/1000 >= weight {
|
||||||
|
tempWeight = weight
|
||||||
|
} else if order.Weight/1000 < 1 {
|
||||||
|
tempWeight = 1
|
||||||
|
} else {
|
||||||
|
tempWeight = int(order.Weight / 1000)
|
||||||
|
}
|
||||||
param := map[string]interface{}{
|
param := map[string]interface{}{
|
||||||
"origin_id": order.VendorOrderID,
|
"origin_id": order.VendorOrderID,
|
||||||
"from_address": store.Address,
|
"from_address": store.Address,
|
||||||
@@ -267,7 +276,9 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe
|
|||||||
"from_lng": coords[0].Lng,
|
"from_lng": coords[0].Lng,
|
||||||
"to_lat": coords[1].Lat,
|
"to_lat": coords[1].Lat,
|
||||||
"to_lng": coords[1].Lng,
|
"to_lng": coords[1].Lng,
|
||||||
|
"goods_weight": tempWeight,
|
||||||
}
|
}
|
||||||
|
|
||||||
if orderPrice, err = api.UuAPI.GetOrderPrice(param); err != nil {
|
if orderPrice, err = api.UuAPI.GetOrderPrice(param); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user