| | |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.xiaopeng.common.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @ApiOperation(value = "新增权限组", tags = {"管理后台-权限组管理"}) |
| | | @PostMapping("/api/v1/group/add") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.GROUP_MANAGEMENT, |
| | | operationType = AdminOperationType.ADD, |
| | | content = "新增权限组", |
| | | appendRequestData = true |
| | | ) |
| | | public R<?> add(@Validated @RequestBody SysGroupAddDTO dto) { |
| | | sysGroupService.addGroup(dto); |
| | | return R.ok(); |
| | |
| | | |
| | | @ApiOperation(value = "编辑权限组", tags = {"管理后台-权限组管理"}) |
| | | @PostMapping("/api/v1/group/edit") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.GROUP_MANAGEMENT, |
| | | operationType = AdminOperationType.EDIT, |
| | | content = "编辑权限组", |
| | | appendRequestData = true |
| | | ) |
| | | public R<?> edit(@Validated @RequestBody SysGroupEditDTO dto) { |
| | | sysGroupService.editGroup(dto); |
| | | return R.ok(); |
| | |
| | | @ApiOperation(value = "删除权限组", tags = {"管理后台-权限组管理"}) |
| | | @DeleteMapping("/api/v1/group") |
| | | @ApiImplicitParam(name = "id", value = "权限组ID") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.GROUP_MANAGEMENT, |
| | | operationType = AdminOperationType.DELETE, |
| | | content = "删除权限组", |
| | | appendRequestData = true |
| | | ) |
| | | public R<?> deleteById(@RequestParam Long id) { |
| | | sysGroupService.deleteById(id); |
| | | return R.ok(); |