feat preload获取CalculateProcess
This commit is contained in:
parent
716b08f775
commit
0cdbd49118
@ -131,7 +131,7 @@ func NewGetArticleQuery() *GetArticleQuery {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *GetArticleQuery) Scope(db *gorm.DB) *gorm.DB {
|
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 {
|
if g.ID != 0 {
|
||||||
db = db.Where("id=?", g.ID)
|
db = db.Where("id=?", g.ID)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user