fix:修复选不到产品问题

liutao_branch
HuangHuiKang 2 weeks ago
parent cc7e96e135
commit 1b839d89ce

@ -72,7 +72,7 @@ public interface ErpProductMapper extends BaseMapperX<ErpProductDO> {
LambdaQueryWrapper<ErpProductDO> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ErpProductDO> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ErpProductDO::getStatus, 0); wrapper.eq(ErpProductDO::getStatus, 0);
if (CollUtil.isNotEmpty(categoryIds)) { if (categoryIds!=null && !categoryIds.isEmpty() ) {
wrapper.in(ErpProductDO::getCategoryId, categoryIds); wrapper.in(ErpProductDO::getCategoryId, categoryIds);
} }

@ -159,7 +159,12 @@ public class ErpProductServiceImpl implements ErpProductService {
@Override @Override
public List<ErpProductRespVO> getProductVOListByStatus(Integer status,Integer categoryId) { public List<ErpProductRespVO> getProductVOListByStatus(Integer status,Integer categoryId) {
List<ErpProductDO> list = productMapper.selectByCategorys(Collections.singletonList(categoryId));
List<Integer> categoryList = new ArrayList<>();
if(categoryId != null ){
categoryList.add(categoryId);
}
List<ErpProductDO> list = productMapper.selectByCategorys(categoryList);
return buildProductVOList(list); return buildProductVOList(list);
} }
@Override @Override

Loading…
Cancel
Save