This commit is contained in:
parent
285c498ba1
commit
8c73e7b4f7
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user