From 8c73e7b4f7df5da6c451d34f061c8c815b6c4396 Mon Sep 17 00:00:00 2001 From: timerzz Date: Tue, 3 Dec 2024 21:16:59 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E8=8E=B7=E5=8F=96=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E6=97=B6=E5=8F=AA=E6=8B=BF=E6=9C=80=E8=BF=9112=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/tracer_svc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 {