dyps update

This commit is contained in:
richboo111
2023-01-09 13:48:35 +08:00
22 changed files with 400 additions and 344 deletions

View File

@@ -596,6 +596,21 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
// s.addWaybill2Map(savedOrderInfo, bill) // updateBillsInfo中会添加
globals.SugarLogger.Debugf("OnWaybillStatusChanged bill not exist! orderID:%s, bill:%v", bill.VendorOrderID, bill)
}
// 美团订单会存在:用户直接申请退款,不推送取消消息!导致三方配送未取消!
if order.Status >= model.OrderStatusCanceled {
s.removeWaybillFromMap(savedOrderInfo, bill.WaybillVendorID)
if s.isBillCandidate(order, bill) {
s.resetTimer(savedOrderInfo, bill, isPending)
if !isPending {
s.updateOrderByBill(order, nil, true)
}
} else if model.IsOrderHaveWaybill(order) {
s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
if !isPending {
globals.SugarLogger.Warnf("OnWaybillStatusChanged AcceptCanceled orderID:%s got multiple bill:%v, order details:%v", order.VendorOrderID, bill, order)
}
}
}
switch bill.Status {
case model.WaybillStatusAccepted, model.WaybillStatusCourierAssigned, model.WaybillStatusCourierArrived, model.WaybillStatusDelivering:
s.resetTimer(savedOrderInfo, bill, isPending)