- big refactor for scheduler.
This commit is contained in:
@@ -158,6 +158,11 @@ func (c *OrderController) GetOrder(orderID string) (order *model.GoodsOrder, err
|
||||
Skus: []*model.OrderSku{},
|
||||
}
|
||||
order.Status = c.GetStatusFromVendorStatus(order.VendorStatus)
|
||||
if result["book"].(bool) {
|
||||
order.BusinessType = model.BusinessTypeDingshida
|
||||
} else {
|
||||
order.BusinessType = model.BusinessTypeImmediate
|
||||
}
|
||||
deliveryGeo := strings.Split(utils.Interface2String(result["deliveryGeo"]), ",")
|
||||
if len(deliveryGeo) == 2 {
|
||||
order.CoordinateType = model.CoordinateTypeMars
|
||||
@@ -273,8 +278,11 @@ func (c *OrderController) SelfDeliverDelievered(order *model.GoodsOrder) (err er
|
||||
return api.ElmAPI.CompleteDeliveryBySelf(order.VendorOrderID, order.ConsigneeMobile)
|
||||
}
|
||||
|
||||
func (c *OrderController) GetStatusActionConfig(status int) *scheduler.StatusActionConfig {
|
||||
return &scheduler.StatusActionConfig{
|
||||
Timeout: acceptOrderDelay, // 饿了么没有拣货状态,接单后就为拣货完成,所以要延迟接单,否则门店来不及备货
|
||||
func (c *OrderController) GetStatusActionConfig(statusType, status int) *scheduler.StatusActionConfig {
|
||||
if statusType == scheduler.TimerStatusTypeOrder && status == model.OrderStatusNew {
|
||||
return &scheduler.StatusActionConfig{
|
||||
Timeout: acceptOrderDelay, // 饿了么没有拣货状态,接单后就为拣货完成,所以要延迟接单,否则门店来不及备货
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user