diff --git a/business/jxcallback/orderman/order_afs.go b/business/jxcallback/orderman/order_afs.go index c324e4565..91271981a 100644 --- a/business/jxcallback/orderman/order_afs.go +++ b/business/jxcallback/orderman/order_afs.go @@ -2,6 +2,7 @@ package orderman import ( "strings" + "time" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxcallback/scheduler" @@ -222,6 +223,9 @@ func (c *OrderManager) addAfsOrderStatus(db *dao.DaoDB, orderStatus *model.Order } if model.IsAfsOrderFinalStatus(orderStatus.Status) { order.AfsFinishedAt = orderStatus.StatusTime + if utils.IsTimeZero(order.AfsFinishedAt) { + order.AfsFinishedAt = time.Now() + } updateFields = append(updateFields, "AfsFinishedAt") if handler := partner.GetPurchaseOrderHandlerFromVendorID(order.VendorID); handler != nil { if orderAfsInfo, err := handler.GetOrderAfsInfo(nil, order.VendorOrderID, order.AfsOrderID); err == nil && orderAfsInfo.AfsTotalShopMoney != 0 {