diff --git a/business/partner/purchase/jdshop/callback.go b/business/partner/purchase/jdshop/callback.go index 81c7d18fb..6694916e4 100644 --- a/business/partner/purchase/jdshop/callback.go +++ b/business/partner/purchase/jdshop/callback.go @@ -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 }