- write legacy jxoder almost ok.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package model
|
||||
|
||||
// VendorIDJD, VendorIDMTWM与VendorIDELM的定义和老系统是兼容的
|
||||
const (
|
||||
VendorIDUnknown = -1
|
||||
VendorIDPurchaseBegin = 0
|
||||
@@ -57,7 +58,7 @@ const (
|
||||
OrderStatusFinishedPickup = 15 // 拣货完成
|
||||
OrderStatusDelivering = 20 // 开始配送,配送员已取货,从这里开始就是运单消息了
|
||||
|
||||
OrderStatusEndBegin = 100 // 以上的状态就是结束状态
|
||||
OrderStatusEndBegin = 100 // 以下的状态就是结束状态
|
||||
OrderStatusDelivered = 105 // 妥投
|
||||
OrderStatusFinished = 110 // 订单已完成
|
||||
OrderStatusCanceled = 115 // 订单已取消
|
||||
@@ -78,6 +79,7 @@ const (
|
||||
WaybillStatusCourierArrived = 15 // 此状态是可选的,明确写出来是因为还是较重要的状态,但业务逻辑不应依赖此状态
|
||||
WaybillStatusDelivering = 20
|
||||
|
||||
WaybillStatusEndBegin = 100 // 以下的状态就是结束状态
|
||||
WaybillStatusDelivered = 105
|
||||
WaybillStatusCanceled = 115
|
||||
WaybillStatusFailed = 120
|
||||
|
||||
@@ -23,9 +23,9 @@ type GoodsOrder struct {
|
||||
ConsigneeName string `orm:"size(32)"`
|
||||
ConsigneeMobile string `orm:"size(32)"`
|
||||
ConsigneeAddress string `orm:"size(255)"`
|
||||
CoordinateType int
|
||||
ConsigneeLng int // 坐标 * (10的六次方)
|
||||
ConsigneeLat int // 坐标 * (10的六次方)
|
||||
CoordinateType int
|
||||
SkuCount int // 商品类别数量,即有多少种商品(注意在某些情况下,相同SKU的商品由于售价不同,也会当成不同商品在这个值里)
|
||||
GoodsCount int // 商品个数
|
||||
Status int // 参见OrderStatus*相关的常量定义
|
||||
@@ -36,8 +36,6 @@ type GoodsOrder struct {
|
||||
ExpectedDeliveredTime time.Time `orm:"type(datetime)"` // 预期送达时间
|
||||
CancelApplyReason string `orm:"size(255)"` // ""表示没有申请,不为null表示用户正在取消申请
|
||||
WaybillVendorID int `orm:"column(waybill_vendor_id)"`
|
||||
WaybillStatus int
|
||||
WaybillVendorStatus string `orm:"size(16)"`
|
||||
DuplicatedCount int // 重复新订单消息数,这个一般不是由于消息重发造成的(消息重发由OrderStatus过滤),一般是业务逻辑造成的
|
||||
OrderCreatedAt time.Time `orm:"type(datetime);index"`
|
||||
OrderFinishedAt time.Time `orm:"type(datetime)"`
|
||||
@@ -111,14 +109,16 @@ func (w *Waybill) TableIndex() [][]string {
|
||||
|
||||
// 包含订单与运单的状态及事件vendor status
|
||||
type OrderStatus struct {
|
||||
ID int64 `orm:"column(id)"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)"`
|
||||
VendorID int `orm:"column(vendor_id)"`
|
||||
OrderType int // 0:订单,1:运单
|
||||
Status int // 如果Status为OrderStatusEvent,表示VendorStatus只是一个通知事件,不是状态变化
|
||||
VendorStatus string `orm:"size(16)"`
|
||||
StatusTime time.Time `orm:"type(datetime);index"`
|
||||
DuplicatedCount int // 收到的重复状态转换(或消息)数,一般是由于重发造成的
|
||||
ID int64 `orm:"column(id)"`
|
||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)"`
|
||||
VendorID int `orm:"column(vendor_id)"`
|
||||
OrderType int // 0:订单,1:运单
|
||||
RefVendorOrderID string `orm:"column(ref_vendor_order_id);size(48)"`
|
||||
RefVendorID int `orm:"column(ref_vendor_id)"`
|
||||
Status int // 如果Status为OrderStatusEvent,表示VendorStatus只是一个通知事件,不是状态变化
|
||||
VendorStatus string `orm:"size(16)"`
|
||||
StatusTime time.Time `orm:"type(datetime);index"`
|
||||
DuplicatedCount int // 收到的重复状态转换(或消息)数,一般是由于重发造成的
|
||||
ModelTimeInfo
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user