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.LevelRelationEntity;
import org.dom4j.Element;

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

/**
 * 用于存储层级直接，具体数据的关系
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2022-04-08 17:49:50
 */

public interface LevelRelationService extends IService<LevelRelationEntity> {

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

    LevelRelationEntity selectBySon(Long tableId,Long id);

    List<LevelRelationEntity> selectByParent(Long tableId, Long id);

    List<LevelRelationEntity> selectByParentRowAndSonTable(Long tableId, Long parentRowId);

    void analysisLevel(Element name, long parentId, long levelNum) throws Exception;

    boolean tableHasBuilted(String fileName);

    boolean deleteBySonTidRids(Long id, List<Long> asList);

    List<LevelRelationEntity> selectByParentAndSonTable(Long parentTableId, Long parentRowId,Long sonTableId);

}

