feat: add @OperationLog annotations to role management operations
This commit is contained in:
+4
@@ -8,6 +8,7 @@ import cn.novalon.manage.sys.dto.request.RoleUpdateRequest;
|
||||
import cn.novalon.manage.sys.core.command.CreateRoleCommand;
|
||||
import cn.novalon.manage.sys.core.command.UpdateRoleCommand;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import cn.novalon.manage.sys.audit.OperationLog;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Validator;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -92,6 +93,7 @@ public class SysRoleHandler {
|
||||
}
|
||||
|
||||
@Operation(summary = "创建角色", description = "创建新角色")
|
||||
@OperationLog(operation = "创建角色", module = "角色管理")
|
||||
public Mono<ServerResponse> createRole(ServerRequest request) {
|
||||
return request.bodyToMono(RoleCreateRequest.class)
|
||||
.flatMap(req -> {
|
||||
@@ -114,6 +116,7 @@ public class SysRoleHandler {
|
||||
}
|
||||
|
||||
@Operation(summary = "更新角色", description = "更新角色信息")
|
||||
@OperationLog(operation = "更新角色", module = "角色管理")
|
||||
public Mono<ServerResponse> updateRole(ServerRequest request) {
|
||||
Long id = Long.valueOf(request.pathVariable("id"));
|
||||
return request.bodyToMono(RoleUpdateRequest.class)
|
||||
@@ -130,6 +133,7 @@ public class SysRoleHandler {
|
||||
}
|
||||
|
||||
@Operation(summary = "删除角色", description = "逻辑删除角色")
|
||||
@OperationLog(operation = "删除角色", module = "角色管理")
|
||||
public Mono<ServerResponse> deleteRole(ServerRequest request) {
|
||||
Long id = Long.valueOf(request.pathVariable("id"));
|
||||
return roleService.logicalDeleteRole(id)
|
||||
|
||||
Reference in New Issue
Block a user