feat preload获取CalculateProcess

This commit is contained in:
timerzz 2024-09-02 21:22:28 +08:00
parent 716b08f775
commit 0cdbd49118

View File

@ -131,7 +131,7 @@ func NewGetArticleQuery() *GetArticleQuery {
}
func (g *GetArticleQuery) Scope(db *gorm.DB) *gorm.DB {
db = db.Preload("Providers").Preload("Sellers")
db = db.Preload("Providers").Preload("Providers.CalculateProcess").Preload("Sellers").Preload("Sellers.CalculateProcess")
if g.ID != 0 {
db = db.Where("id=?", g.ID)
}