use of com.github.liuweijw.core.beans.system.AuthPermission in project fw-cloud-framework by liuweijw.
the class ApiController method findMenuByRole.
/**
* 通过用户名查询用户菜单
*/
@GetMapping("/findMenuByRole/{roleCode}")
public Set<AuthPermission> findMenuByRole(@PathVariable String roleCode) {
Set<AuthPermission> permissions = new HashSet<AuthPermission>();
Set<AuthMenu> menus = menuService.findMenuByRole(roleCode);
if (null == menus || menus.size() == 0)
return permissions;
menus.stream().forEach(r -> {
permissions.add(new AuthPermission(r.getUrl()));
});
return permissions;
}
Aggregations