This commit is contained in:
邹宗楠
2023-07-31 18:01:01 +08:00
parent c54db9a9e1
commit cf7970f823
2 changed files with 7 additions and 7 deletions

View File

@@ -712,13 +712,6 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
globals.SugarLogger.Warnf("OnWaybillStatusChanged AcceptCanceled orderID:%s got multiple bill:%v, order details:%v", order.VendorOrderID, bill, order)
}
}
// case model.WaybillStatusCourierArrived: // do nothing
// s.resetTimer(savedOrderInfo, bill, isPending)
// if s.isBillCandidate(order, bill) {
// } else {
// // s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
// globals.SugarLogger.Infof("OnWaybillStatusChanged CourierArrived order(%d, %s) bill(%d, %s), bill:%v shouldn't get here", order.WaybillVendorID, order.VendorWaybillID, bill.WaybillVendorID, bill.VendorWaybillID, bill)
// }
case model.WaybillStatusCanceled, model.WaybillStatusFailed:
s.removeWaybillFromMap(savedOrderInfo, bill.WaybillVendorID)
if s.isBillCandidate(order, bill) || order.WaybillVendorID == model.VendorIDUnknown {
@@ -740,6 +733,10 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
}
}
}
if order.Status == model.OrderStatusDelivering && bill.Status == model.WaybillStatusCanceled {
order.Status = model.OrderStatusFinishedPickup
dao.UpdateEntity(dao.GetDB(), order, "Status")
}
if err := orderman.ResetCreateWaybillFee(nil, order, bill); err != nil {
globals.SugarLogger.Errorf("ResetCreateWaybillFee err : %v", err)

View File

@@ -439,6 +439,9 @@ func (c *PurchaseHandler) callbackOrderMsg2Status(msg *tao_vegetable.CallbackOrd
case tao_vegetable.OrderStatusSuccess: // 送达
orderStatus.Status = model.OrderStatusFinished
orderStatus.Remark = "订单送达"
case tao_vegetable.OrderStatusRefundClose: // 订单取消
orderStatus.Status = model.OrderStatusCanceled
orderStatus.Remark = "订单取消"
}
return orderStatus
}