获取当前登录的用户权限
This commit is contained in:
@@ -52,4 +52,11 @@ public interface TsRoleDao extends BaseMapper<TsRole> {
|
||||
|
||||
@Select("select menu_id from ts_role_menu where role_id=#{roleId}")
|
||||
List<String> getMenuIdByRoleId(String roleId);
|
||||
|
||||
/**
|
||||
* 通过角色Id列表查询菜单Id列表
|
||||
* @param roleIds:角色ID列表
|
||||
* @return List<String>
|
||||
*/
|
||||
List<String> getMenuIdsByRoleIds(List<String> roleIds);
|
||||
}
|
||||
|
||||
@@ -64,4 +64,11 @@ public interface ITsRoleService extends IService<TsRole> {
|
||||
* @return List<String>
|
||||
*/
|
||||
List<String> getMenu(String roleId);
|
||||
|
||||
/**
|
||||
* 通过角色Id列表查询菜单Id列表
|
||||
* @param roleIds:角色ID列表
|
||||
* @return List<String>
|
||||
*/
|
||||
List<String> getMenuIdsByRoleIds(List<String> roleIds);
|
||||
}
|
||||
|
||||
@@ -184,5 +184,18 @@ public class TsRoleServiceImpl extends ServiceImpl<TsRoleDao, TsRole> implements
|
||||
return tsRoleDao.getMenuIdByRoleId(roleId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过角色Id列表查询菜单Id列表
|
||||
* @param roleIds:角色ID列表
|
||||
* @return List<String>
|
||||
*/
|
||||
@Override
|
||||
public List<String> getMenuIdsByRoleIds(List<String> roleIds) {
|
||||
if(roleIds!=null&&roleIds.size()>0){
|
||||
return tsRoleDao.getMenuIdsByRoleIds(roleIds);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user