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"`