package cn.xluobo.business.sys.admin.repo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.entity.SysRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author zhangby
 * @since 2020-01-30 11:15:50
 */
public interface ISysRoleMapper extends BaseMapper<SysRole> {

    List<SysRole> selectUserRoleList(@Param("userId")Long userId, @Param("tenantId")String tenantId);

    /**
     * 角色对应的菜单Id列表
     *
     * @param userId
     * @param tenantId
     * @return
     */
    List<String> selectUserRoleTreeIdList(@Param("userId")Long userId, @Param("tenantId")String tenantId);
}
