com.macro.mall.dto.UmsPermissionNode Java Examples
The following examples show how to use
com.macro.mall.dto.UmsPermissionNode.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UmsPermissionController.java From mall-swarm with Apache License 2.0 | 5 votes |
@ApiOperation("以层级结构返回所有权限") @RequestMapping(value = "/treeList", method = RequestMethod.GET) @ResponseBody public CommonResult<List<UmsPermissionNode>> treeList() { List<UmsPermissionNode> permissionNodeList = permissionService.treeList(); return CommonResult.success(permissionNodeList); }
Example #2
Source File: UmsPermissionServiceImpl.java From mall-swarm with Apache License 2.0 | 5 votes |
@Override public List<UmsPermissionNode> treeList() { List<UmsPermission> permissionList = permissionMapper.selectByExample(new UmsPermissionExample()); List<UmsPermissionNode> result = permissionList.stream() .filter(permission -> permission.getPid().equals(0L)) .map(permission -> covert(permission,permissionList)).collect(Collectors.toList()); return result; }
Example #3
Source File: UmsPermissionServiceImpl.java From mall-swarm with Apache License 2.0 | 5 votes |
/** * 将权限转换为带有子级的权限对象 * 当找不到子级权限的时候map操作不会再递归调用covert */ private UmsPermissionNode covert(UmsPermission permission,List<UmsPermission> permissionList){ UmsPermissionNode node = new UmsPermissionNode(); BeanUtils.copyProperties(permission,node); List<UmsPermissionNode> children = permissionList.stream() .filter(subPermission -> subPermission.getPid().equals(permission.getId())) .map(subPermission -> covert(subPermission,permissionList)).collect(Collectors.toList()); node.setChildren(children); return node; }
Example #4
Source File: UmsPermissionController.java From macrozheng with Apache License 2.0 | 5 votes |
@ApiOperation("以层级结构返回所有权限") @RequestMapping(value = "/treeList", method = RequestMethod.GET) @ResponseBody public CommonResult<List<UmsPermissionNode>> treeList() { List<UmsPermissionNode> permissionNodeList = permissionService.treeList(); return CommonResult.success(permissionNodeList); }
Example #5
Source File: UmsPermissionServiceImpl.java From macrozheng with Apache License 2.0 | 5 votes |
@Override public List<UmsPermissionNode> treeList() { List<UmsPermission> permissionList = permissionMapper.selectByExample(new UmsPermissionExample()); List<UmsPermissionNode> result = permissionList.stream() .filter(permission -> permission.getPid().equals(0L)) .map(permission -> covert(permission,permissionList)).collect(Collectors.toList()); return result; }
Example #6
Source File: UmsPermissionServiceImpl.java From macrozheng with Apache License 2.0 | 5 votes |
/** * 将权限转换为带有子级的权限对象 * 当找不到子级权限的时候map操作不会再递归调用covert */ private UmsPermissionNode covert(UmsPermission permission,List<UmsPermission> permissionList){ UmsPermissionNode node = new UmsPermissionNode(); BeanUtils.copyProperties(permission,node); List<UmsPermissionNode> children = permissionList.stream() .filter(subPermission -> subPermission.getPid().equals(permission.getId())) .map(subPermission -> covert(subPermission,permissionList)).collect(Collectors.toList()); node.setChildren(children); return node; }
Example #7
Source File: UmsPermissionController.java From mall with Apache License 2.0 | 5 votes |
@ApiOperation("以层级结构返回所有权限") @RequestMapping(value = "/treeList", method = RequestMethod.GET) @ResponseBody public CommonResult<List<UmsPermissionNode>> treeList() { List<UmsPermissionNode> permissionNodeList = permissionService.treeList(); return CommonResult.success(permissionNodeList); }
Example #8
Source File: UmsPermissionServiceImpl.java From mall with Apache License 2.0 | 5 votes |
@Override public List<UmsPermissionNode> treeList() { List<UmsPermission> permissionList = permissionMapper.selectByExample(new UmsPermissionExample()); List<UmsPermissionNode> result = permissionList.stream() .filter(permission -> permission.getPid().equals(0L)) .map(permission -> covert(permission,permissionList)).collect(Collectors.toList()); return result; }
Example #9
Source File: UmsPermissionServiceImpl.java From mall with Apache License 2.0 | 5 votes |
/** * 将权限转换为带有子级的权限对象 * 当找不到子级权限的时候map操作不会再递归调用covert */ private UmsPermissionNode covert(UmsPermission permission,List<UmsPermission> permissionList){ UmsPermissionNode node = new UmsPermissionNode(); BeanUtils.copyProperties(permission,node); List<UmsPermissionNode> children = permissionList.stream() .filter(subPermission -> subPermission.getPid().equals(permission.getId())) .map(subPermission -> covert(subPermission,permissionList)).collect(Collectors.toList()); node.setChildren(children); return node; }
Example #10
Source File: UmsPermissionController.java From macrozheng-mall with MIT License | 5 votes |
@ApiOperation("以层级结构返回所有权限") @RequestMapping(value = "/treeList", method = RequestMethod.GET) @ResponseBody public Object treeList() { List<UmsPermissionNode> permissionNodeList = permissionService.treeList(); return new CommonResult().success(permissionNodeList); }
Example #11
Source File: UmsPermissionServiceImpl.java From macrozheng-mall with MIT License | 5 votes |
@Override public List<UmsPermissionNode> treeList() { List<UmsPermission> permissionList = permissionMapper.selectByExample(new UmsPermissionExample()); List<UmsPermissionNode> result = permissionList.stream() .filter(permission -> permission.getPid().equals(0L)) .map(permission -> covert(permission,permissionList)).collect(Collectors.toList()); return result; }
Example #12
Source File: UmsPermissionServiceImpl.java From macrozheng-mall with MIT License | 5 votes |
/** * 将权限转换为带有子级的权限对象 * 当找不到子级权限的时候map操作不会再递归调用covert */ private UmsPermissionNode covert(UmsPermission permission,List<UmsPermission> permissionList){ UmsPermissionNode node = new UmsPermissionNode(); BeanUtils.copyProperties(permission,node); List<UmsPermissionNode> children = permissionList.stream() .filter(subPermission -> subPermission.getPid().equals(permission.getId())) .map(subPermission -> covert(subPermission,permissionList)).collect(Collectors.toList()); node.setChildren(children); return node; }
Example #13
Source File: UmsPermissionService.java From mall-swarm with Apache License 2.0 | 2 votes |
/** * 以层级结构返回所有权限 */ List<UmsPermissionNode> treeList();
Example #14
Source File: UmsPermissionService.java From macrozheng with Apache License 2.0 | 2 votes |
/** * 以层级结构返回所有权限 */ List<UmsPermissionNode> treeList();
Example #15
Source File: UmsPermissionService.java From mall with Apache License 2.0 | 2 votes |
/** * 以层级结构返回所有权限 */ List<UmsPermissionNode> treeList();
Example #16
Source File: UmsPermissionService.java From macrozheng-mall with MIT License | 2 votes |
/** * 以层级结构返回所有权限 */ List<UmsPermissionNode> treeList();