- send different wx msg when mt changed courier
This commit is contained in:
@@ -359,6 +359,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
||||
case model.WaybillStatusAccepted:
|
||||
s.resetTimer(savedOrderInfo, bill, isPending)
|
||||
if !isPending {
|
||||
isBillAlreadyCandidate := s.isBillCandidate(order, bill)
|
||||
// todo 购买平台的运单,优先级最高,但这样写也可能带来问题,即在这个时间,因为之前3方已经接单,已经发出了转自送请求(而且可能成功了),所以加个状态判断
|
||||
if order.WaybillVendorID == model.VendorIDUnknown ||
|
||||
(order.VendorID == bill.WaybillVendorID && order.VendorID != order.WaybillVendorID && (order.DeliveryFlag&model.OrderDeliveryFlagMaskPurcahseDisabled) == 0) {
|
||||
@@ -381,7 +382,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
||||
globals.SugarLogger.Infof("OnWaybillStatusChanged Accepted orderID:%s got multiple bill:%v", order.VendorOrderID, bill)
|
||||
}
|
||||
if s.isBillCandidate(order, bill) && order.WaybillVendorID != order.VendorID {
|
||||
weixinmsg.NotifyWaybillStatus(bill, order)
|
||||
weixinmsg.NotifyWaybillStatus(bill, order, isBillAlreadyCandidate)
|
||||
}
|
||||
}
|
||||
case model.WaybillStatusAcceptCanceled:
|
||||
@@ -461,7 +462,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
||||
}
|
||||
}
|
||||
if !isPending {
|
||||
weixinmsg.NotifyWaybillStatus(bill, order)
|
||||
weixinmsg.NotifyWaybillStatus(bill, order, false)
|
||||
}
|
||||
case model.WaybillStatusNeverSend: // 平台不配送,直接创建三方运单
|
||||
s.resetTimer(savedOrderInfo, bill, isPending)
|
||||
|
||||
Reference in New Issue
Block a user