- 查不到美团配送价格时报警
This commit is contained in:
@@ -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