From a904ebfee540d480b416647851f64d9b395b0a5a Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 8 May 2019 17:57:53 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=B9=B3=E5=8F=B0=E8=BF=90=E5=8D=95?= =?UTF-8?q?=E6=8E=A5=E5=8D=95=E5=90=8E=E5=B0=86=E8=AE=A2=E5=8D=95=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=BC=BA=E5=88=B6=E8=AE=BE=E7=BD=AE=E4=B8=BA=E9=85=8D?= =?UTF-8?q?=E9=80=81=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jxcallback/scheduler/defsch/defsch.go | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index efbbb15db..2b9763c77 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -368,13 +368,21 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo } s.updateOrderByBill(order, bill, false) s.cancelOtherWaybillsCheckOrderDeliveryFlag(savedOrderInfo, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) - if !s.IsOrderPlatformWaybill(bill) && savedOrderInfo.storeDeliveryType != scheduler.StoreDeliveryTypeByStore { - s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, 2, 10*time.Second) - } else if s.IsSpecialOrderPlatformWaybill(bill) { - s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile) - utils.CallFuncAsync(func() { - weixinmsg.NotifyWaybillStatus(bill, order, isBillAlreadyCandidate) - }) + + if s.IsOrderPlatformWaybill(bill) { + // 强制将订单状态置为配送中? + order.Status = model.OrderStatusDelivering + partner.CurOrderManager.UpdateOrderStatusAndFlag(order) + } else { + if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore || + s.IsSpecialOrderPlatformWaybill(bill) { + s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile) + utils.CallFuncAsync(func() { + weixinmsg.NotifyWaybillStatus(bill, order, isBillAlreadyCandidate) + }) + } else { + s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, 2, 10*time.Second) + } } } else if !s.isBillCandidate(order, bill) && bill.WaybillVendorID != order.VendorID { // 发生这种情况的原因就是两个接单事件几乎同时到达(来不及取消),也算正常