| | |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入menu") |
| | | public R<MenuVO> detail(Menu menu) { |
| | |
| | | @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") |
| | | }) |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "列表", notes = "传入menu") |
| | | public R<List<MenuVO>> list(@ApiIgnore @RequestParam Map<String, Object> menu) { |
| | |
| | | @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") |
| | | }) |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "懒加载列表", notes = "传入menu") |
| | | public R<List<MenuVO>> lazyList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) { |
| | |
| | | @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") |
| | | }) |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "菜单列表", notes = "传入menu") |
| | | public R<List<MenuVO>> menuList(@ApiIgnore @RequestParam Map<String, Object> menu) { |
| | |
| | | */ |
| | | @GetMapping("/dynamicMenu") |
| | | @ApiOperation(value = "菜单列表", notes = "传入menu") |
| | | public R<List<MenuVO>> dynamicMenu(String roleId, Long topMenuId, @RequestParam(value = "labelType", required = false,defaultValue = "0") Integer labelType) { |
| | | List<MenuVO> list = menuService.routes(roleId, topMenuId,labelType,1); |
| | | public R<List<MenuVO>> dynamicMenu(String roleId, Long topMenuId, @RequestParam(value = "labelType", required = false,defaultValue = "0") Integer labelType, @RequestParam(value = "roleName",required = false) String roleName) { |
| | | List<MenuVO> list = menuService.routes(roleId, topMenuId,labelType,1,roleName); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(name = "code", value = "菜单编号", paramType = "query", dataType = "string"), |
| | | @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "string") |
| | | }) |
| | | @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | // @PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR) |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "懒加载菜单列表", notes = "传入menu") |
| | | public R<List<MenuVO>> lazyMenuList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) { |
| | |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "前端菜单数据", notes = "前端菜单数据") |
| | | public R<List<MenuVO>> routes(BladeUser user, Long topMenuId) { |
| | | List<MenuVO> list = menuService.routes((user == null) ? null : user.getRoleId(), topMenuId,null,0); |
| | | List<MenuVO> list = menuService.routes((user == null) ? null : user.getRoleId(), topMenuId,null,0,""); |
| | | return R.data(list); |
| | | } |
| | | |