- don't remove waybill when cancel it successfully.

This commit is contained in:
gazebo
2019-02-27 11:07:57 +08:00
parent 796567c364
commit 9df6213532

View File

@@ -550,9 +550,10 @@ func (s *DefScheduler) cancelOtherWaybills(savedOrderInfo *WatchOrderInfo, bill2
} }
} }
if len(toBeDeleted) > 0 { if len(toBeDeleted) > 0 {
for _, v := range toBeDeleted { // todo 这里为什么要删除运单,应该只需要在运单完成,取消或失败时才删除
s.removeWaybillFromMap(savedOrderInfo, v.WaybillVendorID) // for _, v := range toBeDeleted {
} // s.removeWaybillFromMap(savedOrderInfo, v.WaybillVendorID)
// }
} else { } else {
globals.SugarLogger.Debugf("cancelOtherWaybills, orderID:%s, bill:%v cancel 0 bills", savedOrderInfo.order.VendorOrderID, bill2Keep) globals.SugarLogger.Debugf("cancelOtherWaybills, orderID:%s, bill:%v cancel 0 bills", savedOrderInfo.order.VendorOrderID, bill2Keep)
} }