Skip to content

Commit

Permalink
fix(dmsvr): 修改产品查询过滤BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Znonymous29 authored Sep 15, 2023
1 parent bef2d2f commit 302c21a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dmsvr/internal/repo/relationDB/productInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ func (p ProductInfoRepo) fmtFilter(ctx context.Context, f ProductFilter) *gorm.D
db = db.Where("product_name like ?", "%"+f.ProductName+"%")
}
if len(f.ProductIDs) != 0 {
db = db.Where("product_id = ?", f.ProductIDs)
db = db.Where("product_id in ?", f.ProductIDs)
}
if len(f.ProductNames) != 0 {
db = db.Where("product_name = ?", f.ProductNames)
db = db.Where("product_name in ?", f.ProductNames)
}
if f.Tags != nil {
for k, v := range f.Tags {
Expand Down

0 comments on commit 302c21a

Please sign in to comment.