| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.annotation.DataColumn; |
| | | import com.ruoyi.common.annotation.DataPermission; |
| | | import com.ruoyi.system.domain.SysRole; |
| | | import com.ruoyi.common.core.mapper.BaseMapperPlus; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | /** |
| | | * 角色表 数据层 |
| | | * |
| | | * @author ruoyi |
| | | * @author Lion Li |
| | | */ |
| | | public interface SysRoleMapper extends BaseMapper<SysRole> { |
| | | public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, SysRole> { |
| | | |
| | | Page<SysRole> selectPageRoleList(@Param("page") Page<SysRole> page, @Param("role") SysRole role); |
| | | @DataPermission({ |
| | | @DataColumn(key = "deptName", value = "d.dept_id") |
| | | }) |
| | | Page<SysRole> selectPageRoleList(@Param("page") Page<SysRole> page, @Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper); |
| | | |
| | | /** |
| | | * 根据条件分页查询角色数据 |
| | | * |
| | | * @param role 角色信息 |
| | | * @param queryWrapper 查询条件 |
| | | * @return 角色数据集合信息 |
| | | */ |
| | | public List<SysRole> selectRoleList(SysRole role); |
| | | @DataPermission({ |
| | | @DataColumn(key = "deptName", value = "d.dept_id") |
| | | }) |
| | | List<SysRole> selectRoleList(@Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper); |
| | | |
| | | /** |
| | | * 根据用户ID查询角色 |
| | |
| | | * @param userId 用户ID |
| | | * @return 角色列表 |
| | | */ |
| | | public List<SysRole> selectRolePermissionByUserId(Long userId); |
| | | List<SysRole> selectRolePermissionByUserId(Long userId); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param userId 用户ID |
| | | * @return 选中角色ID列表 |
| | | */ |
| | | public List<Integer> selectRoleListByUserId(Long userId); |
| | | List<Long> selectRoleListByUserId(Long userId); |
| | | |
| | | /** |
| | | * 根据用户ID查询角色 |
| | |
| | | * @param userName 用户名 |
| | | * @return 角色列表 |
| | | */ |
| | | public List<SysRole> selectRolesByUserName(String userName); |
| | | List<SysRole> selectRolesByUserName(String userName); |
| | | |
| | | } |