| | |
| | | @Autowired |
| | | private RoleMenuService roleMenuService; |
| | | |
| | | /**=============用户与角色================**/ |
| | | |
| | | @GetMapping("userWithNoRole") |
| | | @ApiOperation(value = "查询未分配角色的用户") |
| | | public List<User> getUserWithNoRole(){ |
| | | return userRoleService.getUserWithNoRole(); |
| | | } |
| | | |
| | | @GetMapping("userWithRole") |
| | | @ApiOperation(value = "查询分配角色的用户") |
| | | public List<UserRole> getUserWithRole(){ |
| | | return userRoleService.getUserWithRole(); |
| | | } |
| | | |
| | | @GetMapping("userWithRoleMap") |
| | | @ApiOperation(value = "查询分配角色的用户Map") |
| | | public Map<String,List<UserRole>> getUserWithRoleMap(){ |
| | | return userRoleService.getUserWithRoleMap(); |
| | | } |
| | | |
| | | @GetMapping("roleAll") |
| | | @GetMapping("all") |
| | | @ApiOperation(value = "查询所有角色") |
| | | public List<Role> getRoleAll(){ |
| | | return roleService.getAll(); |
| | |
| | | @ApiOperation(value = "新增角色") |
| | | public boolean add(@RequestBody Role role){ |
| | | return roleService.add(role); |
| | | } |
| | | |
| | | @PostMapping("batch") |
| | | @ApiOperation(value = "批量新增角色") |
| | | public boolean addBatch(@RequestBody List<Role> roles){ |
| | | return roleService.addBatch(roles); |
| | | } |
| | | |
| | | /** |