feat 添加preload

This commit is contained in:
timerzz 2024-12-02 15:45:45 +08:00
parent 6c981e119c
commit 38d95b7074

View File

@ -191,7 +191,7 @@ func (g *GetArticleQuery) Scope(db *gorm.DB) *gorm.DB {
db = db.Where("pid=?", g.Pid)
}
if g.History {
db = db.Preload("Providers.HistoryPrice").Preload("Sellers.HistoryPrice")
db = db.Preload("Providers.HistoryPrice").Preload("Providers.HistoryAts").Preload("Sellers.HistoryPrice")
}
return db
}