! format func EarthDistance params from lat, lng1... to lng1, lat1...
This commit is contained in:
@@ -55,7 +55,7 @@ func CalculateOrderDeliveryFee(order *model.GoodsOrder, billTime time.Time, db o
|
||||
lng2, lat2, _ := jxutils.IntCoordinate2MarsStandard(order.ConsigneeLng, order.ConsigneeLat, order.CoordinateType)
|
||||
|
||||
var distanceAddFee, weightAddFee, timeAddFee int64
|
||||
distance := jxutils.EarthDistance(lat, lng, lat2, lng2) * 1.4
|
||||
distance := jxutils.EarthDistance(lng, lat, lng2, lat2) * 1.4
|
||||
if distance < 3 {
|
||||
} else if distance < 5 {
|
||||
distanceAddFee = jxutils.StandardPrice2Int(math.Ceil(distance - 3))
|
||||
|
||||
Reference in New Issue
Block a user