1
This commit is contained in:
@@ -944,6 +944,9 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
|
||||
if db == nil {
|
||||
db = dao.GetDB()
|
||||
}
|
||||
if orderStatus.RefVendorOrderID == "1100842032100912947" {
|
||||
globals.SugarLogger.Debugf("======================: %s", utils.Format4Output(orderStatus, false))
|
||||
}
|
||||
isDuplicated, err = addOrderOrWaybillStatus(orderStatus, db)
|
||||
if err == nil && !isDuplicated && (orderStatus.Status != model.OrderStatusUnknown && orderStatus.Status != model.OrderStatusMsg) {
|
||||
// todo 加这个代码的原因是,抖店运单取消会去将本地的订单状态设置为取消,跳过,不修改本地订单状态
|
||||
@@ -961,6 +964,9 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
|
||||
// if orderStatus.VendorID == model.VendorIDMTWM && model.IsOrderFinalStatus(order.Status) {
|
||||
// return false, order, nil
|
||||
// }
|
||||
if orderStatus.RefVendorOrderID == "1100842032100912947" {
|
||||
globals.SugarLogger.Debugf("======================: %s", utils.Format4Output(order, false))
|
||||
}
|
||||
if (model.IsOrderLockStatus(orderStatus.Status) || model.IsOrderUnlockStatus(orderStatus.Status)) ||
|
||||
(model.IsOrderMainStatus(orderStatus.Status) && orderStatus.Status >= order.Status) { // todo 要求status不能回绕
|
||||
order.VendorStatus = orderStatus.VendorStatus
|
||||
@@ -994,6 +1000,9 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
|
||||
updateFields = append(updateFields, "LockStatus", "LockStatusTime", "Flag")
|
||||
}
|
||||
}
|
||||
if orderStatus.RefVendorOrderID == "1100842032100912947" {
|
||||
globals.SugarLogger.Debugf("======================:2 %s", utils.Format4Output(order, false))
|
||||
}
|
||||
utils.CallFuncLogError(func() error {
|
||||
_, err = db.Db.Update(order, updateFields...)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user