Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop

This commit is contained in:
邹宗楠
2024-01-12 10:23:19 +08:00

View File

@@ -313,8 +313,8 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe
// toLat = coords[1].Lat // toLat = coords[1].Lat
// toLng = coords[1].Lng // toLng = coords[1].Lng
//} //}
fromLat = jxutils.IntCoordinate2Standard(store.Lng) fromLat = jxutils.IntCoordinate2Standard(store.Lat)
fromLng = jxutils.IntCoordinate2Standard(store.Lat) fromLng = jxutils.IntCoordinate2Standard(store.Lng)
toLat = jxutils.IntCoordinate2Standard(order.ConsigneeLat) toLat = jxutils.IntCoordinate2Standard(order.ConsigneeLat)
toLng = jxutils.IntCoordinate2Standard(order.ConsigneeLng) toLng = jxutils.IntCoordinate2Standard(order.ConsigneeLng)
@@ -327,9 +327,22 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe
} else { } else {
tempWeight = int(order.Weight / 1000) tempWeight = int(order.Weight / 1000)
} }
//地址特殊判断
cityName := store.CityName
districtName := store.DistrictName
address := ""
if !strings.Contains(store.Address, cityName) { //城市
address += cityName
}
if !strings.Contains(store.Address, districtName) { //行政区
address += districtName
}
address += store.Address
param := map[string]interface{}{ param := map[string]interface{}{
"origin_id": order.VendorOrderID, "origin_id": order.VendorOrderID,
"from_address": store.Address, "from_address": address,
"from_usernote": "京西菜市(" + store.Store.Name + ")", "from_usernote": "京西菜市(" + store.Store.Name + ")",
"to_address": order.ConsigneeAddress, "to_address": order.ConsigneeAddress,
"city_name": store.CityName, "city_name": store.CityName,