- 由于达达有时会漏发接单消息,将配送中消息也当成接单消息处理

This commit is contained in:
gazebo
2019-05-06 16:45:23 +08:00
parent 845fc89180
commit afd391f25f

View File

@@ -352,7 +352,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
globals.SugarLogger.Debugf("OnWaybillStatusChanged bill not exist! orderID:%s, bill:%v", bill.VendorOrderID, bill) globals.SugarLogger.Debugf("OnWaybillStatusChanged bill not exist! orderID:%s, bill:%v", bill.VendorOrderID, bill)
} }
switch bill.Status { switch bill.Status {
case model.WaybillStatusAccepted: case model.WaybillStatusAccepted, model.WaybillStatusDelivering:
s.resetTimer(savedOrderInfo, bill, isPending) s.resetTimer(savedOrderInfo, bill, isPending)
if (isBillExist || bill.WaybillVendorID != model.VendorIDDada) && !isPending { // todo 达达运单有错序的情况,临时看看 if (isBillExist || bill.WaybillVendorID != model.VendorIDDada) && !isPending { // todo 达达运单有错序的情况,临时看看
isBillAlreadyCandidate := s.isBillCandidate(order, bill) isBillAlreadyCandidate := s.isBillCandidate(order, bill)
@@ -425,14 +425,14 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
} }
} }
} }
case model.WaybillStatusDelivering: // case model.WaybillStatusDelivering:
s.resetTimer(savedOrderInfo, bill, isPending) // s.resetTimer(savedOrderInfo, bill, isPending)
if s.isBillCandidate(order, bill) { // if s.isBillCandidate(order, bill) {
// do nothing // // do nothing
} else { // } else {
// s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) // // s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
globals.SugarLogger.Infof("OnWaybillStatusChanged Delivering order(%d, %s) bill(%d, %s), bill:%v shouldn't get here", order.WaybillVendorID, order.VendorWaybillID, bill.WaybillVendorID, bill.VendorWaybillID, bill) // globals.SugarLogger.Infof("OnWaybillStatusChanged Delivering order(%d, %s) bill(%d, %s), bill:%v shouldn't get here", order.WaybillVendorID, order.VendorWaybillID, bill.WaybillVendorID, bill.VendorWaybillID, bill)
} // }
case model.WaybillStatusDelivered: case model.WaybillStatusDelivered:
s.resetTimer(savedOrderInfo, bill, isPending) s.resetTimer(savedOrderInfo, bill, isPending)
s.removeWaybillFromMap(savedOrderInfo, bill.WaybillVendorID) s.removeWaybillFromMap(savedOrderInfo, bill.WaybillVendorID)