! format func EarthDistance params from lat, lng1... to lng1, lat1...

This commit is contained in:
gazebo
2019-01-25 11:41:33 +08:00
parent 367fff9321
commit f3b7a0e84e
3 changed files with 5 additions and 5 deletions

View File

@@ -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))