package io.renren.modules.levelManage.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.modules.levelManage.entity.LevelRelationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用于存储层级直接，具体数据的关系
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2022-04-08 17:49:50
 */
@Mapper
public interface LevelRelationDao extends BaseMapper<LevelRelationEntity> {

    LevelRelationEntity selectBySon(@Param("tableId") Long tableId,@Param("id") Long id);

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

    List<LevelRelationEntity> selectByParentRowAndSonTable(@Param("tableId") Long tableId,@Param("parentRowId") Long parentRowId);
}
