| | |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | private final ISysGroupService sysGroupService; |
| | | |
| | | |
| | | @ApiOperation("新增权限组") |
| | | @ApiOperation(value = "新增权限组", tags = {"管理后台-权限组管理"}) |
| | | @PostMapping("/api/v1/group/add") |
| | | public R<?> add(@Validated @RequestBody SysGroupAddDTO dto) { |
| | | sysGroupService.addGroup(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation("编辑权限组") |
| | | @ApiOperation(value = "编辑权限组", tags = {"管理后台-权限组管理"}) |
| | | @PostMapping("/api/v1/group/edit") |
| | | public R<?> edit(@Validated @RequestBody SysGroupEditDTO dto) { |
| | | sysGroupService.editGroup(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation("权限组详情") |
| | | @ApiOperation(value = "权限组详情", tags = {"管理后台-权限组管理"}) |
| | | @GetMapping("/api/v1/group/queryById") |
| | | public R<SysGroupDetailVO> queryById(@ApiParam(value = "权限组id", required = true) @RequestParam Long id) { |
| | | SysGroupDetailVO detail = sysGroupService.getGroupDetail(id); |
| | | return R.ok(detail); |
| | | } |
| | | |
| | | @ApiOperation("权限组分页列表") |
| | | @ApiOperation(value = "权限组分页列表", tags = {"管理后台-权限组管理"}) |
| | | @PostMapping("/api/v1/group/pageList") |
| | | public R<PageInfo<SysGroupPageVO>> pageList(@Validated @RequestBody SysGroupPageQuery query) { |
| | | PageInfo<SysGroupPageVO> pageInfo = sysGroupService.pageList(query); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | @ApiOperation("通过权限组id查询绑定账号列表") |
| | | @ApiOperation(value = "通过权限组id查询绑定账号列表", tags = {"管理后台-权限组管理"}) |
| | | @PostMapping("/api/v1/group/queryUserPageList") |
| | | public R<PageInfo<GroupUserVO>> queryUserPageList(@Validated @RequestBody GroupUserPageQuery query) { |
| | | PageInfo<GroupUserVO> pageInfo = sysGroupService.queryUserPageList(query); |
| | | return R.ok(pageInfo); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除权限组", tags = {"管理后台-权限组管理"}) |
| | | @DeleteMapping("/api/v1/group") |
| | | @ApiImplicitParam(name = "id", value = "权限组ID") |
| | | public R<?> deleteById(@RequestParam Long id) { |
| | | sysGroupService.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | } |