- big refactor for scheduler.

This commit is contained in:
gazebo
2018-07-25 20:43:41 +08:00
parent f3df85c8e0
commit c0770e9ab5
16 changed files with 515 additions and 321 deletions

View File

@@ -30,6 +30,28 @@ var (
VendorIDDada: "达达众包",
VendorIDMTPS: "美团配送",
}
OrderStatusName = map[int]string{
OrderStatusNew: "OrderStatusNew",
OrderStatusAdjust: "OrderStatusAdjust",
OrderStatusAccepted: "OrderStatusAccepted",
OrderStatusFinishedPickup: "OrderStatusFinishedPickup",
OrderStatusDelivering: "OrderStatusDelivering",
OrderStatusDelivered: "OrderStatusDelivered",
OrderStatusFinished: "OrderStatusFinished",
OrderStatusCanceled: "OrderStatusCanceled",
OrderStatusFailed: "OrderStatusFailed",
}
WaybillStatusName = map[int]string{
WaybillStatusNew: "WaybillStatusNew",
WaybillStatusAcceptCanceled: "WaybillStatusAcceptCanceled",
WaybillStatusAccepted: "WaybillStatusAccepted",
WaybillStatusCourierArrived: "WaybillStatusCourierArrived",
WaybillStatusDelivering: "WaybillStatusDelivering",
WaybillStatusDelivered: "WaybillStatusDelivered",
WaybillStatusCanceled: "WaybillStatusCanceled",
WaybillStatusFailed: "WaybillStatusFailed",
}
)
const (
@@ -93,3 +115,8 @@ const (
WaybillStatusCanceled = 115
WaybillStatusFailed = 120
)
const (
BusinessTypeImmediate = 1
BusinessTypeDingshida = 2
)

View File

@@ -32,8 +32,9 @@ type GoodsOrder struct {
Status int // 参见OrderStatus*相关的常量定义
VendorStatus string `orm:"size(255)"`
LockStatus int
OrderSeq int // 门店订单序号
BuyerComment string `orm:"size(255)"`
OrderSeq int // 门店订单序号
BuyerComment string `orm:"size(255)"`
BusinessType int
ExpectedDeliveredTime time.Time `orm:"type(datetime)"` // 预期送达时间
CancelApplyReason string `orm:"size(255)"` // ""表示没有申请不为null表示用户正在取消申请
WaybillVendorID int `orm:"column(waybill_vendor_id)"` // 表示当前承运商,-1表示还没有安排