From 3b047ee900c8713528e9ce57b9b717147fc1ebb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Sat, 16 Apr 2022 15:42:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=8E=E5=9B=A2=E5=9C=A8=E5=8F=AC=E5=94=A4?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E9=85=8D=E9=80=81=E6=97=B6=E5=B0=86=E7=BE=8E?= =?UTF-8?q?=E5=9B=A2=E5=A4=96=E5=8D=96=E8=BD=AC=E8=87=AA=E9=80=81,?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E8=BD=AC=E8=87=AA=E9=80=81=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC=E4=B8=8D=E6=98=AFok=E5=88=99?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=89=80=E6=9C=89=E7=9A=84=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E9=85=8D=E9=80=81!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/scheduler/defsch/defsch.go | 3 +++ business/model/api.go | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index 60932ef0e..26940ba7f 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -591,6 +591,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo globals.SugarLogger.Infof("OnWaybillStatusChanged orderID:%s purchase platform waybill arrvied later, may cause problem", order.VendorOrderID) } s.updateOrderByBill(order, bill, false) + // 转自送 s.cancelOtherWaybillsCheckOrderDeliveryFlag(savedOrderInfo, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) //若接单时间不在门店的营业时间范围内要取消运单 s.cancelWaybillNotInStoreOpentime(savedOrderInfo, bill) @@ -630,6 +631,8 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo } else { if model.IsOrderDeliveryByStore(savedOrderInfo.order) { if err := s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile); err != nil { + // 转自送失败,取消三方配送 + s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrSwitch2SelfFailed) partner.CurOrderManager.OnOrderMsg(order, "自送出设置失败", err.Error()) } s.notify3rdPartyWaybill(order, bill, isBillAlreadyCandidate) diff --git a/business/model/api.go b/business/model/api.go index 8748c3020..ddc1fc928 100644 --- a/business/model/api.go +++ b/business/model/api.go @@ -29,12 +29,12 @@ type GoodsOrderExt struct { CurrentConsigneeMobile string `orm:"-" json:"currentConsigneeMobile"` CourierVendorName string `json:"courierVendorName"` - Status2 string `json:"status2"` - ActualFee int64 `json:"actualFee"` // 实际要支付给快递公司的费用 - DesiredFee int64 `json:"desiredFee"` // 运单总费用 - WaybillCreatedAt time.Time `orm:"type(datetime);index" json:"waybillCreatedAt"` - WaybillFinishedAt time.Time `orm:"type(datetime)" json:"waybillFinishedAt"` - VendorWaybillId2Waybill string `orm:"column(vendor_waybill_id2);size(48)" json:"vendorWaybillId2Waybill"` // 某些平台有多个ID,比如美团配送,当前美团配送的 delivery_id存这里 + Status2 string `json:"status2"` + ActualFee int64 `json:"actualFee"` // 实际要支付给快递公司的费用 + DesiredFee int64 `json:"desiredFee"` // 运单总费用 + WaybillCreatedAt time.Time `orm:"type(datetime);index" json:"waybillCreatedAt"` + WaybillFinishedAt time.Time `orm:"type(datetime)" json:"waybillFinishedAt"` + VendorWaybillId2Waybill string `orm:"column(vendor_waybill_id2);size(48)" json:"vendorWaybillId2Waybill"` // 某些平台有多个ID,比如美团配送,当前美团配送的 delivery_id存这里 DistrictName string `json:"districtName"` CityName string `json:"cityName"`