From 4dd20be507e6b5af32272ce13c15991f89d1ab44 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 23 May 2023 10:27:35 +0800 Subject: [PATCH] build: spring data jdbc --- .../main/java/io/metersphere/Application.java | 4 +- backend/framework/domain/pom.xml | 9 ++-- .../metersphere/api/domain/ApiDefinition.java | 8 ++-- .../api/domain/ApiDefinitionBlob.java | 8 ++-- .../api/domain/ApiDefinitionFollow.java | 4 +- .../api/domain/ApiDefinitionMock.java | 8 ++-- .../api/domain/ApiDefinitionMockConfig.java | 8 ++-- .../api/domain/ApiDefinitionModule.java | 8 ++-- .../api/domain/ApiDefinitionSwagger.java | 8 ++-- .../api/domain/ApiEnvironmentConfig.java | 8 ++-- .../api/domain/ApiFakeErrorConfig.java | 8 ++-- .../io/metersphere/api/domain/ApiReport.java | 8 ++-- .../metersphere/api/domain/ApiReportBlob.java | 8 ++-- .../metersphere/api/domain/ApiScenario.java | 8 ++-- .../api/domain/ApiScenarioBlob.java | 8 ++-- .../api/domain/ApiScenarioEnvironment.java | 8 ++-- .../api/domain/ApiScenarioFollow.java | 4 +- .../api/domain/ApiScenarioModule.java | 8 ++-- .../api/domain/ApiScenarioReference.java | 8 ++-- .../api/domain/ApiScenarioReport.java | 8 ++-- .../api/domain/ApiScenarioReportDetail.java | 8 ++-- .../api/domain/ApiScenarioReportLog.java | 8 ++-- .../domain/ApiScenarioReportStructure.java | 8 ++-- .../metersphere/api/domain/ApiSyncConfig.java | 8 ++-- .../metersphere/api/domain/ApiTestCase.java | 8 ++-- .../api/domain/ApiTestCaseBlob.java | 8 ++-- .../api/domain/ApiTestCaseFollow.java | 4 +- .../functional/domain/CaseReview.java | 8 ++-- .../functional/domain/CaseReviewFollow.java | 8 ++-- .../domain/CaseReviewFunctionalCase.java | 8 ++-- .../domain/CaseReviewFunctionalCaseUser.java | 4 +- .../functional/domain/CaseReviewUser.java | 4 +- .../domain/CustomFieldTestCase.java | 4 +- .../functional/domain/FunctionalCase.java | 8 ++-- .../domain/FunctionalCaseAttachment.java | 4 +- .../functional/domain/FunctionalCaseBlob.java | 4 +- .../domain/FunctionalCaseComment.java | 8 ++-- .../domain/FunctionalCaseFollow.java | 4 +- .../domain/FunctionalCaseModule.java | 8 ++-- .../FunctionalCaseRelationshipEdge.java | 8 ++-- .../functional/domain/FunctionalCaseTest.java | 8 ++-- .../functional/domain/MinderExtraNode.java | 8 ++-- .../io/metersphere/load/domain/LoadTest.java | 8 ++-- .../metersphere/load/domain/LoadTestApi.java | 8 ++-- .../metersphere/load/domain/LoadTestBlob.java | 8 ++-- .../metersphere/load/domain/LoadTestFile.java | 4 +- .../load/domain/LoadTestFollow.java | 4 +- .../load/domain/LoadTestReport.java | 8 ++-- .../load/domain/LoadTestReportBlob.java | 8 ++-- .../load/domain/LoadTestReportFile.java | 6 +-- .../load/domain/LoadTestReportLog.java | 8 ++-- .../load/domain/LoadTestReportResult.java | 8 ++-- .../load/domain/LoadTestReportResultPart.java | 12 ++--- .../domain/LoadTestReportResultRealtime.java | 14 +++--- .../project/domain/ApiTemplate.java | 8 ++-- .../project/domain/CustomField.java | 8 ++-- .../project/domain/CustomFieldTemplate.java | 8 ++-- .../project/domain/CustomFunction.java | 8 ++-- .../project/domain/CustomFunctionBlob.java | 8 ++-- .../metersphere/project/domain/FakeError.java | 8 ++-- .../project/domain/FakeErrorBlob.java | 8 ++-- .../project/domain/FileMetadata.java | 8 ++-- .../project/domain/FileMetadataBlob.java | 8 ++-- .../project/domain/FileModule.java | 8 ++-- .../project/domain/FileModuleBlob.java | 8 ++-- .../domain/FunctionalCaseTemplate.java | 8 ++-- .../domain/FunctionalCaseTemplateExtend.java | 8 ++-- .../project/domain/IssueTemplate.java | 8 ++-- .../project/domain/IssueTemplateExtend.java | 8 ++-- .../metersphere/project/domain/Project.java | 8 ++-- .../project/domain/ProjectApplication.java | 14 ++---- .../project/domain/ProjectExtend.java | 8 ++-- .../project/domain/ProjectVersion.java | 8 ++-- .../metersphere/sdk/domain/Environment.java | 8 ++-- .../sdk/domain/EnvironmentGroup.java | 8 ++-- .../sdk/domain/EnvironmentGroupProject.java | 8 ++-- .../sdk/domain/ExecutionQueue.java | 8 ++-- .../sdk/domain/ExecutionQueueDetail.java | 8 ++-- .../sdk/domain/RelationshipEdge.java | 10 ++-- .../io/metersphere/sdk/domain/ShareInfo.java | 8 ++-- .../metersphere/system/domain/AuthSource.java | 8 ++-- .../io/metersphere/system/domain/License.java | 8 ++-- .../system/domain/MessageTask.java | 8 ++-- .../system/domain/MessageTaskBlob.java | 8 ++-- .../system/domain/Notification.java | 8 ++-- .../system/domain/NoviceStatistics.java | 8 ++-- .../system/domain/OperatingLog.java | 8 ++-- .../system/domain/OperatingLogResource.java | 8 ++-- .../io/metersphere/system/domain/Plugin.java | 8 ++-- .../metersphere/system/domain/PluginBlob.java | 8 ++-- .../io/metersphere/system/domain/Quota.java | 8 ++-- .../metersphere/system/domain/Schedule.java | 8 ++-- .../system/domain/ServiceIntegration.java | 8 ++-- .../system/domain/SystemParameter.java | 8 ++-- .../system/domain/TestResource.java | 8 ++-- .../system/domain/TestResourcePool.java | 8 ++-- .../io/metersphere/system/domain/User.java | 8 ++-- .../metersphere/system/domain/UserExtend.java | 8 ++-- .../io/metersphere/system/domain/UserKey.java | 8 ++-- .../metersphere/system/domain/UserRole.java | 8 ++-- .../system/domain/UserRolePermission.java | 8 ++-- .../system/domain/UserRoleRelation.java | 8 ++-- .../metersphere/system/domain/Workspace.java | 8 ++-- .../ui/domain/UiCustomCommand.java | 8 ++-- .../ui/domain/UiCustomCommandBlob.java | 8 ++-- .../ui/domain/UiCustomCommandModule.java | 8 ++-- .../io/metersphere/ui/domain/UiElement.java | 8 ++-- .../ui/domain/UiElementModule.java | 8 ++-- .../ui/domain/UiElementReference.java | 8 ++-- .../io/metersphere/ui/domain/UiScenario.java | 8 ++-- .../metersphere/ui/domain/UiScenarioBlob.java | 8 ++-- .../ui/domain/UiScenarioExecutionInfo.java | 8 ++-- .../ui/domain/UiScenarioModule.java | 8 ++-- .../ui/domain/UiScenarioReference.java | 8 ++-- .../ui/domain/UiScenarioReport.java | 8 ++-- .../ui/domain/UiScenarioReportBlob.java | 8 ++-- .../ui/domain/UiScenarioReportResult.java | 8 ++-- .../ui/domain/UiScenarioReportStructure.java | 8 ++-- backend/framework/sdk/pom.xml | 9 ++-- .../metersphere/sdk/config/MybatisConfig.java | 2 + .../sdk/mapper/UserExtendMapper.java | 7 --- .../io/metersphere/sdk/mapper/UserMapper.java | 4 +- .../sdk/service/BaseUserService.java | 5 +- .../mapper/CaseReviewFollowMapper.java | 4 +- .../CaseReviewFunctionalCaseMapper.java | 4 +- .../CaseReviewFunctionalCaseUserMapper.java | 4 +- .../functional/mapper/CaseReviewMapper.java | 4 +- .../mapper/CaseReviewUserMapper.java | 4 +- .../mapper/CustomFieldTestCaseMapper.java | 4 +- .../FunctionalCaseAttachmentMapper.java | 10 ++-- .../mapper/FunctionalCaseBlobMapper.java | 10 ++-- .../mapper/FunctionalCaseCommentMapper.java | 4 +- .../mapper/FunctionalCaseFollowMapper.java | 10 ++-- .../mapper/FunctionalCaseMapper.java | 4 +- .../mapper/FunctionalCaseModuleMapper.java | 10 ++-- .../FunctionalCaseRelationshipEdgeMapper.java | 4 +- .../mapper/FunctionalCaseTestMapper.java | 6 +-- .../mapper/MinderExtraNodeMapper.java | 6 +-- .../service/CaseReviewFollowService.java | 5 +- .../CaseReviewFunctionalCaseService.java | 5 +- .../CaseReviewFunctionalCaseUserService.java | 5 +- .../functional/service/CaseReviewService.java | 5 +- .../service/CaseReviewUserService.java | 5 +- .../service/CustomFieldTestCaseService.java | 5 +- .../FunctionalCaseAttachmentService.java | 5 +- .../service/FunctionalCaseBlobService.java | 5 +- .../service/FunctionalCaseCommentService.java | 5 +- .../service/FunctionalCaseFollowService.java | 5 +- .../service/FunctionalCaseModuleService.java | 5 +- ...FunctionalCaseRelationshipEdgeService.java | 5 +- .../service/FunctionalCaseService.java | 5 +- .../service/FunctionalCaseTestService.java | 5 +- .../service/MinderExtraNodeService.java | 5 +- .../ProjectApplicationController.java | 36 ++++++++++++++ .../mapper/ProjectApplicationMapper.java | 11 +++++ .../mapper/ProjectApplicationMapper.xml | 18 +++++++ .../project/mapper/ProjectMapper.java | 7 --- .../service/ProjectApplicationService.java | 39 +++++++++++++++ .../project/service/ProjectService.java | 14 ++++-- .../io/metersphere/project/Application.java | 4 +- .../ProjectApplicationControllerTests.java | 48 ++++++++++++++----- .../src/test/resources/application.properties | 6 ++- .../system/controller/UserController.java | 2 +- .../system/service/UserService.java | 24 ++++++---- .../io/metersphere/system/Application.java | 4 +- .../src/test/resources/application.properties | 6 ++- 166 files changed, 686 insertions(+), 636 deletions(-) delete mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserExtendMapper.java create mode 100644 backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java create mode 100644 backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.java create mode 100644 backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.xml delete mode 100644 backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectMapper.java create mode 100644 backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectApplicationService.java diff --git a/backend/app/src/main/java/io/metersphere/Application.java b/backend/app/src/main/java/io/metersphere/Application.java index 2f01a9be11..98ce4fbffc 100644 --- a/backend/app/src/main/java/io/metersphere/Application.java +++ b/backend/app/src/main/java/io/metersphere/Application.java @@ -1,6 +1,5 @@ package io.metersphere; -import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; @@ -12,8 +11,7 @@ import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = { QuartzAutoConfiguration.class, LdapAutoConfiguration.class, - Neo4jAutoConfiguration.class, - MybatisAutoConfiguration.class + Neo4jAutoConfiguration.class }) @PropertySource(value = { "classpath:commons.properties", diff --git a/backend/framework/domain/pom.xml b/backend/framework/domain/pom.xml index f1c54c30a2..ecd49fa1dc 100644 --- a/backend/framework/domain/pom.xml +++ b/backend/framework/domain/pom.xml @@ -14,14 +14,13 @@ - mybatis-plus-annotation - com.baomidou - ${mybatis-plus-starter.version} + org.springframework.boot + spring-boot-starter-validation provided - org.springframework.boot - spring-boot-starter-validation + org.springframework.data + spring-data-jdbc provided diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinition.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinition.java index 9e7d437616..4e00955890 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinition.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinition.java @@ -1,7 +1,7 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "接口定义") -@TableName("api_definition") +@Table("api_definition") @Data public class ApiDefinition implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_definition.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "接口pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionBlob.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionBlob.java index ac4d1ff4c0..033a8b6ac7 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionBlob.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -13,13 +13,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "接口定义详情内容") -@TableName("api_definition_blob") +@Table("api_definition_blob") @Data @EqualsAndHashCode(callSuper=false) public class ApiDefinitionBlob extends ApiDefinition implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_definition_blob.api_definition_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "接口fk/ 一对一关系", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionFollow.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionFollow.java index 79522c44eb..9c266f8b97 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionFollow.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionFollow.java @@ -1,7 +1,6 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -9,11 +8,12 @@ import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "接口定义关注人") -@TableName("api_definition_follow") +@Table("api_definition_follow") @Data public class ApiDefinitionFollow implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionMock.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionMock.java index 0bfbe88baa..53fbf14e72 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionMock.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionMock.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "mock 配置") -@TableName("api_definition_mock") +@Table("api_definition_mock") @Data public class ApiDefinitionMock implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_definition_mock.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "mock pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionMockConfig.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionMockConfig.java index 02e5a5cb4c..378ca1de00 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionMockConfig.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionMockConfig.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -12,12 +12,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "mock期望值配置") -@TableName("api_definition_mock_config") +@Table("api_definition_mock_config") @Data public class ApiDefinitionMockConfig extends ApiDefinitionMock implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_definition_mock_config.api_definition_mock_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "接口mock pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionModule.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionModule.java index a9a5cb59a6..ea2bca6341 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionModule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionModule.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "接口模块") -@TableName("api_definition_module") +@Table("api_definition_module") @Data public class ApiDefinitionModule implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_definition_module.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "接口模块pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionSwagger.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionSwagger.java index 5fb8030337..9679d2841f 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionSwagger.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionSwagger.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "定时同步配置") -@TableName("api_definition_swagger") +@Table("api_definition_swagger") @Data public class ApiDefinitionSwagger implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_definition_swagger.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "主键", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiEnvironmentConfig.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiEnvironmentConfig.java index 3963c0c585..a1cfa459be 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiEnvironmentConfig.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiEnvironmentConfig.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "接口定义公共部分环境") -@TableName("api_environment_config") +@Table("api_environment_config") @Data public class ApiEnvironmentConfig implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_definition_env.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiFakeErrorConfig.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiFakeErrorConfig.java index 45b0197559..77d20bdc88 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiFakeErrorConfig.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiFakeErrorConfig.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "误报库") -@TableName("api_fake_error_config") +@Table("api_fake_error_config") @Data public class ApiFakeErrorConfig implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_fake_error_config.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "误报pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiReport.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiReport.java index d75464382b..8443acbbab 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiReport.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiReport.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "API/CASE执行结果") -@TableName("api_report") +@Table("api_report") @Data public class ApiReport implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_report.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "接口结果报告pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiReportBlob.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiReportBlob.java index 74f9406a25..55abacc60c 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiReportBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiReportBlob.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -13,13 +13,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "API/CASE执行结果详情") -@TableName("api_report_blob") +@Table("api_report_blob") @Data @EqualsAndHashCode(callSuper=false) public class ApiReportBlob extends ApiReport implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_report_blob.api_report_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "接口报告fk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java index 65a296080e..6aa08ee3a6 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景") -@TableName("api_scenario") +@Table("api_scenario") @Data public class ApiScenario implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_scenario.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlob.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlob.java index 5cb97fefa4..68774bc287 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlob.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -13,13 +13,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "场景步骤详情") -@TableName("api_scenario_blob") +@Table("api_scenario_blob") @Data @EqualsAndHashCode(callSuper=false) public class ApiScenarioBlob extends ApiScenario implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_scenario_blob.api_scenario_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "场景pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioEnvironment.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioEnvironment.java index 5ce9b462a1..e0a695e625 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioEnvironment.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioEnvironment.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景环境") -@TableName("api_scenario_environment") +@Table("api_scenario_environment") @Data public class ApiScenarioEnvironment implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_scenario_environment.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "场景环境pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioFollow.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioFollow.java index 234722ee61..d8a00909c2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioFollow.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioFollow.java @@ -1,7 +1,6 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -9,11 +8,12 @@ import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "关注记录") -@TableName("api_scenario_follow") +@Table("api_scenario_follow") @Data public class ApiScenarioFollow implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioModule.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioModule.java index 7199a2ea56..553c24fdff 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioModule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioModule.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景模块") -@TableName("api_scenario_module") +@Table("api_scenario_module") @Data public class ApiScenarioModule implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_scenario_module.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "场景模块pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReference.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReference.java index a26c637517..6dc4780a61 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReference.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReference.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景步骤引用CASE关系记录") -@TableName("api_scenario_reference") +@Table("api_scenario_reference") @Data public class ApiScenarioReference implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_scenario_reference.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "引用关系pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReport.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReport.java index 355bf2e619..b16cb71b86 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReport.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReport.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景报告") -@TableName("api_scenario_report") +@Table("api_scenario_report") @Data public class ApiScenarioReport implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_scenario_report.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "场景报告pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportDetail.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportDetail.java index 1bc2e6a615..5d7e72ee72 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportDetail.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportDetail.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -15,13 +15,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "场景报告步骤结果") -@TableName("api_scenario_report_detail") +@Table("api_scenario_report_detail") @Data @EqualsAndHashCode(callSuper=false) public class ApiScenarioReportDetail extends ApiScenarioReport implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_scenario_report_detail.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportLog.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportLog.java index 43f3744308..8c63e9e727 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportLog.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportLog.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -12,12 +12,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景报告过程日志") -@TableName("api_scenario_report_log") +@Table("api_scenario_report_log") @Data public class ApiScenarioReportLog implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_scenario_report_log.report_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "请求资源 id", required = true, allowableValues = "range[1, 50]") private String reportId; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportStructure.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportStructure.java index a8c23ef9cd..9817c60f79 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportStructure.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReportStructure.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -12,12 +12,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景报告结构") -@TableName("api_scenario_report_structure") +@Table("api_scenario_report_structure") @Data public class ApiScenarioReportStructure implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_scenario_report_structure.report_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "请求资源 id", required = true, allowableValues = "range[1, 50]") private String reportId; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiSyncConfig.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiSyncConfig.java index 1d2af3c583..e3f0dd0048 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiSyncConfig.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiSyncConfig.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "接口同步用例配置") -@TableName("api_sync_config") +@Table("api_sync_config") @Data public class ApiSyncConfig implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_sync_config.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCase.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCase.java index 81072df80e..cd61a81891 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCase.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCase.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "接口用例") -@TableName("api_test_case") +@Table("api_test_case") @Data public class ApiTestCase implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_test_case.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "接口用例pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCaseBlob.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCaseBlob.java index 2dc07f605b..67ad99fea9 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCaseBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCaseBlob.java @@ -1,8 +1,8 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -13,13 +13,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "接口用例详情") -@TableName("api_test_case_blob") +@Table("api_test_case_blob") @Data @EqualsAndHashCode(callSuper=false) public class ApiTestCaseBlob extends ApiTestCase implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_test_case_blob.api_test_case_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "接口用例pk", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCaseFollow.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCaseFollow.java index f46267f71b..9f0d9026a1 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCaseFollow.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiTestCaseFollow.java @@ -1,7 +1,6 @@ package io.metersphere.api.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -9,11 +8,12 @@ import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "接口用例关注人") -@TableName("api_test_case_follow") +@Table("api_test_case_follow") @Data public class ApiTestCaseFollow implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReview.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReview.java index 41bad9da4e..8c5712fb82 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReview.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReview.java @@ -1,7 +1,7 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "用例评审") -@TableName("case_review") +@Table("case_review") @Data public class CaseReview implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{case_review.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollow.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollow.java index fe3408b28e..ad98bfe140 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollow.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollow.java @@ -1,7 +1,7 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -11,12 +11,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "用例评审关注人") -@TableName("case_review_follow") +@Table("case_review_follow") @Data public class CaseReviewFollow implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{case_review_follow.review_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "评审ID", required = true, allowableValues = "range[1, 50]") private String reviewId; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCase.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCase.java index c621b089dc..3833ca2a71 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCase.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCase.java @@ -1,7 +1,7 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "用例评审和功能用例的中间表") -@TableName("case_review_functional_case") +@Table("case_review_functional_case") @Data public class CaseReviewFunctionalCase implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{case_review_functional_case.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseUser.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseUser.java index c77c4a37cd..febd3990d5 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseUser.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseUser.java @@ -1,6 +1,5 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -8,11 +7,12 @@ import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "功能用例评审和评审人的中间表") -@TableName("case_review_functional_case_user") +@Table("case_review_functional_case_user") @Data public class CaseReviewFunctionalCaseUser implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewUser.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewUser.java index 14965f3c9f..9d8592d5e3 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewUser.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewUser.java @@ -1,16 +1,16 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "评审和评审人中间表") -@TableName("case_review_user") +@Table("case_review_user") @Data public class CaseReviewUser implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CustomFieldTestCase.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CustomFieldTestCase.java index 1c1f91d3cc..6939db5338 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CustomFieldTestCase.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CustomFieldTestCase.java @@ -1,16 +1,16 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "自定义字段功能用例关系") -@TableName("custom_field_test_case") +@Table("custom_field_test_case") @Data public class CustomFieldTestCase implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCase.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCase.java index 8ebbf7c52a..20721b96dc 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCase.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCase.java @@ -1,8 +1,8 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,13 +14,13 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "功能用例") -@TableName("functional_case") +@Table("functional_case") @Data public class FunctionalCase implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{functional_case.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachment.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachment.java index 73bfacad7a..ebcce208d9 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachment.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseAttachment.java @@ -1,16 +1,16 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "功能用例和附件的中间表") -@TableName("functional_case_attachment") +@Table("functional_case_attachment") @Data public class FunctionalCaseAttachment implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseBlob.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseBlob.java index edc670ad75..916aec817b 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseBlob.java @@ -1,14 +1,14 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "功能用例") -@TableName("functional_case_blob") +@Table("functional_case_blob") @Data public class FunctionalCaseBlob extends FunctionalCase implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseComment.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseComment.java index 1a2af46a6e..6dfe07be11 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseComment.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseComment.java @@ -2,8 +2,8 @@ package io.metersphere.functional.domain; import java.io.Serializable; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import jakarta.validation.constraints.Size; import lombok.Data; @ApiModel(value = "功能用例评论") -@TableName("functional_case_comment") +@Table("functional_case_comment") @Data public class FunctionalCaseComment implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{functional_case_comment.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollow.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollow.java index 2601595670..576171b821 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollow.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollow.java @@ -1,16 +1,16 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "功能用例和关注人的中间表") -@TableName("functional_case_follow") +@Table("functional_case_follow") @Data public class FunctionalCaseFollow implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseModule.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseModule.java index d15f1be841..d6be3da6a2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseModule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseModule.java @@ -2,8 +2,8 @@ package io.metersphere.functional.domain; import java.io.Serializable; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import jakarta.validation.constraints.Size; import lombok.Data; @ApiModel(value = "功能用例模块") -@TableName("functional_case_module") +@Table("functional_case_module") @Data public class FunctionalCaseModule implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{functional_case_module.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseRelationshipEdge.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseRelationshipEdge.java index 762fa7397f..95d7de7ba6 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseRelationshipEdge.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseRelationshipEdge.java @@ -1,7 +1,7 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,11 +13,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "功能用例的前后置关系") -@TableName("functional_case_relationship_edge") +@Table("functional_case_relationship_edge") @Data public class FunctionalCaseRelationshipEdge implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{functional_case_relationship_edge.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseTest.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseTest.java index e9fc47a431..49840e5ed3 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseTest.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseTest.java @@ -1,7 +1,7 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "功能用例和其他用例的中间表") -@TableName("functional_case_test") +@Table("functional_case_test") @Data public class FunctionalCaseTest implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{functional_case_test.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/MinderExtraNode.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/MinderExtraNode.java index 6fa307a797..5fc7b976f8 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/MinderExtraNode.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/MinderExtraNode.java @@ -1,7 +1,7 @@ package io.metersphere.functional.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "脑图临时节点") -@TableName("minder_extra_node") +@Table("minder_extra_node") @Data public class MinderExtraNode implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{minder_extra_node.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTest.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTest.java index 5343fb5449..50e834c0b4 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTest.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTest.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,11 +13,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "性能测试用例") -@TableName("load_test") +@Table("load_test") @Data public class LoadTest implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{load_test.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "测试ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestApi.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestApi.java index 751ae346fe..156eecd5e0 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestApi.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestApi.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "关联场景测试和性能测试") -@TableName("load_test_api") +@Table("load_test_api") @Data public class LoadTestApi implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{load_test_api.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestBlob.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestBlob.java index a2a2120952..d726cced65 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestBlob.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "性能测试用例大字段") -@TableName("load_test_blob") +@Table("load_test_blob") @Data @EqualsAndHashCode(callSuper=false) public class LoadTestBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{load_test_blob.test_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "测试ID", required = true, allowableValues = "range[1, 50]") private String testId; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFile.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFile.java index e43ef5158b..e0dbe1fb89 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFile.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFile.java @@ -1,6 +1,5 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -8,11 +7,12 @@ import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "测试和文件的关联表") -@TableName("load_test_file") +@Table("load_test_file") @Data public class LoadTestFile implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollow.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollow.java index f26e95ff25..91d16026f8 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollow.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollow.java @@ -1,6 +1,5 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -8,11 +7,12 @@ import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "性能用例关注人") -@TableName("load_test_follow") +@Table("load_test_follow") @Data public class LoadTestFollow implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReport.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReport.java index 4a833832b6..38be48dfba 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReport.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReport.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "性能报告") -@TableName("load_test_report") +@Table("load_test_report") @Data public class LoadTestReport implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{load_test_report.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "报告ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportBlob.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportBlob.java index 34620537eb..efd5cd283a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportBlob.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -12,12 +12,12 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "性能报告大字段") -@TableName("load_test_report_blob") +@Table("load_test_report_blob") @Data @EqualsAndHashCode(callSuper=false) public class LoadTestReportBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{load_test_report_blob.report_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]") private String reportId; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportFile.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportFile.java index 40aa152183..54b60ff499 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportFile.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportFile.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,7 +12,7 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "测试报告文件关联表") -@TableName("load_test_report_file") +@Table("load_test_report_file") @Data public class LoadTestReportFile implements Serializable { private static final long serialVersionUID = 1L; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportLog.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportLog.java index 403d248b1c..61895cac95 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportLog.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportLog.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "报告日志jmeter.log") -@TableName("load_test_report_log") +@Table("load_test_report_log") @Data public class LoadTestReportLog implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{load_test_report_log.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "主键无实际意义", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResult.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResult.java index 95a8b20943..44e19df7f2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResult.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResult.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,11 +13,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "报告结果") -@TableName("load_test_report_result") +@Table("load_test_report_result") @Data public class LoadTestReportResult implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{load_test_report_result.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "主键无实际意义", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultPart.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultPart.java index 0554508bd8..1b53bd578b 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultPart.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultPart.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -11,21 +11,21 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "部分报告结果") -@TableName("load_test_report_result_part") +@Table("load_test_report_result_part") @Data public class LoadTestReportResultPart implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{load_test_report_result_part.report_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]") private String reportId; - @TableId + @Id @NotBlank(message = "{load_test_report_result_part.report_key.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "报告项目key", required = true, allowableValues = "range[1, 64]") private String reportKey; - @TableId + @Id @NotBlank(message = "{load_test_report_result_part.resource_index.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "资源节点索引号", required = true, dataType = "Integer") private Integer resourceIndex; diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultRealtime.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultRealtime.java index c319beed5c..cf8377c951 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultRealtime.java +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultRealtime.java @@ -1,7 +1,7 @@ package io.metersphere.load.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,26 +12,26 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "即时报告结果") -@TableName("load_test_report_result_realtime") +@Table("load_test_report_result_realtime") @Data public class LoadTestReportResultRealtime implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{load_test_report_result_realtime.report_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "报告ID", required = true, allowableValues="range[1, 50]") private String reportId; - @TableId + @Id @NotBlank(message = "{load_test_report_result_realtime.report_key.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "报告项目key", required = true, allowableValues="range[1, 64]") private String reportKey; - @TableId + @Id @NotBlank(message = "{load_test_report_result_realtime.resource_index.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "资源节点索引号", required = true, dataType = "Integer") private Integer resourceIndex; - @TableId + @Id @NotBlank(message = "{load_test_report_result_realtime.sort.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "报告项目内容排序", required = true, dataType = "Integer") private Integer sort; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplate.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplate.java index 3086e38a62..e460f7fe86 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplate.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplate.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "API模版表") -@TableName("api_template") +@Table("api_template") @Data public class ApiTemplate implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{api_template.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "模版ID", required = true, allowableValues = "range[1, 100]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomField.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomField.java index 7a5a6a8cb7..ac5b56e02c 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomField.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomField.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,12 +12,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "自定义字段") -@TableName("custom_field") +@Table("custom_field") @Data public class CustomField implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{custom_field.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "自定义字段ID", required = true, allowableValues="range[1, 100]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplate.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplate.java index 88a4fe858b..378bc93311 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplate.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplate.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,12 +12,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "自定义模版") -@TableName("custom_field_template") +@Table("custom_field_template") @Data public class CustomFieldTemplate implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{custom_field_template.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "自定义模版ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunction.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunction.java index 68284811ec..5fe6a5b1f5 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunction.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunction.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "自定义函数-代码片段") -@TableName("custom_function") +@Table("custom_function") @Data public class CustomFunction implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{custom_function.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionBlob.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionBlob.java index eba625acee..e2d01d24a2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionBlob.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -12,13 +12,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "自定义函数-代码片段大字段") -@TableName("custom_function_blob") +@Table("custom_function_blob") @Data @EqualsAndHashCode(callSuper=false) public class CustomFunctionBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{custom_function_blob.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeError.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeError.java index ebc92dce2c..55c0b42ea2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeError.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeError.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "误报库") -@TableName("fake_error") +@Table("fake_error") @Data public class FakeError implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{fake_error.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "误报ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorBlob.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorBlob.java index 3c6b55333e..235eae1a73 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorBlob.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,13 +14,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "误报库大字段") -@TableName("fake_error_blob") +@Table("fake_error_blob") @Data @EqualsAndHashCode(callSuper=false) public class FakeErrorBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{fake_error_blob.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "Test ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadata.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadata.java index 758fa1dccc..74a4f57578 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadata.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadata.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "文件基础信息") -@TableName("file_metadata") +@Table("file_metadata") @Data public class FileMetadata implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{file_metadata.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "文件ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataBlob.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataBlob.java index 724a1a2663..7bc455e9ef 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataBlob.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,13 +14,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "文件基础信息大字段") -@TableName("file_metadata_blob") +@Table("file_metadata_blob") @Data @EqualsAndHashCode(callSuper=false) public class FileMetadataBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{file_metadata_blob.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "文件ID", required = true, allowableValues = "range[1, 255]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModule.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModule.java index 9ddcffc68a..abdb25d5e0 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModule.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "文件管理模块") -@TableName("file_module") +@Table("file_module") @Data public class FileModule implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{file_module.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleBlob.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleBlob.java index 6dbb2c1345..9354ff0f0d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleBlob.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,13 +14,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "文件管理模块大字段") -@TableName("file_module_blob") +@Table("file_module_blob") @Data @EqualsAndHashCode(callSuper=false) public class FileModuleBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{file_module_blob.file_module_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplate.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplate.java index 438bb70b07..3bca0e54e7 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplate.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplate.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,12 +12,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "功能用例模版") -@TableName("functional_case_template") +@Table("functional_case_template") @Data public class FunctionalCaseTemplate implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{functional_case_template.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtend.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtend.java index c7ff67bbea..04d3622b4d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtend.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtend.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,13 +14,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "功能用例模版扩展") -@TableName("functional_case_template_extend") +@Table("functional_case_template_extend") @Data @EqualsAndHashCode(callSuper = false) public class FunctionalCaseTemplateExtend implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{functional_case_template_extend.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "模板ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplate.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplate.java index 071cc28a26..5283b3aa73 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplate.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplate.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,12 +12,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "缺陷模版") -@TableName("issue_template") +@Table("issue_template") @Data public class IssueTemplate implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{issue_template.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtend.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtend.java index 5e9f947727..fb665c907d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtend.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtend.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,13 +14,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "缺陷模板扩展") -@TableName("issue_template_extend") +@Table("issue_template_extend") @Data @EqualsAndHashCode(callSuper = false) public class IssueTemplateExtend implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{issue_template_extend.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "缺陷模板ID", required = true, allowableValues = "range[1, 100]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/Project.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/Project.java index e94641f615..6d87a0401e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/Project.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/Project.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "项目") -@TableName("project") +@Table("project") @Data public class Project implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{project.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectApplication.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectApplication.java index 867c31714d..27577692cc 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectApplication.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectApplication.java @@ -1,34 +1,30 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import lombok.Data; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "项目应用") -@TableName("project_application") +@Table("project_application") @Data public class ProjectApplication implements Serializable { private static final long serialVersionUID = 1L; - @TableId - @NotBlank(message = "{project_application.project_id.not_blank}", groups = {Updated.class}) + @NotBlank(message = "{project_application.project_id.not_blank}", groups = {Created.class, Updated.class}) @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") private String projectId; - @TableId - @NotBlank(message = "{project_application.type.not_blank}", groups = {Updated.class}) + @NotBlank(message = "{project_application.type.not_blank}", groups = {Created.class, Updated.class}) @ApiModelProperty(name = "配置项", required = true, allowableValues = "range[1, 50]") private String type; @ApiModelProperty(name = "配置值", required = false, allowableValues = "range[1, 255]") private String typeValue; - - } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExtend.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExtend.java index 5660ae1c18..2125a32bd8 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExtend.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExtend.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,13 +14,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "项目扩展") -@TableName("project_extend") +@Table("project_extend") @Data @EqualsAndHashCode(callSuper = false) public class ProjectExtend implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{project_extend.project_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectVersion.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectVersion.java index 3838ddc494..6c525b4124 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectVersion.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectVersion.java @@ -1,7 +1,7 @@ package io.metersphere.project.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "版本管理") -@TableName("project_version") +@Table("project_version") @Data public class ProjectVersion implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{project_version.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "版本ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/Environment.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/Environment.java index 42a814207f..1e5c88d37a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/Environment.java +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/Environment.java @@ -1,7 +1,7 @@ package io.metersphere.sdk.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "环境") -@TableName("environment") +@Table("environment") @Data public class Environment implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{environment.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "Api Test Environment ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroup.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroup.java index 93bf368bb4..0cda5a95d0 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroup.java +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroup.java @@ -1,7 +1,7 @@ package io.metersphere.sdk.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "环境组") -@TableName("environment_group") +@Table("environment_group") @Data public class EnvironmentGroup implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{environment_group.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "环境组id", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupProject.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupProject.java index a4a388d3aa..38c3cace15 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupProject.java +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupProject.java @@ -1,7 +1,7 @@ package io.metersphere.sdk.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -11,12 +11,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "环境组配置") -@TableName("environment_group_project") +@Table("environment_group_project") @Data public class EnvironmentGroupProject implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{environment_group_project.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueue.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueue.java index a5dcb76f8a..2f51bd1159 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueue.java +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueue.java @@ -1,7 +1,7 @@ package io.metersphere.sdk.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -11,12 +11,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "执行链(接口/场景/UI/性能用例)") -@TableName("execution_queue") +@Table("execution_queue") @Data public class ExecutionQueue implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{execution_queue.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetail.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetail.java index 881bbdd4f2..bac60a3cbf 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetail.java +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetail.java @@ -1,7 +1,7 @@ package io.metersphere.sdk.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -11,12 +11,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "执行链条目") -@TableName("execution_queue_detail") +@Table("execution_queue_detail") @Data public class ExecutionQueueDetail implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{execution_queue_detail.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/RelationshipEdge.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/RelationshipEdge.java index afac79a0b5..c52895d3d0 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/RelationshipEdge.java +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/RelationshipEdge.java @@ -1,7 +1,7 @@ package io.metersphere.sdk.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,17 +13,17 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "关系图") -@TableName("relationship_edge") +@Table("relationship_edge") @Data public class RelationshipEdge implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{relationship_edge.source_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "源节点的ID", required = true, allowableValues = "range[1, 50]") private String sourceId; - @TableId + @Id @NotBlank(message = "{relationship_edge.target_id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "目标节点的ID", required = true, allowableValues = "range[1, 50]") private String targetId; diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ShareInfo.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ShareInfo.java index 761cb5670c..77edb19f77 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ShareInfo.java +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ShareInfo.java @@ -1,7 +1,7 @@ package io.metersphere.sdk.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -11,12 +11,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "分享") -@TableName("share_info") +@Table("share_info") @Data public class ShareInfo implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{share_info.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "分享ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSource.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSource.java index 7e3a7ee56b..262d8ff3ba 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSource.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSource.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "三方认证源") -@TableName("auth_source") +@Table("auth_source") @Data public class AuthSource implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{auth_source.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "认证源ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/License.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/License.java index fe9aa4efef..4563037a0e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/License.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/License.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "") -@TableName("license") +@Table("license") @Data public class License implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{license.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTask.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTask.java index 6df2f63f7b..a77cfb2060 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTask.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTask.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "消息通知任务") -@TableName("message_task") +@Table("message_task") @Data public class MessageTask implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{message_task.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 255]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlob.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlob.java index cde5e4e22c..6f622a7554 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlob.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,13 +14,13 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "消息通知任务大字段") -@TableName("message_task_blob") +@Table("message_task_blob") @Data @EqualsAndHashCode(callSuper=false) public class MessageTaskBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{message_task_blob.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Notification.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Notification.java index 4fa40234ff..5b9e43bed6 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Notification.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Notification.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "消息通知") -@TableName("notification") +@Table("notification") @Data public class Notification implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{notification.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, ]") private Long id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatistics.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatistics.java index b2c820b778..97c8917065 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatistics.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatistics.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "新手村") -@TableName("novice_statistics") +@Table("novice_statistics") @Data public class NoviceStatistics implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{novice_statistics.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLog.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLog.java index 335ecd0370..aba3de215c 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLog.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLog.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "操作日志") -@TableName("operating_log") +@Table("operating_log") @Data public class OperatingLog implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{operating_log.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResource.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResource.java index 0401ee9d18..ac5b37da5b 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResource.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResource.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,12 +12,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "操作日志关系记录") -@TableName("operating_log_resource") +@Table("operating_log_resource") @Data public class OperatingLogResource implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{operating_log_resource.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Plugin.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Plugin.java index ce63abc828..9f3174c968 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Plugin.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Plugin.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "插件") -@TableName("plugin") +@Table("plugin") @Data public class Plugin implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{plugin.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlob.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlob.java index 85c15ab88a..6aa24eeaba 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlob.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "插件大字段") -@TableName("plugin_blob") +@Table("plugin_blob") @Data public class PluginBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{plugin_blob.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java index 878816e8e4..52d7b45ce3 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "配额") -@TableName("quota") +@Table("quota") @Data public class Quota implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{quota.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java index f3edfb6333..f67678c345 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "定时任务") -@TableName("schedule") +@Table("schedule") @Data public class Schedule implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{schedule.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java index 179d8e0bce..74530eda8b 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "服务集成") -@TableName("service_integration") +@Table("service_integration") @Data public class ServiceIntegration implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{service_integration.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameter.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameter.java index 49efe81b07..bc252e9842 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameter.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameter.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "系统参数") -@TableName("system_parameter") +@Table("system_parameter") @Data public class SystemParameter implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{system_parameter.param_key.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "参数名称", required = true, allowableValues = "range[1, 64]") private String paramKey; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResource.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResource.java index 04d2a36380..2772887679 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResource.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResource.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "测试资源池节点") -@TableName("test_resource") +@Table("test_resource") @Data public class TestResource implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{test_resource.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "Test resource ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePool.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePool.java index 0e83d58fd4..4c4d95ba58 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePool.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePool.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "测试资源池") -@TableName("test_resource_pool") +@Table("test_resource_pool") @Data public class TestResourcePool implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{test_resource_pool.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "资源池ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java index 2a71b45b4c..f8455fbed4 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java @@ -1,7 +1,5 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -9,16 +7,18 @@ import io.swagger.annotations.ApiModelProperty; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; @ApiModel(value = "用户") -@TableName("user") +@Table("user") @Data public class User implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{user.id.not_blank}", groups = {Created.class, Updated.class}) @ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtend.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtend.java index c146005c7b..eb70c44514 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtend.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtend.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -11,12 +11,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "用户扩展") -@TableName("user_extend") +@Table("user_extend") @Data public class UserExtend implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{user_extend.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKey.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKey.java index 4c4b561dcf..d6847f2bcf 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKey.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKey.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "用户api key") -@TableName("user_key") +@Table("user_key") @Data public class UserKey implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{user_key.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "user_key ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRole.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRole.java index 8a6b0204cf..e90f4d36b7 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRole.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRole.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "用户组") -@TableName("user_role") +@Table("user_role") @Data public class UserRole implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{user_role.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "组ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermission.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermission.java index 96ed7408db..738428ac1f 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermission.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermission.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "用户组权限") -@TableName("user_role_permission") +@Table("user_role_permission") @Data public class UserRolePermission implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{user_role_permission.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 64]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelation.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelation.java index 8f4ec11dc2..b09eda3531 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelation.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelation.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "用户组关系") -@TableName("user_role_relation") +@Table("user_role_relation") @Data public class UserRoleRelation implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{user_role_relation.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "用户组关系ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Workspace.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Workspace.java index fa0a8e73f7..d89c69126e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Workspace.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Workspace.java @@ -1,7 +1,7 @@ package io.metersphere.system.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -13,12 +13,12 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "工作空间") -@TableName("workspace") +@Table("workspace") @Data public class Workspace implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{workspace.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "工作空间ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommand.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommand.java index 0e58048908..4c2ae1b50c 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommand.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommand.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "自定义指令") -@TableName("ui_custom_command") +@Table("ui_custom_command") @Data public class UiCustomCommand implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_custom_command.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "场景ID", required = true, allowableValues="range[1, 255]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java index 252643dfe0..8fe651fc35 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "自定义指令大字段") -@TableName("ui_custom_command_blob") +@Table("ui_custom_command_blob") @Data @EqualsAndHashCode(callSuper=false) public class UiCustomCommandBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_custom_command_blob.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "场景ID", required = true, allowableValues="range[1, 255]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java index 381e252dc3..36d99513a2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "自定义指令模块") -@TableName("ui_custom_command_module") +@Table("ui_custom_command_module") @Data public class UiCustomCommandModule implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_custom_command_module.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "模块ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElement.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElement.java index 83fcc4b6b7..0e2a28249d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElement.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElement.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "元素") -@TableName("ui_element") +@Table("ui_element") @Data public class UiElement implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_element.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "元素id", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementModule.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementModule.java index cb17bc9474..bbfc506e31 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementModule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementModule.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "元素模块") -@TableName("ui_element_module") +@Table("ui_element_module") @Data public class UiElementModule implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_element_module.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "模块ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementReference.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementReference.java index 3744a1a9be..9527122830 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementReference.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementReference.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "元素关系表") -@TableName("ui_element_reference") +@Table("ui_element_reference") @Data public class UiElementReference implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_element_reference.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenario.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenario.java index a9e041f4f1..c7df5eacd4 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenario.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenario.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景") -@TableName("ui_scenario") +@Table("ui_scenario") @Data public class UiScenario implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_scenario.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "场景ID", required = true, allowableValues="range[1, 255]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioBlob.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioBlob.java index 1dda0b7a6e..79e76890f7 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioBlob.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -14,12 +14,12 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "场景大字段") -@TableName("ui_scenario_blob") +@Table("ui_scenario_blob") @Data @EqualsAndHashCode(callSuper=false) public class UiScenarioBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_scenario_blob.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "场景ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioExecutionInfo.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioExecutionInfo.java index 7ae92c95d7..fdc2fbbf64 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioExecutionInfo.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioExecutionInfo.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "执行步骤基础信息(待讨论)") -@TableName("ui_scenario_execution_info") +@Table("ui_scenario_execution_info") @Data public class UiScenarioExecutionInfo implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_scenario_execution_info.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioModule.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioModule.java index 26854cda4a..e990e0853b 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioModule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioModule.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景模块") -@TableName("ui_scenario_module") +@Table("ui_scenario_module") @Data public class UiScenarioModule implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_scenario_module.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "模块ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReference.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReference.java index da8fad0b89..1437d04713 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReference.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReference.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景引用关系") -@TableName("ui_scenario_reference") +@Table("ui_scenario_reference") @Data public class UiScenarioReference implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_scenario_reference.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReport.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReport.java index 531d01c1ce..2eb3fd07d8 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReport.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReport.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "场景报告") -@TableName("ui_scenario_report") +@Table("ui_scenario_report") @Data public class UiScenarioReport implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_scenario_report.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "报告ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportBlob.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportBlob.java index f5d2cbebd1..72e55d0944 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportBlob.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -12,12 +12,12 @@ import lombok.EqualsAndHashCode; import java.io.Serializable; @ApiModel(value = "场景报告大字段") -@TableName("ui_scenario_report_blob") +@Table("ui_scenario_report_blob") @Data @EqualsAndHashCode(callSuper=false) public class UiScenarioReportBlob implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_scenario_report_blob.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportResult.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportResult.java index c47aa00778..8f226fb968 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportResult.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportResult.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "报告结果") -@TableName("ui_scenario_report_result") +@Table("ui_scenario_report_result") @Data public class UiScenarioReportResult implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_scenario_report_result.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportStructure.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportStructure.java index 1e26b559d7..e1fadc0a14 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportStructure.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportStructure.java @@ -1,7 +1,7 @@ package io.metersphere.ui.domain; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.annotations.ApiModel; @@ -12,11 +12,11 @@ import lombok.Data; import java.io.Serializable; @ApiModel(value = "报告结构") -@TableName("ui_scenario_report_structure") +@Table("ui_scenario_report_structure") @Data public class UiScenarioReportStructure implements Serializable { private static final long serialVersionUID = 1L; - @TableId + @Id @NotBlank(message = "{ui_scenario_report_structure.id.not_blank}", groups = {Updated.class}) @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") private String id; diff --git a/backend/framework/sdk/pom.xml b/backend/framework/sdk/pom.xml index 2d9ddd0920..3c05227317 100644 --- a/backend/framework/sdk/pom.xml +++ b/backend/framework/sdk/pom.xml @@ -113,6 +113,10 @@ org.springframework.boot spring-boot-starter-rsocket + + org.springframework.data + spring-data-jdbc + @@ -120,11 +124,6 @@ mybatis-spring-boot-starter ${mybatis-starter.version} - - com.baomidou - mybatis-plus-boot-starter - ${mybatis-plus-starter.version} - com.mysql mysql-connector-j diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/MybatisConfig.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/MybatisConfig.java index f3fb3b6d9b..ed4c44c694 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/MybatisConfig.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/MybatisConfig.java @@ -17,6 +17,7 @@ import org.springframework.boot.jdbc.DataSourceBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; +import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; import javax.sql.DataSource; @@ -26,6 +27,7 @@ import java.util.Properties; @Configuration @MapperScan(basePackages = {"io.metersphere.*.mapper"}, sqlSessionFactoryRef = "sqlSessionFactory") +@EnableJdbcRepositories(basePackages = {"io.metersphere.*.repository"}) @EnableTransactionManagement public class MybatisConfig { @Bean diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserExtendMapper.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserExtendMapper.java deleted file mode 100644 index 60380b474f..0000000000 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserExtendMapper.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.metersphere.sdk.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import io.metersphere.system.domain.UserExtend; - -public interface UserExtendMapper extends BaseMapper { -} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserMapper.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserMapper.java index 5f06319f6f..aaa6c1e696 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserMapper.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserMapper.java @@ -1,9 +1,7 @@ package io.metersphere.sdk.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import io.metersphere.sdk.dto.UserDTO; -import io.metersphere.system.domain.User; -public interface UserMapper extends BaseMapper { +public interface UserMapper { UserDTO selectById(String id); } diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserService.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserService.java index 0932b5ab48..19ac667172 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserService.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/service/BaseUserService.java @@ -1,11 +1,8 @@ package io.metersphere.sdk.service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.system.domain.User; -import io.metersphere.sdk.mapper.UserMapper; import org.springframework.stereotype.Service; @Service -public class BaseUserService extends ServiceImpl { +public class BaseUserService { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.java index c056df6aa2..32f45fc940 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.java @@ -1,11 +1,9 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.CaseReviewFollow; @Mapper -public interface CaseReviewFollowMapper extends BaseMapper { +public interface CaseReviewFollowMapper { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseMapper.java index f6aa0c6ed6..77a54ceade 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseMapper.java @@ -1,11 +1,9 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.CaseReviewFunctionalCase; @Mapper -public interface CaseReviewFunctionalCaseMapper extends BaseMapper { +public interface CaseReviewFunctionalCaseMapper { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseUserMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseUserMapper.java index 13d6a9df4d..4d76d7bf62 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseUserMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseUserMapper.java @@ -1,11 +1,9 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.CaseReviewFunctionalCaseUser; @Mapper -public interface CaseReviewFunctionalCaseUserMapper extends BaseMapper { +public interface CaseReviewFunctionalCaseUserMapper { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.java index 8376b10668..bcb63c7364 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.java @@ -1,11 +1,9 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.CaseReview; @Mapper -public interface CaseReviewMapper extends BaseMapper { +public interface CaseReviewMapper { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewUserMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewUserMapper.java index 7cab0a7201..2f489a798f 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewUserMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CaseReviewUserMapper.java @@ -1,11 +1,9 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.CaseReviewUser; @Mapper -public interface CaseReviewUserMapper extends BaseMapper { +public interface CaseReviewUserMapper { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.java index 7b1d8ac037..6f4ef3c7d8 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.java @@ -1,11 +1,9 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.CustomFieldTestCase; @Mapper -public interface CustomFieldTestCaseMapper extends BaseMapper { +public interface CustomFieldTestCaseMapper { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseAttachmentMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseAttachmentMapper.java index f607d5ebd1..49b81ee503 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseAttachmentMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseAttachmentMapper.java @@ -1,17 +1,15 @@ /** * @filename:FunctionalCaseAttachmentDao 2023年5月17日 * @project ms V3.x - * Copyright(c) 2020 wx Co. Ltd. - * All right reserved. + * Copyright(c) 2020 wx Co. Ltd. + * All right reserved. */ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.FunctionalCaseAttachment; @Mapper -public interface FunctionalCaseAttachmentMapper extends BaseMapper { - +public interface FunctionalCaseAttachmentMapper { + } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseBlobMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseBlobMapper.java index 8cb7bb224f..1a0e47664a 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseBlobMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseBlobMapper.java @@ -1,17 +1,15 @@ /** * @filename:FunctionalCaseBlobDao 2023年5月17日 * @project ms V3.x - * Copyright(c) 2020 wx Co. Ltd. - * All right reserved. + * Copyright(c) 2020 wx Co. Ltd. + * All right reserved. */ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import io.metersphere.functional.domain.FunctionalCaseBlob; import org.apache.ibatis.annotations.Mapper; @Mapper -public interface FunctionalCaseBlobMapper extends BaseMapper { - +public interface FunctionalCaseBlobMapper { + } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCommentMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCommentMapper.java index 6716dd3b29..cddb986c57 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCommentMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCommentMapper.java @@ -1,9 +1,7 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import io.metersphere.functional.domain.FunctionalCaseComment; import org.apache.ibatis.annotations.Mapper; @Mapper -public interface FunctionalCaseCommentMapper extends BaseMapper { +public interface FunctionalCaseCommentMapper { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.java index bfc6eb98e9..aa57f1b6e1 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.java @@ -1,17 +1,15 @@ /** * @filename:FunctionalCaseFollowDao 2023年5月17日 * @project ms V3.x - * Copyright(c) 2020 wx Co. Ltd. - * All right reserved. + * Copyright(c) 2020 wx Co. Ltd. + * All right reserved. */ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.FunctionalCaseFollow; @Mapper -public interface FunctionalCaseFollowMapper extends BaseMapper { - +public interface FunctionalCaseFollowMapper { + } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseMapper.java index 64afc463bb..f9676d1c05 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseMapper.java @@ -1,9 +1,7 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import io.metersphere.functional.domain.FunctionalCase; import org.apache.ibatis.annotations.Mapper; @Mapper -public interface FunctionalCaseMapper extends BaseMapper { +public interface FunctionalCaseMapper { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseModuleMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseModuleMapper.java index da05a0a783..bd960ad8e8 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseModuleMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseModuleMapper.java @@ -1,17 +1,15 @@ /** * @filename:FunctionalCaseModuleDao 2023年5月17日 * @project ms V3.x - * Copyright(c) 2020 wx Co. Ltd. - * All right reserved. + * Copyright(c) 2020 wx Co. Ltd. + * All right reserved. */ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.FunctionalCaseModule; @Mapper -public interface FunctionalCaseModuleMapper extends BaseMapper { - +public interface FunctionalCaseModuleMapper { + } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseRelationshipEdgeMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseRelationshipEdgeMapper.java index 0ccdc0ac88..ff9d31fc51 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseRelationshipEdgeMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseRelationshipEdgeMapper.java @@ -6,12 +6,10 @@ */ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.FunctionalCaseRelationshipEdge; @Mapper -public interface FunctionalCaseRelationshipEdgeMapper extends BaseMapper { +public interface FunctionalCaseRelationshipEdgeMapper { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseTestMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseTestMapper.java index 3e14303f34..aeb3a4ac81 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseTestMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/FunctionalCaseTestMapper.java @@ -1,11 +1,9 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.FunctionalCaseTest; @Mapper -public interface FunctionalCaseTestMapper extends BaseMapper { - +public interface FunctionalCaseTestMapper { + } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.java index 6ca96cd347..92155780f6 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.java @@ -1,11 +1,9 @@ package io.metersphere.functional.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; -import io.metersphere.functional.domain.MinderExtraNode; @Mapper -public interface MinderExtraNodeMapper extends BaseMapper { - +public interface MinderExtraNodeMapper { + } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFollowService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFollowService.java index c47d6ba4d8..d4823b5d17 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFollowService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFollowService.java @@ -2,9 +2,6 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.CaseReviewFollow; -import io.metersphere.functional.mapper.CaseReviewFollowMapper; /** * 用例评审关注人表服务实现类 @@ -12,6 +9,6 @@ import io.metersphere.functional.mapper.CaseReviewFollowMapper; * @date : 2023-5-17 */ @Service -public class CaseReviewFollowService extends ServiceImpl { +public class CaseReviewFollowService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java index 34ce968e7d..113c8b7b0a 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseService.java @@ -2,9 +2,6 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.CaseReviewFunctionalCase; -import io.metersphere.functional.mapper.CaseReviewFunctionalCaseMapper; /** * 用例评审和功能用例的中间表服务实现类 @@ -12,6 +9,6 @@ import io.metersphere.functional.mapper.CaseReviewFunctionalCaseMapper; * @date : 2023-5-17 */ @Service -public class CaseReviewFunctionalCaseService extends ServiceImpl { +public class CaseReviewFunctionalCaseService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseUserService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseUserService.java index 520726e8ba..e5780cc201 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseUserService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewFunctionalCaseUserService.java @@ -2,9 +2,6 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.CaseReviewFunctionalCaseUser; -import io.metersphere.functional.mapper.CaseReviewFunctionalCaseUserMapper; /** * 功能用例评审和评审人的中间表服务实现类 @@ -12,6 +9,6 @@ import io.metersphere.functional.mapper.CaseReviewFunctionalCaseUserMapper; * @date : 2023-5-17 */ @Service -public class CaseReviewFunctionalCaseUserService extends ServiceImpl { +public class CaseReviewFunctionalCaseUserService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewService.java index d6c776d2de..70f290380b 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewService.java @@ -2,9 +2,6 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.CaseReview; -import io.metersphere.functional.mapper.CaseReviewMapper; /** * 用例评审表服务实现类 @@ -12,6 +9,6 @@ import io.metersphere.functional.mapper.CaseReviewMapper; * @date : 2023-5-17 */ @Service -public class CaseReviewService extends ServiceImpl { +public class CaseReviewService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewUserService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewUserService.java index b344129f83..95c6e6fe83 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewUserService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CaseReviewUserService.java @@ -2,9 +2,6 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.CaseReviewUser; -import io.metersphere.functional.mapper.CaseReviewUserMapper; /** * 评审和评审人中间表服务实现类 @@ -12,6 +9,6 @@ import io.metersphere.functional.mapper.CaseReviewUserMapper; * @date : 2023-5-17 */ @Service -public class CaseReviewUserService extends ServiceImpl { +public class CaseReviewUserService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CustomFieldTestCaseService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CustomFieldTestCaseService.java index 3d3d4a99a5..b62c2cd020 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CustomFieldTestCaseService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/CustomFieldTestCaseService.java @@ -2,9 +2,6 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.CustomFieldTestCase; -import io.metersphere.functional.mapper.CustomFieldTestCaseMapper; /** * 自定义字段功能用例关系表服务实现类 @@ -12,6 +9,6 @@ import io.metersphere.functional.mapper.CustomFieldTestCaseMapper; * @date : 2023-5-17 */ @Service -public class CustomFieldTestCaseService extends ServiceImpl { +public class CustomFieldTestCaseService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java index a1dfae4de7..7ec7c58602 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseAttachmentService.java @@ -2,12 +2,9 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.FunctionalCaseAttachment; -import io.metersphere.functional.mapper.FunctionalCaseAttachmentMapper; @Service -public class FunctionalCaseAttachmentService extends ServiceImpl { +public class FunctionalCaseAttachmentService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseBlobService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseBlobService.java index 2ad5ef2b14..83e0802eba 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseBlobService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseBlobService.java @@ -7,13 +7,10 @@ package io.metersphere.functional.service; -import io.metersphere.functional.domain.FunctionalCaseBlob; -import io.metersphere.functional.mapper.FunctionalCaseBlobMapper; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @Service -public class FunctionalCaseBlobService extends ServiceImpl { +public class FunctionalCaseBlobService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseCommentService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseCommentService.java index 52b3d75f2a..174fa1a7b3 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseCommentService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseCommentService.java @@ -1,10 +1,7 @@ package io.metersphere.functional.service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.FunctionalCaseComment; -import io.metersphere.functional.mapper.FunctionalCaseCommentMapper; import org.springframework.stereotype.Service; @Service -public class FunctionalCaseCommentService extends ServiceImpl { +public class FunctionalCaseCommentService { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseFollowService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseFollowService.java index 4e6affd2b8..b913fc71ec 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseFollowService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseFollowService.java @@ -8,12 +8,9 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.FunctionalCaseFollow; -import io.metersphere.functional.mapper.FunctionalCaseFollowMapper; @Service -public class FunctionalCaseFollowService extends ServiceImpl { +public class FunctionalCaseFollowService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java index 1f64b9dd06..cac9bd496a 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseModuleService.java @@ -7,13 +7,10 @@ package io.metersphere.functional.service; -import io.metersphere.functional.mapper.FunctionalCaseModuleMapper; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.FunctionalCaseModule; @Service -public class FunctionalCaseModuleService extends ServiceImpl { +public class FunctionalCaseModuleService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseRelationshipEdgeService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseRelationshipEdgeService.java index 72d393975a..67aa02ca6b 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseRelationshipEdgeService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseRelationshipEdgeService.java @@ -8,12 +8,9 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.FunctionalCaseRelationshipEdge; -import io.metersphere.functional.mapper.FunctionalCaseRelationshipEdgeMapper; @Service -public class FunctionalCaseRelationshipEdgeService extends ServiceImpl { +public class FunctionalCaseRelationshipEdgeService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java index 0a12bdde44..83143af84b 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseService.java @@ -1,10 +1,7 @@ package io.metersphere.functional.service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.FunctionalCase; -import io.metersphere.functional.mapper.FunctionalCaseMapper; import org.springframework.stereotype.Service; @Service -public class FunctionalCaseService extends ServiceImpl { +public class FunctionalCaseService { } diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseTestService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseTestService.java index d22c41afa7..a0a3768f11 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseTestService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/FunctionalCaseTestService.java @@ -2,9 +2,6 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.FunctionalCaseTest; -import io.metersphere.functional.mapper.FunctionalCaseTestMapper; /** @@ -13,6 +10,6 @@ import io.metersphere.functional.mapper.FunctionalCaseTestMapper; * @date : 2023-5-17 */ @Service -public class FunctionalCaseTestService extends ServiceImpl { +public class FunctionalCaseTestService { } \ No newline at end of file diff --git a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/MinderExtraNodeService.java b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/MinderExtraNodeService.java index feaceaa6c0..badc224200 100644 --- a/backend/services/functional-test/src/main/java/io/metersphere/functional/service/MinderExtraNodeService.java +++ b/backend/services/functional-test/src/main/java/io/metersphere/functional/service/MinderExtraNodeService.java @@ -2,9 +2,6 @@ package io.metersphere.functional.service; import org.springframework.stereotype.Service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import io.metersphere.functional.domain.MinderExtraNode; -import io.metersphere.functional.mapper.MinderExtraNodeMapper; /** * 脑图临时节点服务实现类 @@ -12,6 +9,6 @@ import io.metersphere.functional.mapper.MinderExtraNodeMapper; * @date : 2023-5-17 */ @Service -public class MinderExtraNodeService extends ServiceImpl { +public class MinderExtraNodeService { } \ No newline at end of file diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java new file mode 100644 index 0000000000..16357a0da9 --- /dev/null +++ b/backend/services/project-management/src/main/java/io/metersphere/project/controller/ProjectApplicationController.java @@ -0,0 +1,36 @@ +package io.metersphere.project.controller; + +import io.metersphere.project.domain.ProjectApplication; +import io.metersphere.project.service.ProjectApplicationService; +import io.metersphere.validation.groups.Created; +import io.metersphere.validation.groups.Updated; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@RestController +@RequestMapping("project/application") +public class ProjectApplicationController { + @Resource + private ProjectApplicationService projectApplicationService; + + @PostMapping("save") + public ProjectApplication save(@Validated({Created.class}) @RequestBody ProjectApplication application) { + return projectApplicationService.save(application); + } + + /** + * 更新 + */ + @PostMapping("update") + public ProjectApplication update(@Validated({Updated.class}) @RequestBody ProjectApplication application) { + return projectApplicationService.update(application); + } + + @GetMapping("list/{projectId}") + public List update(@PathVariable String projectId) { + return projectApplicationService.list(projectId); + } +} diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.java b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.java new file mode 100644 index 0000000000..ce39ab5967 --- /dev/null +++ b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.java @@ -0,0 +1,11 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.ProjectApplication; +import org.apache.ibatis.annotations.Param; + +public interface ProjectApplicationMapper { + + void update(@Param("application") ProjectApplication application); + + void insert(@Param("application") ProjectApplication application); +} diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.xml b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.xml new file mode 100644 index 0000000000..d98dec7cdd --- /dev/null +++ b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.xml @@ -0,0 +1,18 @@ + + + + + + UPDATE project_application + SET type_value = #{application.typeValue,jdbcType=VARCHAR} + WHERE project_id = #{application.projectId,jdbcType=VARCHAR} + AND type = #{application.type,jdbcType=VARCHAR} + + + + INSERT INTO project_application (project_id, type, type_value) + VALUES (#{application.projectId,jdbcType=VARCHAR}, + #{application.type,jdbcType=VARCHAR}, + #{application.typeValue,jdbcType=VARCHAR}) + + \ No newline at end of file diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectMapper.java b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectMapper.java deleted file mode 100644 index 61c490c9ae..0000000000 --- a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectMapper.java +++ /dev/null @@ -1,7 +0,0 @@ -package io.metersphere.project.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import io.metersphere.project.domain.Project; - -public interface ProjectMapper extends BaseMapper { -} diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectApplicationService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectApplicationService.java new file mode 100644 index 0000000000..fe6ce54d45 --- /dev/null +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectApplicationService.java @@ -0,0 +1,39 @@ +package io.metersphere.project.service; + +import io.metersphere.project.domain.ProjectApplication; +import io.metersphere.project.mapper.ProjectApplicationMapper; +import jakarta.annotation.Resource; +import org.apache.commons.collections4.IterableUtils; +import org.springframework.data.jdbc.core.JdbcAggregateTemplate; +import org.springframework.data.relational.core.query.Criteria; +import org.springframework.data.relational.core.query.Query; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +@Service +@Transactional +public class ProjectApplicationService { + @Resource + private JdbcAggregateTemplate jdbcAggregateTemplate; + @Resource + private ProjectApplicationMapper projectApplicationMapper; + + public ProjectApplication save(ProjectApplication application) { + projectApplicationMapper.insert(application); + return application; + } + + public ProjectApplication update(ProjectApplication application) { + projectApplicationMapper.update(application); + return application; + } + + public List list(String projectId) { + Query query = Query.query(Criteria.where("project_id").is(projectId)); + + Iterable all = jdbcAggregateTemplate.findAll(query, ProjectApplication.class); + return IterableUtils.toList(all); + } +} diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectService.java index e61de515ba..6d1e130a72 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/ProjectService.java @@ -1,13 +1,21 @@ package io.metersphere.project.service; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import io.metersphere.project.domain.Project; -import io.metersphere.project.mapper.ProjectMapper; +import jakarta.annotation.Resource; +import org.springframework.data.jdbc.core.JdbcAggregateTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.List; + @Service @Transactional(rollbackFor = Exception.class) -public class ProjectService extends ServiceImpl { +public class ProjectService { + @Resource + private JdbcAggregateTemplate jdbcAggregateTemplate; + public List list() { + jdbcAggregateTemplate.findAll(Project.class); + return null; + } } diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/Application.java b/backend/services/project-management/src/test/java/io/metersphere/project/Application.java index 5ce0817730..97f4f0477c 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/Application.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/Application.java @@ -1,6 +1,5 @@ package io.metersphere.project; -import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; @@ -12,8 +11,7 @@ import org.springframework.context.annotation.ComponentScan; @SpringBootApplication(exclude = { QuartzAutoConfiguration.class, LdapAutoConfiguration.class, - Neo4jAutoConfiguration.class, - MybatisAutoConfiguration.class + Neo4jAutoConfiguration.class }) @ServletComponentScan @ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.project"}) diff --git a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java index 94d6f4839f..f0708c18ff 100644 --- a/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java +++ b/backend/services/project-management/src/test/java/io/metersphere/project/controller/ProjectApplicationControllerTests.java @@ -1,8 +1,12 @@ package io.metersphere.project.controller; -import io.metersphere.sdk.util.LogUtils; +import io.metersphere.project.domain.ProjectApplication; +import io.metersphere.sdk.util.JSON; import jakarta.annotation.Resource; +import org.junit.jupiter.api.MethodOrderer; +import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestMethodOrder; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; @@ -10,32 +14,54 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; @SpringBootTest +@TestMethodOrder(MethodOrderer.OrderAnnotation.class) @AutoConfigureMockMvc public class ProjectApplicationControllerTests { @Resource private MockMvc mockMvc; @Test - public void testSelectAll() throws Exception { - LogUtils.info("testSelectAll"); - mockMvc.perform(MockMvcRequestBuilders.get("/project/list-all")) + @Order(1) + public void testAddApp() throws Exception { + ProjectApplication projectApplication = new ProjectApplication(); + projectApplication.setProjectId("1"); + projectApplication.setType("1"); + projectApplication.setTypeValue("1"); + mockMvc.perform(MockMvcRequestBuilders.post("/project/application/save") + .content(JSON.toJSONString(projectApplication)) + .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON)) -// .andExpect(jsonPath("$.person.name").value("Jason")) - .andDo(print()); + .andExpect(jsonPath("$.data.typeValue").value("1")); } @Test - public void testSelectAll2() throws Exception { - mockMvc.perform(MockMvcRequestBuilders.get("/project/list-all")) + @Order(2) + public void testUpdateApp() throws Exception { + ProjectApplication projectApplication = new ProjectApplication(); + projectApplication.setProjectId("1"); + projectApplication.setType("1"); + projectApplication.setTypeValue("2"); + mockMvc.perform(MockMvcRequestBuilders.post("/project/application/update") + .content(JSON.toJSONString(projectApplication)) + .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON)) -// .andExpect(jsonPath("$.person.name").value("Jason")) + .andExpect(jsonPath("$.data.typeValue").value("2")); + } + + @Test + @Order(3) + public void testListApp() throws Exception { + mockMvc.perform(MockMvcRequestBuilders.get("/project/application/list/1")) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON)) + .andExpect(jsonPath("$.data[0].typeValue").value("2")) .andDo(print()); } + } diff --git a/backend/services/project-management/src/test/resources/application.properties b/backend/services/project-management/src/test/resources/application.properties index 58e54496c3..978326d18b 100644 --- a/backend/services/project-management/src/test/resources/application.properties +++ b/backend/services/project-management/src/test/resources/application.properties @@ -76,4 +76,8 @@ spring.groovy.template.check-template-location=false # minio.endpoint=http://${embedded.minio.host}:${embedded.minio.port} minio.access-key=${embedded.minio.accessKey} -minio.secret-key=${embedded.minio.secretKey} \ No newline at end of file +minio.secret-key=${embedded.minio.secretKey} + +logging.level.org.springframework.jdbc.core=trace +logging.level.io.metersphere.sdk.mapper=debug +logging.level.io.metersphere.project.mapper=debug \ No newline at end of file diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/UserController.java b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/UserController.java index a1be6303b7..256bcd6fa1 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/controller/UserController.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/controller/UserController.java @@ -1,8 +1,8 @@ package io.metersphere.system.controller; -import io.metersphere.system.domain.User; import io.metersphere.sdk.dto.UserDTO; +import io.metersphere.system.domain.User; import io.metersphere.system.service.UserService; import io.metersphere.validation.groups.Created; import jakarta.annotation.Resource; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserService.java index 1e3b4681c1..16c4f640a3 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/UserService.java @@ -1,13 +1,15 @@ package io.metersphere.system.service; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import io.metersphere.sdk.mapper.UserExtendMapper; +import io.metersphere.sdk.dto.UserDTO; import io.metersphere.sdk.mapper.UserMapper; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.system.domain.User; import io.metersphere.system.domain.UserExtend; -import io.metersphere.sdk.dto.UserDTO; import jakarta.annotation.Resource; +import org.apache.commons.collections4.IterableUtils; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.jdbc.core.JdbcAggregateTemplate; +import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -19,14 +21,18 @@ public class UserService { @Resource private UserMapper userMapper; @Resource - private UserExtendMapper userExtendMapper; + private JdbcAggregateTemplate jdbcAggregateTemplate; + @Resource + private JdbcTemplate jdbcTemplate; public boolean save(UserDTO entity) { - userMapper.insert(entity); + User user = new User(); + BeanUtils.copyBean(user, entity); + jdbcAggregateTemplate.insert(user); UserExtend userExtend = new UserExtend(); BeanUtils.copyBean(userExtend, entity); - userExtendMapper.insert(userExtend); + jdbcAggregateTemplate.insert(userExtend); return true; } @@ -35,7 +41,9 @@ public class UserService { } public List list() { - QueryWrapper userQueryWrapper = new QueryWrapper<>(new User()); - return userMapper.selectList(userQueryWrapper); + + PageRequest pageable = PageRequest.of(2, 5); + Iterable users = jdbcAggregateTemplate.findAll(User.class, pageable); + return IterableUtils.toList(users); } } diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/Application.java b/backend/services/system-setting/src/test/java/io/metersphere/system/Application.java index fe637012f5..03d3a93dae 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/Application.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/Application.java @@ -1,6 +1,5 @@ package io.metersphere.system; -import org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.ldap.LdapAutoConfiguration; @@ -12,8 +11,7 @@ import org.springframework.context.annotation.ComponentScan; @SpringBootApplication(exclude = { QuartzAutoConfiguration.class, LdapAutoConfiguration.class, - Neo4jAutoConfiguration.class, - MybatisAutoConfiguration.class + Neo4jAutoConfiguration.class }) @ServletComponentScan @ComponentScan(basePackages = {"io.metersphere.sdk", "io.metersphere.system"}) diff --git a/backend/services/system-setting/src/test/resources/application.properties b/backend/services/system-setting/src/test/resources/application.properties index 58e54496c3..1b9a09bfff 100644 --- a/backend/services/system-setting/src/test/resources/application.properties +++ b/backend/services/system-setting/src/test/resources/application.properties @@ -76,4 +76,8 @@ spring.groovy.template.check-template-location=false # minio.endpoint=http://${embedded.minio.host}:${embedded.minio.port} minio.access-key=${embedded.minio.accessKey} -minio.secret-key=${embedded.minio.secretKey} \ No newline at end of file +minio.secret-key=${embedded.minio.secretKey} + +logging.level.org.springframework.jdbc.core=debug +logging.level.io.metersphere.sdk.mapper=debug +logging.level.io.metersphere.system.mapper=debug \ No newline at end of file