Merge branch 'dev' into test
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
package com.zt.plat.module.databus.controller.admin.gateway;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.convert.ApiAccessLogConvert;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.accesslog.ApiAccessLogPageReqVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.accesslog.ApiAccessLogRespVO;
|
||||
import com.zt.plat.module.databus.dal.dataobject.gateway.ApiAccessLogDO;
|
||||
import com.zt.plat.module.databus.service.gateway.ApiAccessLogService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* Databus API 访问日志控制器。
|
||||
*/
|
||||
@Tag(name = "管理后台 - Databus API 访问日志")
|
||||
@RestController
|
||||
@RequestMapping("/databus/gateway/access-log")
|
||||
@Validated
|
||||
public class ApiAccessLogController {
|
||||
|
||||
@Resource
|
||||
private ApiAccessLogService apiAccessLogService;
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获取访问日志详情")
|
||||
@Parameter(name = "id", description = "日志编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('databus:gateway:access-log:query')")
|
||||
public CommonResult<ApiAccessLogRespVO> get(@RequestParam("id") Long id) {
|
||||
ApiAccessLogDO logDO = apiAccessLogService.get(id);
|
||||
return success(ApiAccessLogConvert.INSTANCE.convert(logDO));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "分页查询访问日志")
|
||||
@PreAuthorize("@ss.hasPermission('databus:gateway:access-log:query')")
|
||||
public CommonResult<PageResult<ApiAccessLogRespVO>> page(@Valid ApiAccessLogPageReqVO pageReqVO) {
|
||||
PageResult<ApiAccessLogDO> pageResult = apiAccessLogService.getPage(pageReqVO);
|
||||
return success(ApiAccessLogConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.zt.plat.module.databus.controller.admin.gateway;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.convert.ApiVersionConvert;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.definition.ApiDefinitionSaveReqVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.version.ApiVersionCompareRespVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.version.ApiVersionDetailRespVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.version.ApiVersionPageReqVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.version.ApiVersionRespVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.version.ApiVersionRollbackReqVO;
|
||||
import com.zt.plat.module.databus.dal.dataobject.gateway.ApiVersionDO;
|
||||
import com.zt.plat.module.databus.service.gateway.ApiVersionService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* API 版本历史控制器。
|
||||
*/
|
||||
@Tag(name = "管理后台 - API 版本历史")
|
||||
@RestController
|
||||
@RequestMapping("/databus/gateway/version")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class ApiVersionController {
|
||||
|
||||
@Resource
|
||||
private ApiVersionService apiVersionService;
|
||||
|
||||
@Resource
|
||||
private ObjectMapper objectMapper;
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获取 API 版本详情")
|
||||
@Parameter(name = "id", description = "版本编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('databus:gateway:version:query')")
|
||||
public CommonResult<ApiVersionDetailRespVO> getVersion(@RequestParam("id") Long id) {
|
||||
ApiVersionDO versionDO = apiVersionService.getVersion(id);
|
||||
ApiVersionDetailRespVO respVO = ApiVersionConvert.INSTANCE.convertDetail(versionDO);
|
||||
|
||||
// 反序列化快照数据
|
||||
if (versionDO.getSnapshotData() != null) {
|
||||
try {
|
||||
ApiDefinitionSaveReqVO snapshot = objectMapper.readValue(versionDO.getSnapshotData(), ApiDefinitionSaveReqVO.class);
|
||||
respVO.setSnapshotData(snapshot);
|
||||
} catch (JsonProcessingException ex) {
|
||||
log.error("反序列化版本快照失败, versionId={}", id, ex);
|
||||
}
|
||||
}
|
||||
|
||||
return success(respVO);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "分页查询 API 版本列表")
|
||||
@PreAuthorize("@ss.hasPermission('databus:gateway:version:query')")
|
||||
public CommonResult<PageResult<ApiVersionRespVO>> getVersionPage(@Valid ApiVersionPageReqVO pageReqVO) {
|
||||
PageResult<ApiVersionDO> pageResult = apiVersionService.getVersionPage(pageReqVO);
|
||||
return success(ApiVersionConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "查询指定 API 的全部版本")
|
||||
@PreAuthorize("@ss.hasPermission('databus:gateway:version:query')")
|
||||
public CommonResult<java.util.List<ApiVersionRespVO>> getVersionList(@RequestParam("apiId") Long apiId) {
|
||||
return success(ApiVersionConvert.INSTANCE.convertList(apiVersionService.getVersionListByApiId(apiId)));
|
||||
}
|
||||
|
||||
@PutMapping("/rollback")
|
||||
@Operation(summary = "回滚到指定版本")
|
||||
@PreAuthorize("@ss.hasPermission('databus:gateway:version:rollback')")
|
||||
public CommonResult<Boolean> rollbackToVersion(@Valid @RequestBody ApiVersionRollbackReqVO reqVO) {
|
||||
apiVersionService.rollbackToVersion(reqVO.getId(), reqVO.getRemark());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/compare")
|
||||
@Operation(summary = "对比两个版本差异")
|
||||
@PreAuthorize("@ss.hasPermission('databus:gateway:version:query')")
|
||||
public CommonResult<ApiVersionCompareRespVO> compareVersions(
|
||||
@RequestParam("sourceId") Long sourceId,
|
||||
@RequestParam("targetId") Long targetId) {
|
||||
return success(apiVersionService.compareVersions(sourceId, targetId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zt.plat.module.databus.controller.admin.gateway.convert;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.accesslog.ApiAccessLogRespVO;
|
||||
import com.zt.plat.module.databus.dal.dataobject.gateway.ApiAccessLogDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ApiAccessLogConvert {
|
||||
|
||||
ApiAccessLogConvert INSTANCE = Mappers.getMapper(ApiAccessLogConvert.class);
|
||||
|
||||
ApiAccessLogRespVO convert(ApiAccessLogDO bean);
|
||||
|
||||
List<ApiAccessLogRespVO> convertList(List<ApiAccessLogDO> list);
|
||||
|
||||
default PageResult<ApiAccessLogRespVO> convertPage(PageResult<ApiAccessLogDO> page) {
|
||||
if (page == null) {
|
||||
return PageResult.empty();
|
||||
}
|
||||
PageResult<ApiAccessLogRespVO> result = new PageResult<>();
|
||||
result.setList(convertList(page.getList()));
|
||||
result.setTotal(page.getTotal());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,10 @@ package com.zt.plat.module.databus.controller.admin.gateway.convert;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.definition.ApiDefinitionDetailRespVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.definition.ApiDefinitionPublicationRespVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.definition.ApiDefinitionStepRespVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.definition.ApiDefinitionSummaryRespVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.definition.ApiDefinitionTransformRespVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.definition.*;
|
||||
import com.zt.plat.module.databus.dal.dataobject.gateway.ApiDefinitionDO;
|
||||
import com.zt.plat.module.databus.dal.dataobject.gateway.ApiStepDO;
|
||||
import com.zt.plat.module.databus.dal.dataobject.gateway.ApiTransformDO;
|
||||
import com.zt.plat.module.databus.framework.integration.gateway.domain.ApiDefinitionAggregate;
|
||||
import com.zt.plat.module.databus.framework.integration.gateway.domain.ApiFlowPublication;
|
||||
import com.zt.plat.module.databus.framework.integration.gateway.domain.ApiStepDefinition;
|
||||
@@ -101,4 +99,29 @@ public interface ApiDefinitionConvert {
|
||||
return publication == null ? null : BeanUtils.toBean(publication, ApiDefinitionPublicationRespVO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换步骤列表(DO -> SaveReqVO)
|
||||
*/
|
||||
default List<ApiDefinitionStepSaveReqVO> convertStepList(List<ApiStepDO> steps) {
|
||||
if (CollUtil.isEmpty(steps)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return steps.stream()
|
||||
.sorted(Comparator.comparing(step -> step.getStepOrder() == null ? Integer.MAX_VALUE : step.getStepOrder()))
|
||||
.map(step -> BeanUtils.toBean(step, ApiDefinitionStepSaveReqVO.class))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换变换列表(DO -> SaveReqVO)
|
||||
*/
|
||||
default List<ApiDefinitionTransformSaveReqVO> convertTransformList(List<ApiTransformDO> transforms) {
|
||||
if (CollUtil.isEmpty(transforms)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return transforms.stream()
|
||||
.map(transform -> BeanUtils.toBean(transform, ApiDefinitionTransformSaveReqVO.class))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.zt.plat.module.databus.controller.admin.gateway.convert;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.version.ApiVersionDetailRespVO;
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.version.ApiVersionRespVO;
|
||||
import com.zt.plat.module.databus.dal.dataobject.gateway.ApiVersionDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* API 版本历史 Convert。
|
||||
*/
|
||||
@Mapper
|
||||
public interface ApiVersionConvert {
|
||||
|
||||
ApiVersionConvert INSTANCE = Mappers.getMapper(ApiVersionConvert.class);
|
||||
|
||||
ApiVersionRespVO convert(ApiVersionDO bean);
|
||||
|
||||
PageResult<ApiVersionRespVO> convertPage(PageResult<ApiVersionDO> page);
|
||||
|
||||
List<ApiVersionRespVO> convertList(List<ApiVersionDO> list);
|
||||
|
||||
@Mapping(target = "snapshotData", ignore = true)
|
||||
ApiVersionDetailRespVO convertDetail(ApiVersionDO bean);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.zt.plat.module.databus.controller.admin.gateway.vo.accesslog;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
/**
|
||||
* Databus API 访问日志分页查询 VO。
|
||||
*/
|
||||
@Schema(description = "管理后台 - Databus API 访问日志分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ApiAccessLogPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "追踪 ID", example = "c8a3d52f-42c8-4b5d-9e26-8c2cc89f6bb5")
|
||||
private String traceId;
|
||||
|
||||
@Schema(description = "API 编码", example = "user.query")
|
||||
private String apiCode;
|
||||
|
||||
@Schema(description = "API 版本", example = "v1")
|
||||
private String apiVersion;
|
||||
|
||||
@Schema(description = "HTTP 方法", example = "POST")
|
||||
private String requestMethod;
|
||||
|
||||
@Schema(description = "响应 HTTP 状态", example = "200")
|
||||
private Integer responseStatus;
|
||||
|
||||
@Schema(description = "访问状态", example = "0")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "客户端 IP", example = "192.168.0.10")
|
||||
private String clientIp;
|
||||
|
||||
@Schema(description = "租户编号", example = "1")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "请求路径", example = "/gateway/api/user/query")
|
||||
private String requestPath;
|
||||
|
||||
@Schema(description = "请求时间区间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] requestTime;
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.zt.plat.module.databus.controller.admin.gateway.vo.accesslog;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Databus API 访问日志 Response VO。
|
||||
*/
|
||||
@Schema(description = "管理后台 - Databus API 访问日志 Response VO")
|
||||
@Data
|
||||
public class ApiAccessLogRespVO {
|
||||
|
||||
@Schema(description = "日志编号", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "追踪 ID", example = "c8a3d52f-42c8-4b5d-9e26-8c2cc89f6bb5")
|
||||
private String traceId;
|
||||
|
||||
@Schema(description = "API 编码", example = "user.query")
|
||||
private String apiCode;
|
||||
|
||||
@Schema(description = "API 版本", example = "v1")
|
||||
private String apiVersion;
|
||||
|
||||
@Schema(description = "HTTP 方法", example = "POST")
|
||||
private String requestMethod;
|
||||
|
||||
@Schema(description = "请求路径", example = "/gateway/api/user/query")
|
||||
private String requestPath;
|
||||
|
||||
@Schema(description = "查询参数(JSON)")
|
||||
private String requestQuery;
|
||||
|
||||
@Schema(description = "请求头(JSON)")
|
||||
private String requestHeaders;
|
||||
|
||||
@Schema(description = "请求体(JSON)")
|
||||
private String requestBody;
|
||||
|
||||
@Schema(description = "响应 HTTP 状态", example = "200")
|
||||
private Integer responseStatus;
|
||||
|
||||
@Schema(description = "响应提示", example = "OK")
|
||||
private String responseMessage;
|
||||
|
||||
@Schema(description = "响应体(JSON)")
|
||||
private String responseBody;
|
||||
|
||||
@Schema(description = "访问状态", example = "0")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "错误码", example = "DAT-001")
|
||||
private String errorCode;
|
||||
|
||||
@Schema(description = "错误信息", example = "API 调用失败")
|
||||
private String errorMessage;
|
||||
|
||||
@Schema(description = "异常堆栈")
|
||||
private String exceptionStack;
|
||||
|
||||
@Schema(description = "客户端 IP", example = "192.168.0.10")
|
||||
private String clientIp;
|
||||
|
||||
@Schema(description = "User-Agent")
|
||||
private String userAgent;
|
||||
|
||||
@Schema(description = "租户编号", example = "1")
|
||||
private Long tenantId;
|
||||
|
||||
@Schema(description = "请求耗时(毫秒)", example = "123")
|
||||
private Long duration;
|
||||
|
||||
@Schema(description = "请求时间")
|
||||
private LocalDateTime requestTime;
|
||||
|
||||
@Schema(description = "响应时间")
|
||||
private LocalDateTime responseTime;
|
||||
|
||||
@Schema(description = "执行步骤(JSON)")
|
||||
private String stepResults;
|
||||
|
||||
@Schema(description = "额外调试信息(JSON)")
|
||||
private String extra;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.zt.plat.module.databus.controller.admin.gateway.vo.version;
|
||||
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.definition.ApiDefinitionSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* API 版本对比 Response VO。
|
||||
*/
|
||||
@Schema(description = "管理后台 - API 版本对比 Response VO")
|
||||
@Data
|
||||
public class ApiVersionCompareRespVO {
|
||||
|
||||
@Schema(description = "源版本 ID", example = "1001")
|
||||
private Long sourceVersionId;
|
||||
|
||||
@Schema(description = "源版本号", example = "2")
|
||||
private Integer sourceVersionNumber;
|
||||
|
||||
@Schema(description = "源版本描述")
|
||||
private String sourceDescription;
|
||||
|
||||
@Schema(description = "源版本操作人")
|
||||
private String sourceOperator;
|
||||
|
||||
@Schema(description = "源版本创建时间")
|
||||
private LocalDateTime sourceCreateTime;
|
||||
|
||||
@Schema(description = "目标版本 ID", example = "1002")
|
||||
private Long targetVersionId;
|
||||
|
||||
@Schema(description = "目标版本号", example = "3")
|
||||
private Integer targetVersionNumber;
|
||||
|
||||
@Schema(description = "目标版本描述")
|
||||
private String targetDescription;
|
||||
|
||||
@Schema(description = "目标版本操作人")
|
||||
private String targetOperator;
|
||||
|
||||
@Schema(description = "目标版本创建时间")
|
||||
private LocalDateTime targetCreateTime;
|
||||
|
||||
@Schema(description = "源版本快照")
|
||||
private ApiDefinitionSaveReqVO sourceSnapshot;
|
||||
|
||||
@Schema(description = "目标版本快照")
|
||||
private ApiDefinitionSaveReqVO targetSnapshot;
|
||||
|
||||
@Schema(description = "两者是否完全一致")
|
||||
private Boolean same;
|
||||
|
||||
@Schema(description = "字段差异列表")
|
||||
private List<FieldDiff> differences;
|
||||
|
||||
@Data
|
||||
public static class FieldDiff {
|
||||
|
||||
@Schema(description = "差异字段路径", example = "/steps[0]/targetEndpoint")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "源版本值")
|
||||
private String sourceValue;
|
||||
|
||||
@Schema(description = "目标版本值")
|
||||
private String targetValue;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.zt.plat.module.databus.controller.admin.gateway.vo.version;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* API 版本历史创建 Request VO。
|
||||
*/
|
||||
@Schema(description = "管理后台 - API 版本历史创建 Request VO")
|
||||
@Data
|
||||
public class ApiVersionCreateReqVO {
|
||||
|
||||
@Schema(description = "API 定义 ID", required = true, example = "1024")
|
||||
@NotNull(message = "API 定义 ID 不能为空")
|
||||
private Long apiId;
|
||||
|
||||
@Schema(description = "版本号", required = true, example = "v1.0.0")
|
||||
@NotBlank(message = "版本号不能为空")
|
||||
private String versionNumber;
|
||||
|
||||
@Schema(description = "版本描述", example = "初始版本")
|
||||
private String description;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.zt.plat.module.databus.controller.admin.gateway.vo.version;
|
||||
|
||||
import com.zt.plat.module.databus.controller.admin.gateway.vo.definition.ApiDefinitionSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* API 版本详情 Response VO。
|
||||
* 包含完整的 API 定义快照数据。
|
||||
*/
|
||||
@Schema(description = "管理后台 - API 版本详情 Response VO")
|
||||
@Data
|
||||
public class ApiVersionDetailRespVO {
|
||||
|
||||
@Schema(description = "主键", example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "API 定义 ID", example = "1001")
|
||||
private Long apiId;
|
||||
|
||||
@Schema(description = "版本号", example = "1")
|
||||
private Integer versionNumber;
|
||||
|
||||
@Schema(description = "版本描述", example = "初始版本")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "是否为当前版本", example = "true")
|
||||
private Boolean isCurrent;
|
||||
|
||||
@Schema(description = "操作人", example = "admin")
|
||||
private String operator;
|
||||
|
||||
@Schema(description = "API 定义快照数据")
|
||||
private ApiDefinitionSaveReqVO snapshotData;
|
||||
|
||||
@Schema(description = "创建者", example = "admin")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "租户编号", example = "1")
|
||||
private Long tenantId;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user