1
This commit is contained in:
@@ -235,15 +235,23 @@ func (c *OrderManager) addAfsOrderStatus(db *dao.DaoDB, orderStatus *model.Order
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
utils.CallFuncLogError(func() error {
|
||||
_, err = dao.UpdateEntity(db, order, updateFields...)
|
||||
return err
|
||||
}, "addAfsOrderStatus update orderID:%s, status:%v", order.VendorOrderID, orderStatus)
|
||||
_, err = dao.UpdateEntity(db, order, updateFields...)
|
||||
//utils.CallFuncLogError(func() error {
|
||||
// _, err = dao.UpdateEntity(db, order, updateFields...)
|
||||
// return err
|
||||
//}, "addAfsOrderStatus update orderID:%s, status:%v", order.VendorOrderID, orderStatus)
|
||||
} else {
|
||||
isDuplicated = true
|
||||
}
|
||||
} else {
|
||||
// 这是发现有部分订单已经完成,但是没有完成时间影响到导出结果错误
|
||||
if model.IsAfsOrderFinalStatus(orderStatus.Status) || orderStatus.Status == model.AfsOrderStatusNew && order.VendorID == model.VendorIDMTWM {
|
||||
if afsOrderObj, _ := partner.CurOrderManager.LoadAfsOrder(orderStatus.VendorOrderID, orderStatus.VendorID); afsOrderObj != nil {
|
||||
afsOrderObj.AfsFinishedAt = time.Now()
|
||||
afsOrderObj.Status = orderStatus.Status
|
||||
dao.UpdateEntity(db, afsOrderObj, "AfsFinishedAt", "Status")
|
||||
}
|
||||
}
|
||||
if dao.IsNoRowsError(err) { // todo 消息错序
|
||||
err = nil
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user