use of com.artlongs.sys.model.SysFunc in project act-eagle-allone by mailtous.
the class SysMenuService method getMyAllFuncMap.
/**
* 取得我的全部功能列表
*
* @param roleIds
* @return
*/
private Map<Integer, List<SysFunc>> getMyAllFuncMap(Integer sysUserId) {
if (null == funcMap.get(sysUserId)) {
List<SysFunc> funcList = C.newList();
List<Integer> roleIds = sysUserService.getMyRoleList(sysUserId);
if (C.notEmpty(roleIds)) {
permissionMap = getPermissionMap(roleIds);
if (C.notEmpty(permissionMap)) {
for (List<SysPermission> permissionList : permissionMap.values()) {
for (SysPermission sysPermission : permissionList) {
SysFunc func = sysFuncService.get(sysPermission.getFuncId());
if (null != func) {
funcList.add(func);
}
}
}
}
// 按sequence从小到大排序
Collections.sort(funcList, Comparator.comparing(SysFunc::getSequence));
// add
funcMap.put(sysUserId, funcList);
}
}
return funcMap;
}
Aggregations