Merge remote-tracking branch 'origin/main' into pro
Deploy olons-admin production / deploy (push) Successful in 5m27s
Deploy olons-admin production / deploy (push) Successful in 5m27s
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) {
|
func (s *sSysProduct) List(ctx context.Context, in *sysin.ProductListInp) (list []*sysin.ProductListModel, total int, err error) {
|
||||||
pc := dao.Product.Columns()
|
pc := dao.Product.Columns()
|
||||||
mod := s.listModel(ctx)
|
mod := s.listModel(ctx).Where(col("p", pc.ProductType), consts.ProductTypeStandard)
|
||||||
if in.Name != "" {
|
if in.Name != "" {
|
||||||
mod = mod.WhereLike(col("p", pc.Name), "%"+in.Name+"%")
|
mod = mod.WhereLike(col("p", pc.Name), "%"+in.Name+"%")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user