package org.jeecg.modules.oroqen.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.oroqen.entity.OroqenProductCategory;

import java.util.List;

/**
 * @Description: 产品分类
 * @Author: jeecg-boot
 * @Date: 2025-01-08
 * @Version: V1.0
 */
public interface IOroqenProductCategoryService extends IService<OroqenProductCategory> {

    /**
     * 获取树形结构的分类列表
     * @return
     */
    List<OroqenProductCategory> getCategoryTree();

    /**
     * 根据父级ID获取子分类
     * @param parentId
     * @return
     */
    List<OroqenProductCategory> getChildrenByParentId(String parentId);

    /**
     * 检查分类编码是否存在
     * @param categoryCode
     * @param excludeId
     * @return
     */
    boolean checkCategoryCodeExists(String categoryCode, String excludeId);
}