| | |
| | | |
| | | |
| | | @Override |
| | | public List<CategoryVO> getCategoryVOTree(String categoryType){ |
| | | public List<CategoryVO> getCategoryVOTree(String categoryType,Integer categoryId){ |
| | | List<Category> categoryList = categoryMapper.selectList(new QueryWrapper<Category>().lambda() |
| | | .eq(Category::getIsdeleted, Constants.ZERO) |
| | | .in(Objects.nonNull(categoryType),Category::getType,categoryType.split(",")) |
| | | .apply(Objects.nonNull(categoryId)," find_in_set("+categoryId+", REPLACE(ID_PATH,'/',',') ) ") |
| | | .orderByAsc(Category::getSortnum,Category::getId) |
| | | ); |
| | | List<CategoryVO> categoryVOList = new ArrayList<>(); |
| | |
| | | |
| | | |
| | | @Override |
| | | public List<CategoryVO> getCategoryVOList(Integer categoryType){ |
| | | public List<CategoryVO> getCategoryVOList(Integer categoryType,Integer isRoot){ |
| | | List<Category> categoryList = categoryMapper.selectList(new QueryWrapper<Category>().lambda() |
| | | .eq(Category::getIsdeleted, Constants.ZERO) |
| | | .eq(Objects.nonNull(categoryType),Category::getType,categoryType) |
| | | .isNull(Constants.equalsInteger(isRoot,Constants.ONE),Category::getParentId) |
| | | .orderByAsc(Category::getSortnum,Category::getId) |
| | | ); |
| | | List<CategoryVO> categoryVOList = new ArrayList<>(); |