查询分类下是否存在商品,去除掉已删除商品
This commit is contained in:
parent
cbcadc21a2
commit
c20f3ff04d
@ -96,6 +96,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
||||
public final Integer getGoodsCountByCategory(String categoryId) {
|
||||
QueryWrapper queryWrapper = Wrappers.query();
|
||||
queryWrapper.like("category_path", categoryId);
|
||||
queryWrapper.eq("delete_flag", false);
|
||||
return this.count(queryWrapper);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user