- elm self delivery support.
This commit is contained in:
@@ -10,6 +10,12 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
const (
|
||||
StoreDeliveryTypeCrowdSourcing = 0 //缺省,平台众包配送,可转自送
|
||||
StoreDeliveryTypeByPlatform = 1 //平台专送
|
||||
StoreDeliveryTypeByStore = 2 //完全门店自送
|
||||
)
|
||||
|
||||
const (
|
||||
TimerStatusTypeUnknown = -1
|
||||
TimerStatusTypeOrder = 0
|
||||
@@ -36,17 +42,10 @@ var (
|
||||
ErrOrderIsNotSolid = errors.New("订单是临时订单,不完整,不能用于创建运单")
|
||||
)
|
||||
|
||||
type StatusActionConfig struct {
|
||||
TimerType int // 参见上面的相关常量定义
|
||||
Timeout time.Duration // 超时时间,0在GetStatusActionConfig返回时表示不修改缺省
|
||||
TimeoutGap int // 以秒为单位的随机时间,0在GetStatusActionConfig返回时表示不修改缺省
|
||||
TimeoutAction func(order *model.GoodsOrder) (err error) // 超时后需要执行的动作,为nil表示此状态不需要执行监控, nil在GetStatusActionConfig返回时表示不修改缺省
|
||||
}
|
||||
|
||||
type PurchasePlatformHandler interface {
|
||||
GetStatusFromVendorStatus(vendorStatus string) int
|
||||
GetOrder(vendorOrderID string) (order *model.GoodsOrder, err error)
|
||||
GetStatusActionConfig(statusType, status int) *StatusActionConfig
|
||||
GetStatusActionTimeout(statusType, status int) time.Duration
|
||||
|
||||
AcceptOrRefuseOrder(order *model.GoodsOrder, isAcceptIt bool) (err error)
|
||||
PickedUpGoods(order *model.GoodsOrder) (err error)
|
||||
@@ -236,6 +235,6 @@ func (c *BaseScheduler) CancelWaybill(bill *model.Waybill) (err error) {
|
||||
type BasePurchasePlatform struct {
|
||||
}
|
||||
|
||||
func (p *BasePurchasePlatform) GetStatusActionConfig(statusType, status int) *StatusActionConfig {
|
||||
return nil
|
||||
func (p *BasePurchasePlatform) GetStatusActionTimeout(statusType, status int) time.Duration {
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user