| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | import com.yuanchu.limslaboratory.annotation.RequestInfo; |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.pojo.dto.GetAllRoleAndMenuByConditionPageDto; |
| | | import com.yuanchu.limslaboratory.pojo.dto.RoleInfoDto; |
| | | import com.yuanchu.limslaboratory.pojo.dto.UpdateRoleMenuDto; |
| | |
| | | |
| | | @ApiOperation("获取菜单功能树") |
| | | @GetMapping("/getMenusTree") |
| | | @RequestInfo(type = "add",name="ccc") |
| | | @AuthHandler |
| | | public Result<?>getMenusTree() { |
| | | return Result.success(roleManagerService.getMenusTree()); |
| | | }; |
| | | |
| | | @ApiOperation("新增角色") |
| | | @PostMapping("/addRoleInfo") |
| | | @AuthHandler |
| | | public Result<?>addRoleInfo(@RequestBody RoleInfoDto dto){ |
| | | return Result.success(roleManagerService.addRoleInfo(dto)); |
| | | } |
| | | |
| | | @ApiOperation("查询角色名重复") |
| | | @GetMapping("/assertRepeat") |
| | | @AuthHandler |
| | | public Result<?> assertRepeat(String roleName){ |
| | | return Result.success(roleManagerService.assertRepeat(roleName)); |
| | | } |
| | | |
| | | @ApiOperation("获取角色信息") |
| | | @GetMapping("/getAllRoleAndMenuInfo") |
| | | @AuthHandler |
| | | public Result<?> getAllRoleAndMenuInfo(GetAllRoleAndMenuByConditionPageDto dto){ |
| | | return Result.success(roleManagerService.getAllRoleAndMenuInfo(dto)); |
| | | } |
| | | |
| | | @ApiOperation("逻辑删除角色") |
| | | @GetMapping("/deleteRole") |
| | | @AuthHandler |
| | | public Result<?> deleteRole(Long id){ |
| | | return Result.success(roleManagerService.deleteRole(id)); |
| | | } |
| | | |
| | | @ApiOperation("修改权限") |
| | | @PostMapping("/updateRoleMenu") |
| | | @AuthHandler |
| | | public Result<?> updateRoleMenu(@RequestBody UpdateRoleMenuDto dto){ |
| | | return Result.success(roleManagerService.updateRoleMenu(dto)); |
| | | } |
| | | |
| | | @ApiOperation("/根据角色获取Role") |
| | | @ApiOperation("根据角色Id获取Role") |
| | | @GetMapping("/getRoleAndMenuByRole") |
| | | @AuthHandler |
| | | public Result<?> getRoleAndMenuByRole(Long roleId){ |
| | | return Result.success(roleManagerService.getRoleAndMenuByRole(roleId)); |
| | | } |