- fix bug, orm.Read need fields name.
This commit is contained in:
@@ -253,7 +253,7 @@ func (c *OrderController) addOrderStatus(orderStatus *model.OrderStatus, db orm.
|
||||
VendorOrderID: orderStatus.VendorOrderID,
|
||||
VendorID: orderStatus.VendorID,
|
||||
}
|
||||
if err = db.ReadForUpdate(order); err == nil {
|
||||
if err = db.ReadForUpdate(order, "VendorOrderID", "VendorID"); err == nil {
|
||||
if orderStatus.Status >= order.Status { // todo 要求status不能回绕
|
||||
order.Status = orderStatus.Status
|
||||
order.VendorStatus = orderStatus.VendorStatus
|
||||
@@ -273,7 +273,7 @@ func (c *OrderController) addOrderStatus(orderStatus *model.OrderStatus, db orm.
|
||||
isDuplicated = true
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Warnf("addOrderStatus orderID:%s read failed with error:%v", err)
|
||||
globals.SugarLogger.Warnf("addOrderStatus orderID:%s read failed with error:%v", order.VendorOrderID, err)
|
||||
}
|
||||
}
|
||||
return isDuplicated, err
|
||||
|
||||
Reference in New Issue
Block a user