package com.mall.product.service.ext;

import com.mall.product.domain.entity.CategoryEntity;

import java.util.List;

public class CategoryServiceImplExt {

    public static List<CategoryEntity> getCategoryTreeChildrenList(CategoryEntity categoryEntity, List<CategoryEntity> categoryEntityList) {
        return categoryEntityList.stream()
                .filter(item -> item.getParentCid().equals(categoryEntity.getCatId()))
                .toList();
    }

}
