fix keyword查询时没有name的bug
This commit is contained in:
parent
38d95b7074
commit
2e26da0a8a
@ -124,7 +124,7 @@ func (g *GetProviderArticleQuery) Scope(db *gorm.DB) *gorm.DB {
|
||||
db = db.Where("trace_ats=?", *g.TraceAts)
|
||||
}
|
||||
if g.Keyword != "" {
|
||||
db = db.Where("(name ilike ? or sku_id ilike ?)", "%"+g.Keyword+"%", "%"+g.Keyword+"%")
|
||||
db = db.Where("sku_id ilike ?", "%"+g.Keyword+"%", "%"+g.Keyword+"%")
|
||||
}
|
||||
return db
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user