fix: exclude manual products from product list
This commit is contained in:
@@ -45,7 +45,7 @@ func (s *sSysProduct) listModel(ctx context.Context) *gdb.Model {
|
||||
}
|
||||
func (s *sSysProduct) List(ctx context.Context, in *sysin.ProductListInp) (list []*sysin.ProductListModel, total int, err error) {
|
||||
pc := dao.Product.Columns()
|
||||
mod := s.listModel(ctx)
|
||||
mod := s.listModel(ctx).Where(col("p", pc.ProductType), consts.ProductTypeStandard)
|
||||
if in.Name != "" {
|
||||
mod = mod.WhereLike(col("p", pc.Name), "%"+in.Name+"%")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user