jiangping
2025-04-15 3cea15af53d4eb5fb9ccdd1b7a31ec494ba41d6c
server/src/main/java/com/doumee/service/business/impl/CategoryServiceImpl.java
@@ -268,10 +268,11 @@
    @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<>();
@@ -291,10 +292,11 @@
    @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<>();