- 对于饿百与美团外卖订单,设置其PickDeadline
This commit is contained in:
@@ -22,8 +22,9 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
pickupOrderDelay = 4 * time.Minute
|
||||
pickupOrderGap = 20
|
||||
pickupOrderDelay = 240 * time.Second
|
||||
pickupOrderGap = 20
|
||||
|
||||
callDeliveryDelay = 10 * time.Minute
|
||||
callDeliveryDelayGap = 30
|
||||
)
|
||||
@@ -91,6 +92,9 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
ActualPayPrice: jxutils.StandardPrice2Int(utils.MustInterface2Float64(result["total"])),
|
||||
Skus: []*model.OrderSku{},
|
||||
}
|
||||
if jxutils.IsTimeEmpty(order.PickDeadline) && !jxutils.IsTimeEmpty(order.StatusTime) {
|
||||
order.PickDeadline = order.StatusTime.Add(pickupOrderDelay /*+ time.Duration(rand.Intn(pickupOrderGap))*time.Second*/)
|
||||
}
|
||||
order.Status = p.GetStatusFromVendorStatus(order.VendorStatus)
|
||||
if jxutils.IsTimeEmpty(order.ExpectedDeliveredTime) {
|
||||
order.BusinessType = model.BusinessTypeImmediate
|
||||
|
||||
Reference in New Issue
Block a user