diff --git a/service/tracer_svc.go b/service/tracer_svc.go index eadc0fb..a77c867 100644 --- a/service/tracer_svc.go +++ b/service/tracer_svc.go @@ -1,6 +1,8 @@ package service import ( + "time" + "gitea.timerzz.com/kedaya_haitao/common/pkg/web" "gitea.timerzz.com/kedaya_haitao/common/structs/storage" "github.com/gofiber/fiber/v3" @@ -33,7 +35,7 @@ func (s *Tracer) List(c fiber.Ctx) error { return err } articles, total, err := s.storage.ProviderArticle().List(*query, func(db *gorm.DB) *gorm.DB { - db = db.Preload("HistoryAts") + db = db.Preload("HistoryAts", "created_at > ?", time.Now().Add(-12*time.Hour)) return db }) if err != nil {