- 平台运单接单后将订单状态强制设置为配送中
This commit is contained in:
@@ -368,13 +368,21 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
||||
}
|
||||
s.updateOrderByBill(order, bill, false)
|
||||
s.cancelOtherWaybillsCheckOrderDeliveryFlag(savedOrderInfo, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
||||
if !s.IsOrderPlatformWaybill(bill) && savedOrderInfo.storeDeliveryType != scheduler.StoreDeliveryTypeByStore {
|
||||
s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, 2, 10*time.Second)
|
||||
} else if s.IsSpecialOrderPlatformWaybill(bill) {
|
||||
s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile)
|
||||
utils.CallFuncAsync(func() {
|
||||
weixinmsg.NotifyWaybillStatus(bill, order, isBillAlreadyCandidate)
|
||||
})
|
||||
|
||||
if s.IsOrderPlatformWaybill(bill) {
|
||||
// 强制将订单状态置为配送中?
|
||||
order.Status = model.OrderStatusDelivering
|
||||
partner.CurOrderManager.UpdateOrderStatusAndFlag(order)
|
||||
} else {
|
||||
if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore ||
|
||||
s.IsSpecialOrderPlatformWaybill(bill) {
|
||||
s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile)
|
||||
utils.CallFuncAsync(func() {
|
||||
weixinmsg.NotifyWaybillStatus(bill, order, isBillAlreadyCandidate)
|
||||
})
|
||||
} else {
|
||||
s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, 2, 10*time.Second)
|
||||
}
|
||||
}
|
||||
} else if !s.isBillCandidate(order, bill) && bill.WaybillVendorID != order.VendorID {
|
||||
// 发生这种情况的原因就是两个接单事件几乎同时到达(来不及取消),也算正常
|
||||
|
||||
Reference in New Issue
Block a user