局部回显
CategoryController
@GetMapping(name=“根据type查询指定的分类”,value = “/category/list”)
public ResultInfo findCategorybyType(int type){
List list = categoryService.findCategorybyType(type);
return ResultInfo.success(list);
}
CategoryService
// 根据type查询分类列表
List findCategorybyType(int type);
CategoryServiceImpl
// 根据type查询分类列表
@Override
public List findCategorybyType(int type) {
QueryWrapper qw = new QueryWrapper<>();
qw.eq(“type”,type);
List list = categoryMapper.selectList(qw);
return list;
}