This commit is contained in:
苏尹岚
2021-04-13 09:29:17 +08:00
parent ed9eb3946e
commit 6369593549

View File

@@ -325,6 +325,13 @@ func result2Orders(msg *jdshopapi.CallBackResult) (order *model.GoodsOrder, err
// globals.SugarLogger.Debugf("resultjdsOrders return 10")
// }
// }
if store != nil {
distance := jxutils.EarthDistance(jxutils.IntCoordinate2Standard(order.ConsigneeLng), jxutils.IntCoordinate2Standard(order.ConsigneeLat), jxutils.IntCoordinate2Standard(store.Lng), jxutils.IntCoordinate2Standard(store.Lat))
if distance > 4 {
buildOrderTo102919(order)
globals.SugarLogger.Debugf("resultjdsOrders return 4")
}
}
if order.ExpectedDeliveredTime.Sub(order.OrderCreatedAt) <= time.Hour+time.Minute {
order.BusinessType = model.BusinessTypeImmediate
}