- 转自送失败时写日志

This commit is contained in:
gazebo
2019-04-29 18:27:11 +08:00
parent 16d738cca1
commit 2226df4e0a

View File

@@ -570,7 +570,8 @@ func (s *DefScheduler) swtich2SelfDeliverWithRetry(savedOrderInfo *WatchOrderInf
}, order.VendorOrderID)
})
} else {
globals.SugarLogger.Infof("swtich2SelfDeliverWithRetry finally failed, orderID:%s bill:%v, err:%v", order.VendorOrderID, bill, err)
errStr := fmt.Sprintf("订单:%s转自配送失败, 错误信息:%v", order.VendorOrderID, err)
globals.SugarLogger.Info(errStr)
if s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonSwitch2SelfFailed, partner.CancelWaybillReasonStrSwitch2SelfFailed) == nil {
// 转自送失败的取消,要将订单中的运单状态更新
if s.isBillCandidate(order, bill) {
@@ -578,6 +579,7 @@ func (s *DefScheduler) swtich2SelfDeliverWithRetry(savedOrderInfo *WatchOrderInf
s.updateOrderByBill(order, bill, false)
}
}
partner.CurOrderManager.OnOrderMsg(order, "转商家自配送", errStr)
}
} else {
s.removeWaybillFromMap(savedOrderInfo, order.VendorID)