- 定单--->订单

This commit is contained in:
gazebo
2018-07-16 17:17:37 +08:00
parent b75739d6c2
commit 5e59317ec7
7 changed files with 16 additions and 16 deletions

View File

@@ -38,7 +38,7 @@ type GoodsOrder struct {
WaybillVendorID int `orm:"column(waybill_vendor_id)"`
WaybillStatus int
WaybillVendorStatus string `orm:"size(16)"`
DuplicatedCount int // 重复新单消息数,这个一般不是由于消息重发成的消息重发由OrderStatus过滤一般是业务逻辑成的
DuplicatedCount int // 重复新单消息数,这个一般不是由于消息重发成的消息重发由OrderStatus过滤一般是业务逻辑成的
OrderCreatedAt time.Time `orm:"type(datetime);index"`
OrderFinishedAt time.Time `orm:"type(datetime)"`
ModelTimeInfo
@@ -69,7 +69,7 @@ type OrderSku struct {
OrderCreatedAt time.Time `orm:"type(datetime);index"` // 分区考虑
}
// 同样商品在一个单中可能重复出现(比如搞活动时,相同商品价格不一样,第一个有优惠)
// 同样商品在一个单中可能重复出现(比如搞活动时,相同商品价格不一样,第一个有优惠)
// 所以这里不能用唯一索引
func (o *OrderSku) TableIndex() [][]string {
return [][]string{
@@ -90,7 +90,7 @@ type Waybill struct {
VendorStatus string `orm:"size(16)"`
ActualFee int64 // 实际要支付给快递公司的实际费用
DesiredFee int64 // 根据合同计算出来的预期费用
DuplicatedCount int // 重复新单消息数,这个一般不是由于消息重发成的消息重发由OrderStatus过滤一般是业务逻辑成的
DuplicatedCount int // 重复新单消息数,这个一般不是由于消息重发成的消息重发由OrderStatus过滤一般是业务逻辑成的
WaybillCreatedAt time.Time `orm:"type(datetime);index"`
WaybillFinishedAt time.Time `orm:"type(datetime)"`
ModelTimeInfo
@@ -109,16 +109,16 @@ func (w *Waybill) TableIndex() [][]string {
}
}
// 包含单与运单的状态及事件vendor status
// 包含单与运单的状态及事件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运单
OrderType int // 0:1运单
Status int // 如果Status为OrderStatusEvent表示VendorStatus只是一个通知事件不是状态变化
VendorStatus string `orm:"size(16)"`
StatusTime time.Time `orm:"type(datetime);index"`
DuplicatedCount int // 收到的重复状态转换(或消息)数,一般是由于重发成的
DuplicatedCount int // 收到的重复状态转换(或消息)数,一般是由于重发成的
ModelTimeInfo
}