Commit 6d38479f authored by shiyu's avatar shiyu

类目介绍

parent a892a818
...@@ -50,7 +50,7 @@ public class CategoryServiceImpl implements CategoryService { ...@@ -50,7 +50,7 @@ public class CategoryServiceImpl implements CategoryService {
@Override @Override
public List<CategoryVo> querySelective(String id, String name, Integer page, Integer size, String sort, String order) { public List<CategoryVo> querySelective(String id, String name, Integer page, Integer size, String sort, String order) {
List<Category> collectList = categoryDao.querySelective(id, name, page, size, sort, order); List<Category> collectList = categoryDao.querySelective(id, name, page, size, sort, order);
List<CategoryVo> data = collectList.parallelStream().map(a -> new CategoryVo(a)).collect(Collectors.toList()); List<CategoryVo> data = collectList.stream().map(a -> new CategoryVo(a)).collect(Collectors.toList());
return data; return data;
} }
......
...@@ -47,13 +47,13 @@ public class CategoryDaoImpl implements CategoryDao { ...@@ -47,13 +47,13 @@ public class CategoryDaoImpl implements CategoryDao {
criteria.andNameLike("%" + dto.getName() + "%"); criteria.andNameLike("%" + dto.getName() + "%");
} }
criteria.andIsDeletedEqualTo(false); criteria.andIsDeletedEqualTo(false);
return categoryMapper.selectByExample(example); return categoryMapper.selectByExampleWithBLOBs(example);
} }
public List<Category> queryByPid(Integer pid) { public List<Category> queryByPid(Integer pid) {
CategoryExample example = new CategoryExample(); CategoryExample example = new CategoryExample();
example.or().andPidEqualTo(pid).andIsDeletedEqualTo(false); example.or().andPidEqualTo(pid).andIsDeletedEqualTo(false);
return categoryMapper.selectByExample(example); return categoryMapper.selectByExampleWithBLOBs(example);
} }
public Category findById(Integer id) { public Category findById(Integer id) {
...@@ -63,7 +63,7 @@ public class CategoryDaoImpl implements CategoryDao { ...@@ -63,7 +63,7 @@ public class CategoryDaoImpl implements CategoryDao {
public Category findByName(String name) { public Category findByName(String name) {
CategoryExample example = new CategoryExample(); CategoryExample example = new CategoryExample();
example.or().andNameEqualTo(name).andIsDeletedEqualTo(false); example.or().andNameEqualTo(name).andIsDeletedEqualTo(false);
return categoryMapper.selectOneByExample(example); return categoryMapper.selectOneByExampleWithBLOBs(example);
} }
@Override @Override
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment