package io.renren.modules.levelManage.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.levelManage.entity.LevelEntity;

import java.util.List;
import java.util.Map;

/**
 * 层级关系表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2022-03-28 17:07:26
 */

public interface LevelService extends IService<LevelEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<LevelEntity> selectByName(Integer page, Integer size, String name);

    Integer getCountByName(String name);

    List<LevelEntity> getSonLevel(Long id);

    Integer queryEnabledCount();

    List<LevelEntity> getAllParentById(Long id);

    List<LevelEntity> getEnabledLevels();

    Integer queryEnabledCountWithParentId(Long id);

    LevelEntity getEnabledSon(Long id);

    List<LevelEntity> getEnabledLevelByProject(List<Long> id);

    List<LevelEntity> getRootLevel(Long id);
}

