This commit is contained in:
邹宗楠
2022-11-25 16:27:51 +08:00
parent 3538b5a809
commit 3df9487a73
2 changed files with 22 additions and 23 deletions

View File

@@ -764,6 +764,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
if err2 != nil {
partner.CurOrderManager.OnOrderMsg(order, "送达设置失败", err2.Error())
}
}
if !s.isBillCandidate(order, bill) {
// 一般只会消息乱序才会到这里,即新订单消息在运单接单消息后到达
@@ -781,6 +782,9 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
// if order.WaybillVendorID == model.VendorIDUnknown {
// s.createWaybillOn3rdProviders(savedOrderInfo, 0, nil)
// }
// 将订单修改为完成状态
order.Status = model.OrderStatusFinished
partner.CurOrderManager.UpdateOrderFields(order, []string{"status"})
default:
s.resetTimer(savedOrderInfo, bill, isPending)
}