- 查不到美团配送价格时报警
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
const (
|
||||
maxOrderPrice = 6399 // 单位为分,达达最大价格,超过这个价格配送费会增加
|
||||
maxOrderWeight = 5000 // 5公斤
|
||||
maxDiffFee2Mtps = 100 // 与美团配送最多差价
|
||||
maxDiffFee2Mtps = 150 // 与美团配送最多差价
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -47,9 +47,12 @@ func CalculateOrderDeliveryFee(order *model.GoodsOrder, billTime time.Time, db o
|
||||
lng = jxutils.IntCoordinate2Standard(priceInfo.Lng)
|
||||
lat = jxutils.IntCoordinate2Standard(priceInfo.Lat)
|
||||
deliveryFee = int64(priceInfo.Price)
|
||||
|
||||
if deliveryFee == 0 {
|
||||
globals.SugarLogger.Warnf("CalculateOrderDeliveryFee 查不到美团配送价格 orderID:%s", order.VendorOrderID)
|
||||
deliveryFee = 650
|
||||
}
|
||||
if lng == 0 || lat == 0 {
|
||||
globals.SugarLogger.Warnf("calculateDeliveryFee can not calculate delivery fee for orderID:%s, because no coordinate info", order.VendorOrderID)
|
||||
globals.SugarLogger.Warnf("calculateDeliveryFee 门店没有坐标信息 orderID:%s", order.VendorOrderID)
|
||||
return 0, 0, ErrStoreNoCoordinate
|
||||
}
|
||||
lng2, lat2, _ := jxutils.IntCoordinate2MarsStandard(order.ConsigneeLng, order.ConsigneeLat, order.CoordinateType)
|
||||
|
||||
Reference in New Issue
Block a user