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),
|
||||
})
|
||||
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{}{
|
||||
"origin_id": order.VendorOrderID,
|
||||
"from_address": store.Address,
|
||||
@@ -267,7 +276,9 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe
|
||||
"from_lng": coords[0].Lng,
|
||||
"to_lat": coords[1].Lat,
|
||||
"to_lng": coords[1].Lng,
|
||||
"goods_weight": tempWeight,
|
||||
}
|
||||
|
||||
if orderPrice, err = api.UuAPI.GetOrderPrice(param); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user