package com.mosty.common.core.business.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mosty.common.core.business.entity.SysUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mosty.common.core.business.entity.vo.GetUserRoleListVo;
import com.mosty.common.core.business.entity.vo.RoleUserPage;
import com.mosty.common.core.business.entity.vo.SysUserVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author li
* @description 针对表【sys_user_role(用户和角色关联表)】的数据库操作Mapper
* @createDate 2022-02-12 16:53:24
* @Entity generator.domain.SysUserRole
*/
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    /**
     * 查询用户可以查看的，当前角色绑定的用户列表
     * @param rootPath 当前用户的组织机构前缀
     * @param roleUserPage 查询请求
     * @return 绑定的用户信息
     */
    List<SysUserVO> roleUserList(@Param("rootPath") String rootPath, @Param("roleUserPage") RoleUserPage roleUserPage);

    /**
     * 分页查询角色下用户
     * @return
     */
    List<SysUserVO> getRoleUserList(GetUserRoleListVo vo);
}




