package com.patzn.lims.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.patzn.lims.sys.entity.SysRole;
import com.patzn.lims.sys.vo.SysRoleVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author patzn
 * @since 2017-07-10
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {


    SysRoleVO selectVoById(@Param("companyId") Long companyId, @Param("id") Long id);


    List<SysRoleVO> selectPageVo(Page page, @Param("sysRole") SysRole sysRole);


    /**
     * 递归分页
     */
    List<SysRoleVO> selectPageRecursive(Page page, @Param("sysRole") SysRole sysRole);


    List<SysRole> selectByUserId(@Param("userId") Long userId);


    String selectNamesByUserId(@Param("userId") Long userId);
}
