This commit is contained in:
gazebo
2019-03-28 13:40:47 +08:00
parent ad2182f914
commit 34edcda30c

View File

@@ -810,8 +810,8 @@ func (s *DefScheduler) mergeOrderStatusConfig(order *model.GoodsOrder, statusTyp
retVal = &StatusActionConfig{} retVal = &StatusActionConfig{}
*retVal = *defConfig *retVal = *defConfig
var vendorActionParams *partner.StatusActionParams
if model.IsOrderSolid(order) { if model.IsOrderSolid(order) {
var vendorActionParams *partner.StatusActionParams
if order.BusinessType != model.BusinessTypeImmediate { if order.BusinessType != model.BusinessTypeImmediate {
if jxutils.IsTimeEmpty(order.ExpectedDeliveredTime) { if jxutils.IsTimeEmpty(order.ExpectedDeliveredTime) {
globals.SugarLogger.Warnf("mergeOrderStatusConfig orderID:%s 非立即达订单没有预计送达时间, orderDetail:%s", order.VendorOrderID, utils.Format4Output(order, false)) globals.SugarLogger.Warnf("mergeOrderStatusConfig orderID:%s 非立即达订单没有预计送达时间, orderDetail:%s", order.VendorOrderID, utils.Format4Output(order, false))
@@ -829,17 +829,17 @@ func (s *DefScheduler) mergeOrderStatusConfig(order *model.GoodsOrder, statusTyp
} }
} }
} }
if vendorActionParams == nil { }
vendorActionParams = partner.GetPurchasePlatformFromVendorID(purchaseVendorID).GetStatusActionTimeout(order, statusType, status) if vendorActionParams == nil {
vendorActionParams = partner.GetPurchasePlatformFromVendorID(purchaseVendorID).GetStatusActionTimeout(order, statusType, status)
}
if vendorActionParams != nil {
retVal.Timeout = vendorActionParams.Timeout
if vendorActionParams.TimeoutGap >= 0 {
retVal.TimeoutGap = vendorActionParams.TimeoutGap
} }
if vendorActionParams != nil { if vendorActionParams.TimerType != partner.TimerTypeNoOverride {
retVal.Timeout = vendorActionParams.Timeout retVal.TimerType = vendorActionParams.TimerType
if vendorActionParams.TimeoutGap >= 0 {
retVal.TimeoutGap = vendorActionParams.TimeoutGap
}
if vendorActionParams.TimerType != partner.TimerTypeNoOverride {
retVal.TimerType = vendorActionParams.TimerType
}
} }
} }
return retVal return retVal