! 不缓存订单,每次订单或运单事件时都实时加载订单,状态变化立即存储
This commit is contained in:
@@ -157,7 +157,7 @@ type OrderStatus struct {
|
||||
DuplicatedCount int `json:"-"` // 收到的重复状态转换(或消息)数,一般是由于重发造成的
|
||||
Remark string `orm:"size(255)" json:"remark"`
|
||||
ModelTimeInfo `json:"-"`
|
||||
LockStatus int `orm:"-" json:"-"` // todo 只是用于传递状态,应该可以优化掉
|
||||
// LockStatus int `orm:"-" json:"-"` // todo 只是用于传递状态,应该可以优化掉
|
||||
}
|
||||
|
||||
func (v *OrderStatus) TableIndex() [][]string {
|
||||
@@ -177,7 +177,7 @@ func Order2Status(order *GoodsOrder) (retVal *OrderStatus) {
|
||||
Status: order.Status,
|
||||
VendorStatus: order.VendorStatus,
|
||||
StatusTime: order.StatusTime,
|
||||
LockStatus: order.LockStatus,
|
||||
// LockStatus: order.LockStatus,
|
||||
}
|
||||
return retVal
|
||||
}
|
||||
@@ -199,7 +199,7 @@ func Waybill2Status(bill *Waybill) (retVal *OrderStatus) {
|
||||
|
||||
// 判断订单是否是临时的,不是真实收到了new order消息后的订单
|
||||
func IsOrderSolid(order *GoodsOrder) bool {
|
||||
return !(order.ConsigneeName == "" && order.ID == 0)
|
||||
return order != nil && !(order.ConsigneeName == "" && order.ID == 0)
|
||||
}
|
||||
|
||||
func (o *GoodsOrder) GetStatusTime() time.Time {
|
||||
|
||||
Reference in New Issue
Block a user