美团在召唤三方配送时将美团外卖转自送,如果转自送接口返回值不是ok则取消所有的三方配送!
This commit is contained in:
@@ -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)
|
globals.SugarLogger.Infof("OnWaybillStatusChanged orderID:%s purchase platform waybill arrvied later, may cause problem", order.VendorOrderID)
|
||||||
}
|
}
|
||||||
s.updateOrderByBill(order, bill, false)
|
s.updateOrderByBill(order, bill, false)
|
||||||
|
// 转自送
|
||||||
s.cancelOtherWaybillsCheckOrderDeliveryFlag(savedOrderInfo, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
s.cancelOtherWaybillsCheckOrderDeliveryFlag(savedOrderInfo, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
||||||
//若接单时间不在门店的营业时间范围内要取消运单
|
//若接单时间不在门店的营业时间范围内要取消运单
|
||||||
s.cancelWaybillNotInStoreOpentime(savedOrderInfo, bill)
|
s.cancelWaybillNotInStoreOpentime(savedOrderInfo, bill)
|
||||||
@@ -630,6 +631,8 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
|||||||
} else {
|
} else {
|
||||||
if model.IsOrderDeliveryByStore(savedOrderInfo.order) {
|
if model.IsOrderDeliveryByStore(savedOrderInfo.order) {
|
||||||
if err := s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile); err != nil {
|
if err := s.SelfDeliverDelivering(savedOrderInfo.order, bill.CourierMobile); err != nil {
|
||||||
|
// 转自送失败,取消三方配送
|
||||||
|
s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrSwitch2SelfFailed)
|
||||||
partner.CurOrderManager.OnOrderMsg(order, "自送出设置失败", err.Error())
|
partner.CurOrderManager.OnOrderMsg(order, "自送出设置失败", err.Error())
|
||||||
}
|
}
|
||||||
s.notify3rdPartyWaybill(order, bill, isBillAlreadyCandidate)
|
s.notify3rdPartyWaybill(order, bill, isBillAlreadyCandidate)
|
||||||
|
|||||||
@@ -29,12 +29,12 @@ type GoodsOrderExt struct {
|
|||||||
CurrentConsigneeMobile string `orm:"-" json:"currentConsigneeMobile"`
|
CurrentConsigneeMobile string `orm:"-" json:"currentConsigneeMobile"`
|
||||||
CourierVendorName string `json:"courierVendorName"`
|
CourierVendorName string `json:"courierVendorName"`
|
||||||
|
|
||||||
Status2 string `json:"status2"`
|
Status2 string `json:"status2"`
|
||||||
ActualFee int64 `json:"actualFee"` // 实际要支付给快递公司的费用
|
ActualFee int64 `json:"actualFee"` // 实际要支付给快递公司的费用
|
||||||
DesiredFee int64 `json:"desiredFee"` // 运单总费用
|
DesiredFee int64 `json:"desiredFee"` // 运单总费用
|
||||||
WaybillCreatedAt time.Time `orm:"type(datetime);index" json:"waybillCreatedAt"`
|
WaybillCreatedAt time.Time `orm:"type(datetime);index" json:"waybillCreatedAt"`
|
||||||
WaybillFinishedAt time.Time `orm:"type(datetime)" json:"waybillFinishedAt"`
|
WaybillFinishedAt time.Time `orm:"type(datetime)" json:"waybillFinishedAt"`
|
||||||
VendorWaybillId2Waybill string `orm:"column(vendor_waybill_id2);size(48)" json:"vendorWaybillId2Waybill"` // 某些平台有多个ID,比如美团配送,当前美团配送的 delivery_id存这里
|
VendorWaybillId2Waybill string `orm:"column(vendor_waybill_id2);size(48)" json:"vendorWaybillId2Waybill"` // 某些平台有多个ID,比如美团配送,当前美团配送的 delivery_id存这里
|
||||||
|
|
||||||
DistrictName string `json:"districtName"`
|
DistrictName string `json:"districtName"`
|
||||||
CityName string `json:"cityName"`
|
CityName string `json:"cityName"`
|
||||||
|
|||||||
Reference in New Issue
Block a user