Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 过滤下架商品 #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ public List<PmsProduct> search(String keyword, Long brandId, Long productCategor
PmsProductExample example = new PmsProductExample();
PmsProductExample.Criteria criteria = example.createCriteria();
criteria.andDeleteStatusEqualTo(0);
criteria.andPublishStatusEqualTo(1);
if (StrUtil.isNotEmpty(keyword)) {
criteria.andNameLike("%" + keyword + "%");
}
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ public CommonPage<PmsProduct> productList(Long brandId, Integer pageNum, Integer
PageHelper.startPage(pageNum,pageSize);
PmsProductExample example = new PmsProductExample();
example.createCriteria().andDeleteStatusEqualTo(0)
.andPublishStatusEqualTo(1)
.andBrandIdEqualTo(brandId);
List<PmsProduct> productList = productMapper.selectByExample(example);
return CommonPage.restPage(productList);