- refactor

- load pending orders, fixed bug.
This commit is contained in:
gazebo
2018-07-22 00:19:38 +08:00
parent b9e59e1197
commit 77c1dd07b5
18 changed files with 168 additions and 145 deletions

View File

@@ -23,7 +23,7 @@ func Waybill2Status(bill *Waybill) (retVal *OrderStatus) {
RefVendorID: bill.OrderVendorID,
Status: bill.Status,
VendorStatus: bill.VendorStatus,
StatusTime: bill.WaybillCreatedAt,
StatusTime: bill.StatusTime,
}
return retVal
}

View File

@@ -40,10 +40,10 @@ type GoodsOrder struct {
DuplicatedCount int // 重复新订单消息数这个一般不是由于消息重发造成的消息重发由OrderStatus过滤一般是业务逻辑造成的
OrderCreatedAt time.Time `orm:"type(datetime);index"`
OrderFinishedAt time.Time `orm:"type(datetime)"`
StatusTime time.Time `orm:"type(datetime)"` // last status time
ModelTimeInfo
OriginalData string `orm:"type(text)"`
Skus []*OrderSku `orm:"-"`
StatusTime time.Time `orm:"-"` // 用于传递数据,不实际存储
}
func (o *GoodsOrder) TableUnique() [][]string {
@@ -91,8 +91,9 @@ type Waybill struct {
ActualFee int64 // 实际要支付给快递公司的实际费用
DesiredFee int64 // 根据合同计算出来的预期费用
DuplicatedCount int // 重复新订单消息数这个一般不是由于消息重发造成的消息重发由OrderStatus过滤一般是业务逻辑造成的
WaybillCreatedAt time.Time `orm:"type(datetime);index"` // 此字段在此结构体用于传递非新运单消息时,为事件发生事件(而非运单创建时间)
WaybillCreatedAt time.Time `orm:"type(datetime);index"`
WaybillFinishedAt time.Time `orm:"type(datetime)"`
StatusTime time.Time `orm:"type(datetime)"` // last status time
ModelTimeInfo
OriginalData string `orm:"type(text)"`
}