| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.dto.GetAllRoleAndMenuByConditionPageDto; |
| | | import com.yuanchu.limslaboratory.pojo.dto.RoleInfoDto; |
| | | import com.yuanchu.limslaboratory.service.RoleManagerService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | return Result.success(roleManagerService.getMenusTree()); |
| | | }; |
| | | |
| | | @ApiOperation("新增角色") |
| | | @PostMapping("/addRoleInfo") |
| | | public Result<?>addRoleInfo(@RequestBody RoleInfoDto dto){ |
| | | return Result.success(roleManagerService.addRoleInfo(dto)); |
| | | } |
| | | |
| | | @ApiOperation("查询角色名重复") |
| | | @GetMapping("/assertRepeat") |
| | | public Result<?> assertRepeat(String roleName){ |
| | | return Result.success(roleManagerService.assertRepeat(roleName)); |
| | | } |
| | | |
| | | @ApiOperation("获取角色信息") |
| | | @GetMapping("/getAllRoleAndMenuInfo") |
| | | public Result<?> getAllRoleAndMenuInfo(GetAllRoleAndMenuByConditionPageDto dto){ |
| | | return Result.success(roleManagerService.getAllRoleAndMenuInfo(dto)); |
| | | } |
| | | } |