fix: exclude manual products from product list

This commit is contained in:
richjohnrambo
2026-10-19 10:14:55 +08:00
parent 0ce6bca10e
commit 661486e46e
+1 -1
View File
@@ -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+"%")
}