From 7c43e7540ee34cc17bd1f8108c0a51157ae748b6 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 25 May 2023 16:07:44 +0800 Subject: [PATCH] build: swagger --- backend/framework/domain/pom.xml | 52 +- .../metersphere/api/domain/ApiDefinition.java | 61 +- .../api/domain/ApiDefinitionBlob.java | 20 +- .../api/domain/ApiDefinitionFollow.java | 10 +- .../api/domain/ApiDefinitionMock.java | 36 +- .../api/domain/ApiDefinitionMockConfig.java | 18 +- .../api/domain/ApiDefinitionModule.java | 32 +- .../api/domain/ApiDefinitionSwagger.java | 26 +- .../api/domain/ApiEnvironmentConfig.java | 20 +- .../api/domain/ApiFakeErrorConfig.java | 32 +- .../io/metersphere/api/domain/ApiReport.java | 46 +- .../metersphere/api/domain/ApiReportBlob.java | 20 +- .../metersphere/api/domain/ApiScenario.java | 66 +- .../api/domain/ApiScenarioBlob.java | 16 +- .../api/domain/ApiScenarioEnvironment.java | 20 +- .../api/domain/ApiScenarioFollow.java | 10 +- .../api/domain/ApiScenarioModule.java | 30 +- .../api/domain/ApiScenarioReference.java | 24 +- .../api/domain/ApiScenarioReport.java | 46 +- .../api/domain/ApiScenarioReportDetail.java | 42 +- .../api/domain/ApiScenarioReportLog.java | 14 +- .../domain/ApiScenarioReportStructure.java | 14 +- .../metersphere/api/domain/ApiSyncConfig.java | 28 +- .../metersphere/api/domain/ApiTestCase.java | 56 +- .../api/domain/ApiTestCaseBlob.java | 16 +- .../api/domain/ApiTestCaseFollow.java | 10 +- .../functional/domain/CaseReview.java | 31 +- .../functional/domain/CaseReviewFollow.java | 13 +- .../domain/CaseReviewFunctionalCase.java | 27 +- .../domain/CaseReviewFunctionalCaseUser.java | 11 +- .../functional/domain/CaseReviewUser.java | 13 +- .../domain/CustomFieldTestCase.java | 13 +- .../functional/domain/FunctionalCase.java | 51 +- .../domain/FunctionalCaseAttachment.java | 9 +- .../functional/domain/FunctionalCaseBlob.java | 16 +- .../domain/FunctionalCaseComment.java | 31 +- .../domain/FunctionalCaseFollow.java | 9 +- .../domain/FunctionalCaseModule.java | 31 +- .../FunctionalCaseRelationshipEdge.java | 23 +- .../functional/domain/FunctionalCaseTest.java | 21 +- .../functional/domain/MinderExtraNode.java | 32 +- .../io/metersphere/load/domain/LoadTest.java | 70 +- .../metersphere/load/domain/LoadTestApi.java | 62 +- .../load/domain/LoadTestApiExample.java | 610 +++++++ .../metersphere/load/domain/LoadTestBlob.java | 28 +- .../load/domain/LoadTestBlobExample.java | 270 +++ .../load/domain/LoadTestExample.java | 1130 ++++++++++++ .../metersphere/load/domain/LoadTestFile.java | 25 +- .../load/domain/LoadTestFileExample.java | 400 +++++ .../load/domain/LoadTestFollow.java | 20 +- .../load/domain/LoadTestFollowExample.java | 340 ++++ .../load/domain/LoadTestReport.java | 178 +- .../load/domain/LoadTestReportBlob.java | 33 +- .../domain/LoadTestReportBlobExample.java | 270 +++ .../load/domain/LoadTestReportExample.java | 1550 +++++++++++++++++ .../load/domain/LoadTestReportFile.java | 35 +- .../domain/LoadTestReportFileExample.java | 400 +++++ .../load/domain/LoadTestReportLog.java | 52 +- .../load/domain/LoadTestReportLogExample.java | 470 +++++ .../load/domain/LoadTestReportResult.java | 29 +- .../domain/LoadTestReportResultExample.java | 410 +++++ .../load/domain/LoadTestReportResultPart.java | 26 +- .../LoadTestReportResultPartExample.java | 400 +++++ .../domain/LoadTestReportResultRealtime.java | 33 +- .../LoadTestReportResultRealtimeExample.java | 460 +++++ .../load/mapper/LoadTestApiMapper.java | 30 + .../load/mapper/LoadTestApiMapper.xml | 228 +++ .../load/mapper/LoadTestBlobMapper.java | 34 + .../load/mapper/LoadTestBlobMapper.xml | 228 +++ .../load/mapper/LoadTestFileMapper.java | 22 + .../load/mapper/LoadTestFileMapper.xml | 153 ++ .../load/mapper/LoadTestFollowMapper.java | 22 + .../load/mapper/LoadTestFollowMapper.xml | 140 ++ .../load/mapper/LoadTestMapper.java | 30 + .../load/mapper/LoadTestMapper.xml | 353 ++++ .../load/mapper/LoadTestReportBlobMapper.java | 34 + .../load/mapper/LoadTestReportBlobMapper.xml | 243 +++ .../load/mapper/LoadTestReportFileMapper.java | 22 + .../load/mapper/LoadTestReportFileMapper.xml | 153 ++ .../load/mapper/LoadTestReportLogMapper.java | 36 + .../load/mapper/LoadTestReportLogMapper.xml | 251 +++ .../load/mapper/LoadTestReportMapper.java | 30 + .../load/mapper/LoadTestReportMapper.xml | 448 +++++ .../mapper/LoadTestReportResultMapper.java | 36 + .../mapper/LoadTestReportResultMapper.xml | 234 +++ .../LoadTestReportResultPartMapper.java | 34 + .../mapper/LoadTestReportResultPartMapper.xml | 228 +++ .../LoadTestReportResultRealtimeMapper.java | 34 + .../LoadTestReportResultRealtimeMapper.xml | 244 +++ .../io/metersphere/plan/domain/TestPlan.java | 37 +- .../plan/domain/TestPlanApiCase.java | 23 +- .../plan/domain/TestPlanApiScenario.java | 23 +- .../plan/domain/TestPlanConfig.java | 15 +- .../plan/domain/TestPlanExecuteRecord.java | 27 +- .../domain/TestPlanExecuteRecordBlob.java | 17 +- .../plan/domain/TestPlanFollow.java | 9 +- .../plan/domain/TestPlanFunctionCase.java | 17 +- .../plan/domain/TestPlanLoadCase.java | 23 +- .../plan/domain/TestPlanPrincipal.java | 9 +- .../plan/domain/TestPlanReport.java | 29 +- .../plan/domain/TestPlanReportContent.java | 13 +- .../plan/domain/TestPlanUiScenario.java | 23 +- .../project/domain/ApiTemplate.java | 53 +- .../project/domain/ApiTemplateExample.java | 670 +++++++ .../project/domain/CustomField.java | 123 +- .../project/domain/CustomFieldExample.java | 990 +++++++++++ .../project/domain/CustomFieldTemplate.java | 89 +- .../domain/CustomFieldTemplateExample.java | 740 ++++++++ .../project/domain/CustomFunction.java | 53 +- .../project/domain/CustomFunctionBlob.java | 35 +- .../domain/CustomFunctionBlobExample.java | 270 +++ .../project/domain/CustomFunctionExample.java | 480 +++++ .../metersphere/project/domain/FakeError.java | 49 +- .../project/domain/FakeErrorBlob.java | 30 +- .../project/domain/FakeErrorBlobExample.java | 270 +++ .../project/domain/FakeErrorExample.java | 800 +++++++++ .../project/domain/FileMetadata.java | 75 +- .../project/domain/FileMetadataBlob.java | 27 +- .../domain/FileMetadataBlobExample.java | 270 +++ .../project/domain/FileMetadataExample.java | 1410 +++++++++++++++ .../project/domain/FileModule.java | 49 +- .../project/domain/FileModuleBlob.java | 36 +- .../project/domain/FileModuleBlobExample.java | 480 +++++ .../project/domain/FileModuleExample.java | 860 +++++++++ .../domain/FunctionalCaseTemplate.java | 75 +- .../domain/FunctionalCaseTemplateExample.java | 670 +++++++ .../domain/FunctionalCaseTemplateExtend.java | 60 +- .../FunctionalCaseTemplateExtendExample.java | 410 +++++ .../project/domain/IssueTemplate.java | 75 +- .../project/domain/IssueTemplateExample.java | 670 +++++++ .../project/domain/IssueTemplateExtend.java | 30 +- .../domain/IssueTemplateExtendExample.java | 340 ++++ .../metersphere/project/domain/Project.java | 43 +- .../project/domain/ProjectApplication.java | 27 +- .../domain/ProjectApplicationExample.java | 410 +++++ .../project/domain/ProjectExample.java | 740 ++++++++ .../project/domain/ProjectExtend.java | 58 +- .../project/domain/ProjectExtendExample.java | 950 ++++++++++ .../project/domain/ProjectVersion.java | 54 +- .../project/domain/ProjectVersionExample.java | 920 ++++++++++ .../project/mapper/ApiTemplateMapper.java | 30 + .../project/mapper/ApiTemplateMapper.xml | 243 +++ .../project/mapper/CustomFieldMapper.java | 36 + .../project/mapper/CustomFieldMapper.xml | 394 +++++ .../mapper/CustomFieldTemplateMapper.java | 36 + .../mapper/CustomFieldTemplateMapper.xml | 321 ++++ .../mapper/CustomFunctionBlobMapper.java | 34 + .../mapper/CustomFunctionBlobMapper.xml | 226 +++ .../project/mapper/CustomFunctionMapper.java | 30 + .../project/mapper/CustomFunctionMapper.xml | 196 +++ .../project/mapper/FakeErrorBlobMapper.java | 34 + .../project/mapper/FakeErrorBlobMapper.xml | 211 +++ .../project/mapper/FakeErrorMapper.java | 30 + .../project/mapper/FakeErrorMapper.xml | 276 +++ .../mapper/FileMetadataBlobMapper.java | 34 + .../project/mapper/FileMetadataBlobMapper.xml | 194 +++ .../project/mapper/FileMetadataMapper.java | 30 + .../project/mapper/FileMetadataMapper.xml | 418 +++++ .../project/mapper/FileModuleBlobMapper.java | 36 + .../project/mapper/FileModuleBlobMapper.xml | 251 +++ .../project/mapper/FileModuleMapper.java | 30 + .../project/mapper/FileModuleMapper.xml | 291 ++++ .../FunctionalCaseTemplateExtendMapper.java | 36 + .../FunctionalCaseTemplateExtendMapper.xml | 298 ++++ .../mapper/FunctionalCaseTemplateMapper.java | 30 + .../mapper/FunctionalCaseTemplateMapper.xml | 243 +++ .../mapper/IssueTemplateExtendMapper.java | 36 + .../mapper/IssueTemplateExtendMapper.xml | 217 +++ .../project/mapper/IssueTemplateMapper.java | 30 + .../project/mapper/IssueTemplateMapper.xml | 243 +++ .../mapper/ProjectApplicationMapper.java | 30 + .../mapper/ProjectApplicationMapper.xml | 181 ++ .../project/mapper/ProjectExtendMapper.java | 36 + .../project/mapper/ProjectExtendMapper.xml | 377 ++++ .../project/mapper/ProjectMapper.java | 30 + .../project/mapper/ProjectMapper.xml | 258 +++ .../project/mapper/ProjectVersionMapper.java | 30 + .../project/mapper/ProjectVersionMapper.xml | 306 ++++ .../metersphere/sdk/domain/Environment.java | 75 +- .../sdk/domain/EnvironmentExample.java | 870 +++++++++ .../sdk/domain/EnvironmentGroup.java | 40 +- .../sdk/domain/EnvironmentGroupExample.java | 670 +++++++ .../sdk/domain/EnvironmentGroupProject.java | 31 +- .../EnvironmentGroupProjectExample.java | 480 +++++ .../sdk/domain/ExecutionQueue.java | 40 +- .../sdk/domain/ExecutionQueueDetail.java | 54 +- .../domain/ExecutionQueueDetailExample.java | 860 +++++++++ .../sdk/domain/ExecutionQueueExample.java | 670 +++++++ .../sdk/domain/RelationshipEdge.java | 38 +- .../sdk/domain/RelationshipEdgeExample.java | 610 +++++++ .../io/metersphere/sdk/domain/ShareInfo.java | 42 +- .../sdk/domain/ShareInfoExample.java | 600 +++++++ .../sdk/mapper/EnvironmentGroupMapper.java | 30 + .../sdk/mapper/EnvironmentGroupMapper.xml | 243 +++ .../mapper/EnvironmentGroupProjectMapper.java | 30 + .../mapper/EnvironmentGroupProjectMapper.xml | 196 +++ .../sdk/mapper/EnvironmentMapper.java | 36 + .../sdk/mapper/EnvironmentMapper.xml | 405 +++++ .../mapper/ExecutionQueueDetailMapper.java | 36 + .../sdk/mapper/ExecutionQueueDetailMapper.xml | 358 ++++ .../sdk/mapper/ExecutionQueueMapper.java | 30 + .../sdk/mapper/ExecutionQueueMapper.xml | 243 +++ .../sdk/mapper/RelationshipEdgeMapper.java | 30 + .../sdk/mapper/RelationshipEdgeMapper.xml | 228 +++ .../sdk/mapper/ShareInfoMapper.java | 36 + .../sdk/mapper/ShareInfoMapper.xml | 287 +++ .../metersphere/system/domain/AuthSource.java | 46 +- .../system/domain/AuthSourceExample.java | 670 +++++++ .../io/metersphere/system/domain/License.java | 29 +- .../system/domain/LicenseExample.java | 390 +++++ .../system/domain/MessageTask.java | 50 +- .../system/domain/MessageTaskBlob.java | 27 +- .../system/domain/MessageTaskBlobExample.java | 270 +++ .../system/domain/MessageTaskExample.java | 820 +++++++++ .../system/domain/Notification.java | 59 +- .../system/domain/NotificationExample.java | 950 ++++++++++ .../system/domain/NoviceStatistics.java | 43 +- .../domain/NoviceStatisticsExample.java | 580 ++++++ .../system/domain/OperatingLog.java | 65 +- .../system/domain/OperatingLogExample.java | 960 ++++++++++ .../system/domain/OperatingLogResource.java | 39 +- .../domain/OperatingLogResourceExample.java | 410 +++++ .../io/metersphere/system/domain/Plugin.java | 66 +- .../metersphere/system/domain/PluginBlob.java | 28 +- .../system/domain/PluginBlobExample.java | 270 +++ .../system/domain/PluginExample.java | 1150 ++++++++++++ .../io/metersphere/system/domain/Quota.java | 64 +- .../system/domain/QuotaExample.java | 1081 ++++++++++++ .../metersphere/system/domain/Schedule.java | 60 +- .../system/domain/ScheduleExample.java | 1080 ++++++++++++ .../system/domain/ServiceIntegration.java | 34 +- .../domain/ServiceIntegrationExample.java | 410 +++++ .../system/domain/SystemParameter.java | 25 +- .../system/domain/SystemParameterExample.java | 410 +++++ .../system/domain/TestResource.java | 39 +- .../system/domain/TestResourceExample.java | 530 ++++++ .../system/domain/TestResourcePool.java | 59 +- .../domain/TestResourcePoolExample.java | 1070 ++++++++++++ .../io/metersphere/system/domain/User.java | 59 +- .../system/domain/UserExample.java | 1090 ++++++++++++ .../metersphere/system/domain/UserExtend.java | 32 +- .../system/domain/UserExtendExample.java | 340 ++++ .../io/metersphere/system/domain/UserKey.java | 38 +- .../system/domain/UserKeyExample.java | 610 +++++++ .../metersphere/system/domain/UserRole.java | 49 +- .../system/domain/UserRoleExample.java | 800 +++++++++ .../system/domain/UserRolePermission.java | 31 +- .../domain/UserRolePermissionExample.java | 480 +++++ .../system/domain/UserRoleRelation.java | 38 +- .../domain/UserRoleRelationExample.java | 600 +++++++ .../metersphere/system/domain/Workspace.java | 37 +- .../system/domain/WorkspaceExample.java | 600 +++++++ .../system/mapper/AuthSourceMapper.java | 36 + .../system/mapper/AuthSourceMapper.xml | 304 ++++ .../system/mapper/LicenseMapper.java | 36 + .../system/mapper/LicenseMapper.xml | 234 +++ .../system/mapper/MessageTaskBlobMapper.java | 34 + .../system/mapper/MessageTaskBlobMapper.xml | 194 +++ .../system/mapper/MessageTaskMapper.java | 30 + .../system/mapper/MessageTaskMapper.xml | 275 +++ .../system/mapper/NotificationMapper.java | 30 + .../system/mapper/NotificationMapper.xml | 306 ++++ .../system/mapper/NoviceStatisticsMapper.java | 36 + .../system/mapper/NoviceStatisticsMapper.xml | 287 +++ .../system/mapper/OperatingLogMapper.java | 36 + .../system/mapper/OperatingLogMapper.xml | 392 +++++ .../mapper/OperatingLogResourceMapper.java | 30 + .../mapper/OperatingLogResourceMapper.xml | 181 ++ .../system/mapper/PluginBlobMapper.java | 34 + .../system/mapper/PluginBlobMapper.xml | 211 +++ .../system/mapper/PluginMapper.java | 30 + .../system/mapper/PluginMapper.xml | 353 ++++ .../system/mapper/QuotaMapper.java | 30 + .../metersphere/system/mapper/QuotaMapper.xml | 353 ++++ .../system/mapper/ScheduleMapper.java | 30 + .../system/mapper/ScheduleMapper.xml | 338 ++++ .../mapper/ServiceIntegrationMapper.java | 36 + .../mapper/ServiceIntegrationMapper.xml | 234 +++ .../system/mapper/SystemParameterMapper.java | 30 + .../system/mapper/SystemParameterMapper.xml | 181 ++ .../system/mapper/TestResourceMapper.java | 36 + .../system/mapper/TestResourceMapper.xml | 270 +++ .../system/mapper/TestResourcePoolMapper.java | 30 + .../system/mapper/TestResourcePoolMapper.xml | 338 ++++ .../system/mapper/UserExtendMapper.java | 36 + .../system/mapper/UserExtendMapper.xml | 217 +++ .../system/mapper/UserKeyMapper.java | 30 + .../system/mapper/UserKeyMapper.xml | 228 +++ .../metersphere/system/mapper/UserMapper.java | 30 + .../metersphere/system/mapper/UserMapper.xml | 338 ++++ .../system/mapper/UserRoleMapper.java | 30 + .../system/mapper/UserRoleMapper.xml | 276 +++ .../mapper/UserRolePermissionMapper.java | 30 + .../mapper/UserRolePermissionMapper.xml | 196 +++ .../system/mapper/UserRoleRelationMapper.java | 30 + .../system/mapper/UserRoleRelationMapper.xml | 228 +++ .../system/mapper/WorkspaceMapper.java | 30 + .../system/mapper/WorkspaceMapper.xml | 228 +++ .../ui/domain/UiCustomCommand.java | 149 -- .../ui/domain/UiCustomCommandBlob.java | 44 - .../ui/domain/UiCustomCommandModule.java | 62 - .../io/metersphere/ui/domain/UiElement.java | 95 - .../ui/domain/UiElementModule.java | 62 - .../ui/domain/UiElementReference.java | 45 - .../io/metersphere/ui/domain/UiScenario.java | 145 -- .../metersphere/ui/domain/UiScenarioBlob.java | 40 - .../ui/domain/UiScenarioExecutionInfo.java | 43 - .../ui/domain/UiScenarioModule.java | 62 - .../ui/domain/UiScenarioReference.java | 49 - .../ui/domain/UiScenarioReport.java | 86 - .../ui/domain/UiScenarioReportBlob.java | 34 - .../ui/domain/UiScenarioReportResult.java | 64 - .../ui/domain/UiScenarioReportStructure.java | 42 - .../src/main/resources/generatorConfig.xml | 94 + backend/framework/sdk/pom.xml | 4 - .../metersphere/sdk/config/MybatisConfig.java | 2 - .../metersphere/sdk/config/OpenApiConfig.java | 32 + .../sdk/constants/SessionConstants.java | 15 + .../java/io/metersphere/sdk/dto/UserDTO.java | 6 +- .../{UserMapper.java => BaseUserMapper.java} | 2 +- .../{UserMapper.xml => BaseUserMapper.xml} | 2 +- .../mapper/ProjectApplicationMapper.java | 15 - .../mapper/ProjectApplicationMapper.xml | 22 - .../service/ProjectApplicationService.java | 15 +- .../project/service/ProjectService.java | 8 +- .../system/controller/UserController.java | 5 - .../system/service/UserService.java | 38 +- .../system/util/BatchSaveUtils.java | 48 - .../controller/UserControllerTests.java | 30 +- pom.xml | 2 +- 330 files changed, 59461 insertions(+), 3741 deletions(-) create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestApiExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestBlobExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFileExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportBlobExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportFileExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportLogExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultPartExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultRealtimeExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestApiMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestApiMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestBlobMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestBlobMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFileMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFileMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportBlobMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportBlobMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportFileMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportFileMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportLogMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportLogMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultPartMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultPartMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultRealtimeMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultRealtimeMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplateExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplateExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionBlobExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorBlobExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataBlobExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleBlobExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtendExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtendExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectApplicationExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExtendExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectVersionExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionBlobMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionBlobMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorBlobMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorBlobMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataBlobMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataBlobMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleBlobMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleBlobMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectExtendMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectExtendMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectVersionMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectVersionMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupProjectExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetailExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/domain/RelationshipEdgeExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ShareInfoExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupProjectMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupProjectMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/RelationshipEdgeMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/RelationshipEdgeMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ShareInfoMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ShareInfoMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSourceExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/LicenseExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlobExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/NotificationExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatisticsExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResourceExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlobExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/QuotaExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/ScheduleExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegrationExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameterExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourceExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePoolExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtendExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKeyExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermissionExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelationExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/WorkspaceExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/AuthSourceMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/AuthSourceMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/LicenseMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/LicenseMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskBlobMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskBlobMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/NotificationMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/NotificationMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/NoviceStatisticsMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/NoviceStatisticsMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogResourceMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogResourceMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginBlobMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginBlobMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/ScheduleMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/ScheduleMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/ServiceIntegrationMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/ServiceIntegrationMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/SystemParameterMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/SystemParameterMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourceMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourceMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourcePoolMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourcePoolMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserExtendMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserExtendMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserKeyMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserKeyMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRolePermissionMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRolePermissionMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleRelationMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleRelationMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/WorkspaceMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/WorkspaceMapper.xml delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommand.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElement.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementModule.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementReference.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenario.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioBlob.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioExecutionInfo.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioModule.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReference.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReport.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportBlob.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportResult.java delete mode 100644 backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportStructure.java create mode 100644 backend/framework/domain/src/main/resources/generatorConfig.xml create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/config/OpenApiConfig.java create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/SessionConstants.java rename backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/{UserMapper.java => BaseUserMapper.java} (90%) rename backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/{UserMapper.xml => BaseUserMapper.xml} (95%) delete mode 100644 backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.java delete mode 100644 backend/services/project-management/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.xml delete mode 100644 backend/services/system-setting/src/main/java/io/metersphere/system/util/BatchSaveUtils.java diff --git a/backend/framework/domain/pom.xml b/backend/framework/domain/pom.xml index ecd49fa1dc..6bbd725a79 100644 --- a/backend/framework/domain/pom.xml +++ b/backend/framework/domain/pom.xml @@ -24,22 +24,48 @@ provided - io.swagger.parser.v3 - swagger-parser - ${swagger-parser.version} - - - swagger-core - io.swagger.core.v3 - - - swagger-models - io.swagger.core.v3 - - + io.swagger.core.v3 + swagger-annotations-jakarta + ${swagger.version} + provided + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + ${mybatis-starter.version} provided + + + + org.mybatis.generator + mybatis-generator-maven-plugin + 1.3.7 + + true + true + + + + mysql + mysql-connector-java + 8.0.16 + + + com.itfsw + mybatis-generator-plugin + 1.3.10 + + + com.fit2cloud + mybatis-tools + 3.0.0 + + + + + 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 4e00955890..b578e42ea4 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,18 +1,17 @@ package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "接口定义") +@Schema(title = "接口定义") @Table("api_definition") @Data public class ApiDefinition implements Serializable { @@ -20,117 +19,117 @@ public class ApiDefinition implements Serializable { @Id @NotBlank(message = "{api_definition.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "接口pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; @Size(min = 1, max = 50, message = "{api_definition.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "修改时间", required = true, dataType = "Long") + @Schema(title = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 50, message = "{api_definition.update_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "修改人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String updateUser; - @ApiModelProperty(name = "删除人", required = false, allowableValues = "range[1, 50]") + @Schema(title = "删除人", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String deleteUser; - @ApiModelProperty(name = "删除时间", required = false, dataType = "Long") + @Schema(title = "删除时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long deleteTime; @Size(min = 1, max = 1, message = "{api_definition.deleted.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.deleted.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "删除状态", required = true, allowableValues = "range[1, 1]") + @Schema(title = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean deleted; @Size(min = 1, max = 255, message = "{api_definition.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口名称", required = true, allowableValues = "range[1, 255]") + @Schema(title = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") private String name; @Size(min = 1, max = 50, message = "{api_definition.method.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.method.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口类型", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String method; @Size(min = 1, max = 20, message = "{api_definition.protocol.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.protocol.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口协议", required = true, allowableValues = "range[1, 255]") + @Schema(title = "接口协议", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") private String protocol; - @ApiModelProperty(name = "接口路径-只有HTTP协议有值", required = false, allowableValues = "range[1, 255]") + @Schema(title = "接口路径-只有HTTP协议有值", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 255]") private String path; - @ApiModelProperty(name = "模块全路径-用于导入处理", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "模块全路径-用于导入处理", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1000]") private String modulePath; @Size(min = 1, max = 50, message = "{api_definition.status.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口状态/进行中/已完成", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口状态/进行中/已完成", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String status; - @ApiModelProperty(name = "模块fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "模块fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String moduleId; - @ApiModelProperty(name = "自定义id", required = false, dataType = "Integer") + @Schema(title = "自定义id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Integer num; - @ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 500]") + @Schema(title = "标签", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String tags; - @ApiModelProperty(name = "自定义排序", required = true, dataType = "Long") + @Schema(title = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; @Size(min = 1, max = 1, message = "{api_definition.sync_enable.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.sync_enable.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否启用同步", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否启用同步", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean syncEnable; - @ApiModelProperty(name = "同步开始时间", required = false, dataType = "Long") + @Schema(title = "同步开始时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long syncTime; @Size(min = 1, max = 50, message = "{api_definition.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; - @ApiModelProperty(name = "环境fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "环境fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String environmentId; @Size(min = 1, max = 1, message = "{api_definition.latest.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition.latest.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否为最新版本 0:否,1:是", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否为最新版本 0:否,1:是", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean latest; - @ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "版本fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String versionId; - @ApiModelProperty(name = "版本引用fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "版本引用fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String refId; - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 500]") + @Schema(title = "描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String description; 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 3880c76a39..4056244c81 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,38 +1,36 @@ - package io.metersphere.api.domain; -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; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import lombok.EqualsAndHashCode; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "接口定义详情内容") +@Schema(title = "接口定义详情内容") @Table("api_definition_blob") @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) public class ApiDefinitionBlob implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{api_definition_blob.api_definition_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "接口fk/ 一对一关系", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口fk/ 一对一关系", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "请求内容", required = false, dataType = "byte[]") + @Schema(title = "请求内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] request; - @ApiModelProperty(name = "响应内容", required = false, dataType = "byte[]") + @Schema(title = "响应内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] response; - @ApiModelProperty(name = "备注", required = false, dataType = "byte[]") + @Schema(title = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] remark; 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 9c266f8b97..f488d07b1a 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,10 +1,8 @@ - package io.metersphere.api.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,7 +10,7 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "接口定义关注人") +@Schema(title = "接口定义关注人") @Table("api_definition_follow") @Data public class ApiDefinitionFollow implements Serializable { @@ -20,12 +18,12 @@ public class ApiDefinitionFollow implements Serializable { @Size(min = 1, max = 50, message = "{api_definition_follow.api_definition_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_follow.api_definition_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String apiDefinitionId; @Size(min = 1, max = 50, message = "{api_definition_follow.follow_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_follow.follow_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "关注人/用户fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "关注人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String followId; } \ No newline at end of file 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 53fbf14e72..c5798507ae 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "mock 配置") +@Schema(title = "mock 配置") @Table("api_definition_mock") @Data public class ApiDefinitionMock implements Serializable { @@ -21,50 +19,50 @@ public class ApiDefinitionMock implements Serializable { @Id @NotBlank(message = "{api_definition_mock.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "mock pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "mock pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "接口路径", required = false, allowableValues = "range[1, 500]") + @Schema(title = "接口路径", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String apiPath; - @ApiModelProperty(name = "接口类型", required = false, allowableValues = "range[1, 50]") + @Schema(title = "接口类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String apiMethod; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "修改时间", required = true, dataType = "Long") + @Schema(title = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 50, message = "{api_definition_mock.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_mock.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; @Size(min = 1, max = 200, message = "{api_definition_mock.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_mock.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "mock 名称", required = true, allowableValues = "range[1, 200]") + @Schema(title = "mock 名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 200]") private String name; - @ApiModelProperty(name = "自定义标签", required = false, allowableValues = "range[1, 500]") + @Schema(title = "自定义标签", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String tags; - @ApiModelProperty(name = "启用/禁用", required = false, dataType = "boolean") - private boolean enable; + @Schema(title = "启用/禁用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + private Boolean enable; @Size(min = 1, max = 50, message = "{api_definition_mock.expect_num.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_mock.expect_num.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "mock编号", required = true, allowableValues = "range[1, 50]") + @Schema(title = "mock编号", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String expectNum; @Size(min = 1, max = 50, message = "{api_definition_mock.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_mock.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; @Size(min = 1, max = 50, message = "{api_definition_mock.api_definition_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_mock.api_definition_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String apiDefinitionId; 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 375427bc10..f25381af8c 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,18 +1,16 @@ - package io.metersphere.api.domain; +import io.metersphere.validation.groups.Updated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import lombok.Data; import lombok.EqualsAndHashCode; 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; -import jakarta.validation.constraints.NotBlank; -import lombok.Data; import java.io.Serializable; -@ApiModel(value = "mock期望值配置") +@Schema(title = "mock期望值配置") @Table("api_definition_mock_config") @Data @EqualsAndHashCode(callSuper = false) @@ -21,13 +19,13 @@ public class ApiDefinitionMockConfig implements Serializable { @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]") + @Schema(title = "接口mock pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "请求内容", required = false, allowableValues = "range[1, ]") + @Schema(title = "请求内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, ]") private byte[] request; - @ApiModelProperty(name = "响应内容", required = false, allowableValues = "range[1, ]") + @Schema(title = "响应内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, ]") private byte[] response; } \ No newline at end of file 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 ea2bca6341..6a224ee29d 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "接口模块") +@Schema(title = "接口模块") @Table("api_definition_module") @Data public class ApiDefinitionModule implements Serializable { @@ -21,49 +19,49 @@ public class ApiDefinitionModule implements Serializable { @Id @NotBlank(message = "{api_definition_module.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "接口模块pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口模块pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "修改时间", required = true, dataType = "Long") + @Schema(title = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 50, message = "{api_definition_module.update_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_module.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "修改人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String updateUser; @Size(min = 1, max = 50, message = "{api_definition_module.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_module.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; @Size(min = 1, max = 64, message = "{api_definition_module.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_module.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块名称", required = true, allowableValues = "range[1, 64]") + @Schema(title = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String name; @Size(min = 1, max = 64, message = "{api_definition_module.protocol.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_module.protocol.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "协议", required = true, allowableValues = "range[1, 64]") + @Schema(title = "协议", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String protocol; @Size(min = 1, max = 50, message = "{api_definition_module.parent_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_module.parent_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "父级fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "父级fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String parentId; @Size(min = 1, max = 50, message = "{api_definition_module.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_module.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; - @ApiModelProperty(name = "树节点级别", required = true, dataType = "Integer") + @Schema(title = "树节点级别", requiredMode = Schema.RequiredMode.REQUIRED) private Integer level; - @ApiModelProperty(name = "排序", required = true, dataType = "Integer") + @Schema(title = "排序", requiredMode = Schema.RequiredMode.REQUIRED) private Integer pos; } \ No newline at end of file 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 9679d2841f..10998782f0 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "定时同步配置") +@Schema(title = "定时同步配置") @Table("api_definition_swagger") @Data public class ApiDefinitionSwagger implements Serializable { @@ -21,30 +19,30 @@ public class ApiDefinitionSwagger implements Serializable { @Id @NotBlank(message = "{api_definition_swagger.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "主键", required = true, allowableValues = "range[1, 50]") + @Schema(title = "主键", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 500, message = "{api_definition_swagger.swagger_url.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_swagger.swagger_url.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "url地址", required = true, allowableValues = "range[1, 500]") + @Schema(title = "url地址", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 500]") private String swaggerUrl; - @ApiModelProperty(name = "模块fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "模块fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String moduleId; - @ApiModelProperty(name = "模块路径", required = false, allowableValues = "range[1, 500]") + @Schema(title = "模块路径", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String modulePath; - @ApiModelProperty(name = "鉴权配置信息", required = false, allowableValues = "range[1, ]") + @Schema(title = "鉴权配置信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, ]") private byte[] config; - @ApiModelProperty(name = "导入模式/覆盖/不覆盖", required = false, allowableValues = "range[1, 1]") + @Schema(title = "导入模式/覆盖/不覆盖", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1]") private Boolean mode; - @ApiModelProperty(name = "项目fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String projectId; - @ApiModelProperty(name = "导入版本", required = false, allowableValues = "range[1, 50]") + @Schema(title = "导入版本", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String versionId; } \ No newline at end of file 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 a1cfa459be..75611ccf37 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "接口定义公共部分环境") +@Schema(title = "接口定义公共部分环境") @Table("api_environment_config") @Data public class ApiEnvironmentConfig implements Serializable { @@ -21,23 +19,23 @@ public class ApiEnvironmentConfig implements Serializable { @Id @NotBlank(message = "{api_definition_env.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "修改时间", required = true, dataType = "Long") + @Schema(title = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 50, message = "{api_definition_env.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_env.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用户fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "用户fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; @Size(min = 1, max = 50, message = "{api_definition_env.environment_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_definition_env.environment_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "环境fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "环境fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String environmentId; } \ No newline at end of file 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 77d20bdc88..f149809fa8 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "误报库") +@Schema(title = "误报库") @Table("api_fake_error_config") @Data public class ApiFakeErrorConfig implements Serializable { @@ -21,47 +19,47 @@ public class ApiFakeErrorConfig implements Serializable { @Id @NotBlank(message = "{api_fake_error_config.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "误报pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "误报pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "修改时间", required = true, dataType = "Long") + @Schema(title = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 50, message = "{api_fake_error_config.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_fake_error_config.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; @Size(min = 1, max = 50, message = "{api_fake_error_config.update_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_fake_error_config.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "修改人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String updateUser; @Size(min = 1, max = 255, message = "{api_fake_error_config.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_fake_error_config.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "误报名称", required = true, allowableValues = "range[1, 255]") + @Schema(title = "误报名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") private String name; @Size(min = 1, max = 255, message = "{api_fake_error_config.match_type.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_fake_error_config.match_type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "匹配类型", required = true, allowableValues = "range[1, 255]") + @Schema(title = "匹配类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") private String matchType; - @ApiModelProperty(name = "状态", required = false, allowableValues = "range[1, 1]") + @Schema(title = "状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1]") private Boolean status; @Size(min = 1, max = 50, message = "{api_fake_error_config.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_fake_error_config.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; - @ApiModelProperty(name = "描述信息", required = false, allowableValues = "range[1, 500]") + @Schema(title = "描述信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String description; - @ApiModelProperty(name = "误报内容", required = false, dataType = "byte[]") + @Schema(title = "误报内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] content; } \ No newline at end of file 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 8443acbbab..6273714a1c 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "API/CASE执行结果") +@Schema(title = "API/CASE执行结果") @Table("api_report") @Data public class ApiReport implements Serializable { @@ -21,85 +19,85 @@ public class ApiReport implements Serializable { @Id @NotBlank(message = "{api_report.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "接口结果报告pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口结果报告pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 200, message = "{api_report.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口报告名称", required = true, allowableValues = "range[1, 200]") + @Schema(title = "接口报告名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 200]") private String name; @Size(min = 1, max = 50, message = "{api_report.resource_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.resource_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源fk/api_definition_id/api_test_case_id", required = true, allowableValues = "range[1, 50]") + @Schema(title = "资源fk/api_definition_id/api_test_case_id", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String resourceId; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "修改时间", required = true, dataType = "Long") + @Schema(title = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 50, message = "{api_report.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; @Size(min = 1, max = 50, message = "{api_report.update_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "修改人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String updateUser; @Size(min = 1, max = 1, message = "{api_report.deleted.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.deleted.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "删除状态", required = true, allowableValues = "range[1, 1]") + @Schema(title = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean deleted; @Size(min = 1, max = 50, message = "{api_report.status.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "结果状态", required = true, allowableValues = "range[1, 50]") + @Schema(title = "结果状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String status; - @ApiModelProperty(name = "接口开始执行时间", required = false, dataType = "Long") + @Schema(title = "接口开始执行时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long startTime; - @ApiModelProperty(name = "接口执行结束时间", required = false, dataType = "Long") + @Schema(title = "接口执行结束时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long endTime; @Size(min = 1, max = 20, message = "{api_report.run_mode.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.run_mode.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "执行模块/API/CASE/API_PLAN", required = true, allowableValues = "range[1, 20]") + @Schema(title = "执行模块/API/CASE/API_PLAN", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") private String runMode; @Size(min = 1, max = 50, message = "{api_report.pool_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.pool_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源池", required = true, allowableValues = "range[1, 50]") + @Schema(title = "资源池", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String poolId; @Size(min = 1, max = 50, message = "{api_report.trigger_mode.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.trigger_mode.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "触发模式/手动/批量/定时任务/JENKINS", required = true, allowableValues = "range[1, 50]") + @Schema(title = "触发模式/手动/批量/定时任务/JENKINS", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String triggerMode; - @ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "版本fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String versionId; @Size(min = 1, max = 50, message = "{api_report.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; @Size(min = 1, max = 50, message = "{api_report.integrated_report_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.integrated_report_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "集成报告id/api_scenario_report_id", required = true, allowableValues = "range[1, 50]") + @Schema(title = "集成报告id/api_scenario_report_id", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String integratedReportId; @Size(min = 1, max = 1, message = "{api_report.integrated.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_report.integrated.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否为集成报告,默认否", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否为集成报告,默认否", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean integrated; } \ No newline at end of file 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 127258e0c0..a255023fe4 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,36 +1,34 @@ - package io.metersphere.api.domain; -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; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import lombok.EqualsAndHashCode; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "API/CASE执行结果详情") +@Schema(title = "API/CASE执行结果详情") @Table("api_report_blob") @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) public class ApiReportBlob implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{api_report_blob.api_report_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "接口报告fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口报告fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "结果内容详情", required = false, dataType = "byte[]") + @Schema(title = "结果内容详情", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] content; - @ApiModelProperty(name = "执行环境配置", required = false, dataType = "byte[]") + @Schema(title = "执行环境配置", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] config; - @ApiModelProperty(name = "执行过程日志", required = false, dataType = "byte[]") + @Schema(title = "执行过程日志", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] console; } \ No newline at end of file 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 6aa08ee3a6..5e180cd71f 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "场景") +@Schema(title = "场景") @Table("api_scenario") @Data public class ApiScenario implements Serializable { @@ -21,108 +19,108 @@ public class ApiScenario implements Serializable { @Id @NotBlank(message = "{api_scenario.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 200, message = "{api_scenario.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景名称", required = true, allowableValues = "range[1, 200]") + @Schema(title = "场景名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 200]") private String name; @Size(min = 1, max = 50, message = "{api_scenario.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "删除时间", required = false, dataType = "Long") + @Schema(title = "删除时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long deleteTime; - @ApiModelProperty(name = "删除人", required = false, allowableValues = "range[1, 50]") + @Schema(title = "删除人", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String deleteUser; @Size(min = 1, max = 50, message = "{api_scenario.update_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "更新人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "更新人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String updateUser; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 10, message = "{api_scenario.level.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario.level.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景级别/P0/P1等", required = true, allowableValues = "range[1, 10]") + @Schema(title = "场景级别/P0/P1等", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 10]") private String level; @Size(min = 1, max = 20, message = "{api_scenario.status.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景状态/未规划/已完成 等", required = true, allowableValues = "range[1, 20]") + @Schema(title = "场景状态/未规划/已完成 等", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") private String status; @Size(min = 1, max = 50, message = "{api_scenario.principal.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario.principal.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "责任人/用户fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "责任人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String principal; - @ApiModelProperty(name = "场景步骤总数", required = true, dataType = "Integer") + @Schema(title = "场景步骤总数", requiredMode = Schema.RequiredMode.REQUIRED) private Integer stepTotal; - @ApiModelProperty(name = "通过率", required = true, dataType = "Long") + @Schema(title = "通过率", requiredMode = Schema.RequiredMode.REQUIRED) private Long passRate; - @ApiModelProperty(name = "最后一次执行的结果状态", required = false, allowableValues = "range[1, 50]") + @Schema(title = "最后一次执行的结果状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String reportStatus; - @ApiModelProperty(name = "编号", required = false, dataType = "Integer") + @Schema(title = "编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Integer num; - @ApiModelProperty(name = "自定义id", required = false, allowableValues = "range[1, 50]") + @Schema(title = "自定义id", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String customNum; @Size(min = 1, max = 1, message = "{api_scenario.deleted.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario.deleted.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "删除状态", required = true, allowableValues = "range[1, 1]") + @Schema(title = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean deleted; @Size(min = 1, max = 1, message = "{api_scenario.environment_group.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario.environment_group.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否为环境组", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否为环境组", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean environmentGroup; - @ApiModelProperty(name = "自定义排序", required = true, dataType = "Long") + @Schema(title = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; - @ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "版本fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String versionId; - @ApiModelProperty(name = "引用资源fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "引用资源fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String refId; - @ApiModelProperty(name = "是否为最新版本 0:否,1:是", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否为最新版本 0:否,1:是", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1]") private Boolean latest; @Size(min = 1, max = 50, message = "{api_scenario.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; - @ApiModelProperty(name = "场景模块fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "场景模块fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String apiScenarioModuleId; - @ApiModelProperty(name = "最后一次执行的报告fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "最后一次执行的报告fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String reportId; - @ApiModelProperty(name = "描述信息", required = false, allowableValues = "range[1, 500]") + @Schema(title = "描述信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String description; - @ApiModelProperty(name = "模块全路径/用于导入模块创建", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "模块全路径/用于导入模块创建", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1000]") private String modulePath; - @ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 500]") + @Schema(title = "标签", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String tags; } \ No newline at end of file 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 8841c1dd59..4004acaaf0 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,30 +1,28 @@ - package io.metersphere.api.domain; -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; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import lombok.EqualsAndHashCode; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "场景步骤详情") +@Schema(title = "场景步骤详情") @Table("api_scenario_blob") @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) public class ApiScenarioBlob implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{api_scenario_blob.api_scenario_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "场景pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "场景pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "场景步骤内容", required = false, dataType = "byte[]") + @Schema(title = "场景步骤内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] content; } \ No newline at end of file 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 e0a695e625..386e1a0898 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "场景环境") +@Schema(title = "场景环境") @Table("api_scenario_environment") @Data public class ApiScenarioEnvironment implements Serializable { @@ -21,23 +19,23 @@ public class ApiScenarioEnvironment implements Serializable { @Id @NotBlank(message = "{api_scenario_environment.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "场景环境pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "场景环境pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{api_scenario_environment.api_scenario_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_environment.api_scenario_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String apiScenarioId; @Size(min = 1, max = 50, message = "{api_scenario_environment.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_environment.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; - @ApiModelProperty(name = "环境fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "环境fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String environmentId; - @ApiModelProperty(name = "环境组fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "环境组fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String environmentGroupId; } \ No newline at end of file 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 d8a00909c2..3637ceb494 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,10 +1,8 @@ - package io.metersphere.api.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,7 +10,7 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "关注记录") +@Schema(title = "关注记录") @Table("api_scenario_follow") @Data public class ApiScenarioFollow implements Serializable { @@ -20,12 +18,12 @@ public class ApiScenarioFollow implements Serializable { @Size(min = 1, max = 50, message = "{api_scenario_follow.api_scenario_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_follow.api_scenario_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String apiScenarioId; @Size(min = 1, max = 50, message = "{api_scenario_follow.follow_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_follow.follow_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "关注人/用户fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "关注人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String followId; } \ No newline at end of file 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 553c24fdff..2724c83857 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "场景模块") +@Schema(title = "场景模块") @Table("api_scenario_module") @Data public class ApiScenarioModule implements Serializable { @@ -21,44 +19,44 @@ public class ApiScenarioModule implements Serializable { @Id @NotBlank(message = "{api_scenario_module.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "场景模块pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "场景模块pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 64, message = "{api_scenario_module.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_module.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块名称", required = true, allowableValues = "range[1, 64]") + @Schema(title = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String name; - @ApiModelProperty(name = "模块级别", required = true, dataType = "Integer") + @Schema(title = "模块级别", requiredMode = Schema.RequiredMode.REQUIRED) private Integer level; - @ApiModelProperty(name = "排序", required = true, dataType = "Integer") + @Schema(title = "排序", requiredMode = Schema.RequiredMode.REQUIRED) private Integer pos; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 50, message = "{api_scenario_module.update_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_module.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "更新人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "更新人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String updateUser; @Size(min = 1, max = 50, message = "{api_scenario_module.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_module.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; @Size(min = 1, max = 50, message = "{api_scenario_module.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_module.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; @Size(min = 1, max = 50, message = "{api_scenario_module.parent_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_module.parent_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "父级fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "父级fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String parentId; } \ No newline at end of file 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 6dc4780a61..6fbfa2a012 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "场景步骤引用CASE关系记录") +@Schema(title = "场景步骤引用CASE关系记录") @Table("api_scenario_reference") @Data public class ApiScenarioReference implements Serializable { @@ -21,31 +19,31 @@ public class ApiScenarioReference implements Serializable { @Id @NotBlank(message = "{api_scenario_reference.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "引用关系pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "引用关系pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{api_scenario_reference.api_scenario_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_reference.api_scenario_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String apiScenarioId; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; @Size(min = 1, max = 50, message = "{api_scenario_reference.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_reference.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; @Size(min = 1, max = 50, message = "{api_scenario_reference.reference_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_reference.reference_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "引用步骤fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "引用步骤fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String referenceId; - @ApiModelProperty(name = "引用步骤类型/REF/COPY", required = false, allowableValues = "range[1, 20]") + @Schema(title = "引用步骤类型/REF/COPY", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 20]") private String referenceType; - @ApiModelProperty(name = "步骤类型/CASE/API", required = false, allowableValues = "range[1, 20]") + @Schema(title = "步骤类型/CASE/API", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 20]") private String dataType; } \ No newline at end of file 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 b16cb71b86..90266e20c3 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "场景报告") +@Schema(title = "场景报告") @Table("api_scenario_report") @Data public class ApiScenarioReport implements Serializable { @@ -21,81 +19,81 @@ public class ApiScenarioReport implements Serializable { @Id @NotBlank(message = "{api_scenario_report.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "场景报告pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "场景报告pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 300, message = "{api_scenario_report.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告名称", required = true, allowableValues = "range[1, 300]") + @Schema(title = "报告名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 300]") private String name; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; @Size(min = 1, max = 50, message = "{api_scenario_report.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "删除时间", required = false, dataType = "Long") + @Schema(title = "删除时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long deleteTime; - @ApiModelProperty(name = "删除人", required = false, allowableValues = "range[1, 50]") + @Schema(title = "删除人", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String deleteUser; @Size(min = 1, max = 1, message = "{api_scenario_report.deleted.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.deleted.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "删除标识", required = true, allowableValues = "range[1, 1]") + @Schema(title = "删除标识", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean deleted; @Size(min = 1, max = 50, message = "{api_scenario_report.update_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "修改人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "修改人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String updateUser; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; - @ApiModelProperty(name = "通过率", required = false, dataType = "Long") + @Schema(title = "通过率", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long passRate; @Size(min = 1, max = 20, message = "{api_scenario_report.status.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告状态/SUCCESS/ERROR", required = true, allowableValues = "range[1, 20]") + @Schema(title = "报告状态/SUCCESS/ERROR", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") private String status; @Size(min = 1, max = 20, message = "{api_scenario_report.trigger_mode.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.trigger_mode.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "触发方式", required = true, allowableValues = "range[1, 20]") + @Schema(title = "触发方式", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") private String triggerMode; @Size(min = 1, max = 20, message = "{api_scenario_report.run_mode.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.run_mode.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "执行模式", required = true, allowableValues = "range[1, 20]") + @Schema(title = "执行模式", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") private String runMode; @Size(min = 1, max = 50, message = "{api_scenario_report.pool_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.pool_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源池", required = true, allowableValues = "range[1, 50]") + @Schema(title = "资源池", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String poolId; - @ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "版本fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String versionId; @Size(min = 1, max = 1, message = "{api_scenario_report.integrated.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.integrated.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否是集成报告", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否是集成报告", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean integrated; @Size(min = 1, max = 50, message = "{api_scenario_report.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; @Size(min = 1, max = 50, message = "{api_scenario_report.scenario_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report.scenario_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String scenarioId; } \ No newline at end of file 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 b588fcb83c..597ff495ca 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,75 +1,73 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; import lombok.EqualsAndHashCode; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "场景报告步骤结果") +@Schema(title = "场景报告步骤结果") @Table("api_scenario_report_detail") @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) public class ApiScenarioReportDetail implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{api_scenario_report_detail.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{api_scenario_report_detail.report_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report_detail.report_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "报告fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String reportId; @Size(min = 1, max = 50, message = "{api_scenario_report_detail.resource_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_scenario_report_detail.resource_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景中各个步骤请求唯一标识", required = true, allowableValues = "range[1, 50]") + @Schema(title = "场景中各个步骤请求唯一标识", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String resourceId; - @ApiModelProperty(name = "开始时间", required = false, dataType = "Long") + @Schema(title = "开始时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long startTime; - @ApiModelProperty(name = "结果状态", required = false, allowableValues = "range[1, 20]") + @Schema(title = "结果状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 20]") private String status; - @ApiModelProperty(name = "单个请求步骤时间", required = false, dataType = "Long") + @Schema(title = "单个请求步骤时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long requestTime; - @ApiModelProperty(name = "总断言数", required = false, dataType = "Long") + @Schema(title = "总断言数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long assertionsTotal; - @ApiModelProperty(name = "失败断言数", required = false, dataType = "Long") + @Schema(title = "失败断言数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long passAssertionsTotal; - @ApiModelProperty(name = "误报编号", required = false, allowableValues = "range[1, 200]") + @Schema(title = "误报编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 200]") private String fakeCode; - @ApiModelProperty(name = "请求名称", required = false, allowableValues = "range[1, 500]") + @Schema(title = "请求名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String requestName; - @ApiModelProperty(name = "环境fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "环境fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String environmentId; - @ApiModelProperty(name = "项目fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String projectId; - @ApiModelProperty(name = "失败总数", required = false, dataType = "Integer") + @Schema(title = "失败总数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Integer errorTotal; - @ApiModelProperty(name = "请求响应码", required = false, allowableValues = "range[1, 500]") + @Schema(title = "请求响应码", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String code; - @ApiModelProperty(name = "执行结果", required = false, dataType = "byte[]") + @Schema(title = "执行结果", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] content; } \ No newline at end of file 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 8c63e9e727..e7ff1dca2b 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,17 +1,15 @@ - package io.metersphere.api.domain; -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; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "场景报告过程日志") +@Schema(title = "场景报告过程日志") @Table("api_scenario_report_log") @Data public class ApiScenarioReportLog implements Serializable { @@ -19,10 +17,10 @@ public class ApiScenarioReportLog implements Serializable { @Id @NotBlank(message = "{api_scenario_report_log.report_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "请求资源 id", required = true, allowableValues = "range[1, 50]") + @Schema(title = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String reportId; - @ApiModelProperty(name = "执行日志", required = false, dataType = "byte[]") + @Schema(title = "执行日志", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] console; } \ No newline at end of file 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 9817c60f79..948298c4e4 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,17 +1,15 @@ - package io.metersphere.api.domain; -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; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "场景报告结构") +@Schema(title = "场景报告结构") @Table("api_scenario_report_structure") @Data public class ApiScenarioReportStructure implements Serializable { @@ -19,10 +17,10 @@ public class ApiScenarioReportStructure implements Serializable { @Id @NotBlank(message = "{api_scenario_report_structure.report_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "请求资源 id", required = true, allowableValues = "range[1, 50]") + @Schema(title = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String reportId; - @ApiModelProperty(name = "资源步骤结构树", required = false, dataType = "byte[]") + @Schema(title = "资源步骤结构树", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] resourceTree; } \ No newline at end of file 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 e3f0dd0048..d282aea94b 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "接口同步用例配置") +@Schema(title = "接口同步用例配置") @Table("api_sync_config") @Data public class ApiSyncConfig implements Serializable { @@ -21,43 +19,43 @@ public class ApiSyncConfig implements Serializable { @Id @NotBlank(message = "{api_sync_config.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{api_sync_config.resource_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_sync_config.resource_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "API/CASE 来源fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "API/CASE 来源fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String resourceId; @Size(min = 1, max = 50, message = "{api_sync_config.resource_type.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_sync_config.resource_type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "来源类型/API/CASE", required = true, allowableValues = "range[1, 50]") + @Schema(title = "来源类型/API/CASE", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String resourceType; - @ApiModelProperty(name = "是否隐藏", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否隐藏", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1]") private Boolean hide; - @ApiModelProperty(name = "同步规则", required = false, allowableValues = "range[1, ]") + @Schema(title = "同步规则", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, ]") private String ruleConfig; @Size(min = 1, max = 1, message = "{api_sync_config.notify_case_creator.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_sync_config.notify_case_creator.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否通知用例创建人", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否通知用例创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean notifyCaseCreator; @Size(min = 1, max = 1, message = "{api_sync_config.notify_scenario_creator.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_sync_config.notify_scenario_creator.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否通知场景创建人", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否通知场景创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean notifyScenarioCreator; @Size(min = 1, max = 1, message = "{api_sync_config.sync_enable.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_sync_config.sync_enable.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否同步用例", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否同步用例", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean syncEnable; - @ApiModelProperty(name = "是否发送通知", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否发送通知", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1]") private Boolean noticeEnable; } \ No newline at end of file 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 cd61a81891..b5a773c84a 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,19 +1,17 @@ - package io.metersphere.api.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "接口用例") +@Schema(title = "接口用例") @Table("api_test_case") @Data public class ApiTestCase implements Serializable { @@ -21,91 +19,91 @@ public class ApiTestCase implements Serializable { @Id @NotBlank(message = "{api_test_case.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "接口用例pk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口用例pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 200, message = "{api_test_case.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口用例名称", required = true, allowableValues = "range[1, 200]") + @Schema(title = "接口用例名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 200]") private String name; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; @Size(min = 1, max = 50, message = "{api_test_case.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 50, message = "{api_test_case.update_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "更新人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "更新人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String updateUser; - @ApiModelProperty(name = "删除时间", required = false, dataType = "Long") + @Schema(title = "删除时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long deleteTime; - @ApiModelProperty(name = "删除人", required = false, allowableValues = "range[1, 50]") + @Schema(title = "删除人", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String deleteUser; @Size(min = 1, max = 1, message = "{api_test_case.deleted.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case.deleted.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "删除标识", required = true, allowableValues = "range[1, 1]") + @Schema(title = "删除标识", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean deleted; @Size(min = 1, max = 50, message = "{api_test_case.priority.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case.priority.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用例等级", required = true, allowableValues = "range[1, 50]") + @Schema(title = "用例等级", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String priority; - @ApiModelProperty(name = "接口用例编号id", required = false, dataType = "Integer") + @Schema(title = "接口用例编号id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Integer num; - @ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 500]") + @Schema(title = "标签", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 500]") private String tags; - @ApiModelProperty(name = "用例状态", required = false, allowableValues = "range[1, 20]") + @Schema(title = "用例状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 20]") private String status; - @ApiModelProperty(name = "最新执行结果状态", required = false, allowableValues = "range[1, 20]") + @Schema(title = "最新执行结果状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 20]") private String apiReportStatus; - @ApiModelProperty(name = "最后执行结果报告fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "最后执行结果报告fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String apiReportId; - @ApiModelProperty(name = "自定义排序", required = true, dataType = "Long") + @Schema(title = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; @Size(min = 1, max = 1, message = "{api_test_case.sync_enable.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case.sync_enable.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否开启同步", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否开启同步", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean syncEnable; - @ApiModelProperty(name = "需要同步的开始时间", required = false, dataType = "Long") + @Schema(title = "需要同步的开始时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long syncTime; @Size(min = 1, max = 50, message = "{api_test_case.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; @Size(min = 1, max = 50, message = "{api_test_case.api_definition_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case.api_definition_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String apiDefinitionId; - @ApiModelProperty(name = "版本fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "版本fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String versionId; @Size(min = 1, max = 50, message = "{api_test_case.principal.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case.principal.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "责任人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "责任人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String principal; - @ApiModelProperty(name = "环境fk", required = false, allowableValues = "range[1, 50]") + @Schema(title = "环境fk", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String environmentId; } \ No newline at end of file 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 e132d0b34b..dfe0a461e1 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,30 +1,28 @@ - package io.metersphere.api.domain; -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; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import lombok.EqualsAndHashCode; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "接口用例详情") +@Schema(title = "接口用例详情") @Table("api_test_case_blob") @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) public class ApiTestCaseBlob implements Serializable { private static final long serialVersionUID = 1L; @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]") + @Schema(title = "接口用例pk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "请求内容", required = false, dataType = "byte[]") + @Schema(title = "请求内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private byte[] request; } \ No newline at end of file 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 9f0d9026a1..64a34a8d79 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,10 +1,8 @@ - package io.metersphere.api.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,19 +10,19 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "接口用例关注人") +@Schema(title = "接口用例关注人") @Table("api_test_case_follow") @Data public class ApiTestCaseFollow implements Serializable { private static final long serialVersionUID = 1L; @Size(min = 1, max = 50, message = "{api_test_case_follow.case_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case_follow.case_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用例fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "用例fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String caseId; @Size(min = 1, max = 50, message = "{api_test_case_follow.follow_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{api_test_case_follow.follow_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "关注人/用户fk", required = true, allowableValues = "range[1, 50]") + @Schema(title = "关注人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String followId; } \ No newline at end of file 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 8c5712fb82..f967f64085 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,18 +1,17 @@ package io.metersphere.functional.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "用例评审") +@Schema(title = "用例评审") @Table("case_review") @Data public class CaseReview implements Serializable { @@ -20,52 +19,52 @@ public class CaseReview implements Serializable { @Id @NotBlank(message = "{case_review.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 200, message = "{case_review.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "名称", required = true, allowableValues = "range[1, 200]") + @Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 200]") private String name; @Size(min = 1, max = 64, message = "{case_review.status.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "评审状态:未开始/进行中/已完成/已结束/已归档", required = true, allowableValues = "range[1, 64]") + @Schema(title = "评审状态:未开始/进行中/已完成/已结束/已归档", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String status; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; - @ApiModelProperty(name = "评审结束时间", required = true, dataType = "Long") + @Schema(title = "评审结束时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long endTime; - @ApiModelProperty(name = "描述", required = false) + @Schema(title = "描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String description; @Size(min = 1, max = 50, message = "{case_review.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; - @ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "标签", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1000]") private String tags; @Size(min = 1, max = 50, message = "{case_review.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; @Size(min = 1, max = 64, message = "{case_review.review_pass_rule.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review.review_pass_rule.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "评审规则:单人通过/全部通过", required = true, allowableValues = "range[1, 64]") + @Schema(title = "评审规则:单人通过/全部通过", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String reviewPassRule; 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 ad98bfe140..b19e968b8f 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,16 +1,15 @@ package io.metersphere.functional.domain; -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; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; +import org.springframework.data.annotation.Id; +import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "用例评审关注人") +@Schema(title = "用例评审关注人") @Table("case_review_follow") @Data public class CaseReviewFollow implements Serializable { @@ -18,12 +17,12 @@ public class CaseReviewFollow implements Serializable { @Id @NotBlank(message = "{case_review_follow.review_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "评审ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String reviewId; @NotBlank(message = "{case_review_follow.follow_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "关注人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "关注人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String followId; 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 3833ca2a71..fc5c1e3adb 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,18 +1,17 @@ package io.metersphere.functional.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "用例评审和功能用例的中间表") +@Schema(title = "用例评审和功能用例的中间表") @Table("case_review_functional_case") @Data public class CaseReviewFunctionalCase implements Serializable { @@ -20,44 +19,44 @@ public class CaseReviewFunctionalCase implements Serializable { @Id @NotBlank(message = "{case_review_functional_case.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{case_review_functional_case.review_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review_functional_case.review_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "评审ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String reviewId; @Size(min = 1, max = 50, message = "{case_review_functional_case.case_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review_functional_case.case_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用例ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String caseId; @Size(min = 1, max = 64, message = "{case_review_functional_case.status.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review_functional_case.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "评审状态:进行中/通过/不通过/重新提审", required = true, allowableValues = "range[1, 64]") + @Schema(title = "评审状态:进行中/通过/不通过/重新提审", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String status; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 50, message = "{case_review_functional_case.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review_functional_case.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") + @Schema(title = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; @Size(min = 1, max = 1, message = "{case_review_functional_case.deleted.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review_functional_case.deleted.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "关联的用例是否放入回收站", required = true, allowableValues = "range[1, 1]") + @Schema(title = "关联的用例是否放入回收站", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean deleted; 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 febd3990d5..d838027bd9 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 @@ -2,8 +2,7 @@ package io.metersphere.functional.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -11,7 +10,7 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "功能用例评审和评审人的中间表") +@Schema(title = "功能用例评审和评审人的中间表") @Table("case_review_functional_case_user") @Data public class CaseReviewFunctionalCaseUser implements Serializable { @@ -19,17 +18,17 @@ public class CaseReviewFunctionalCaseUser implements Serializable { @Size(min = 1, max = 50, message = "{case_review_functional_case_user.case_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review_functional_case_user.case_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "功能用例和评审中间表的ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "功能用例和评审中间表的ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String caseId; @Size(min = 1, max = 50, message = "{case_review_functional_case_user.review_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review_functional_case_user.review_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "评审ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String reviewId; @Size(min = 1, max = 50, message = "{case_review_functional_case_user.user_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{case_review_functional_case_user.user_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "评审人ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "评审人ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String userId; 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 9d8592d5e3..86d74e937d 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,27 +1,26 @@ package io.metersphere.functional.domain; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "评审和评审人中间表") +@Schema(title = "评审和评审人中间表") @Table("case_review_user") @Data public class CaseReviewUser implements Serializable { private static final long serialVersionUID = 1L; @NotBlank(message = "{case_review_user.review_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "评审ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String reviewId; - + @NotBlank(message = "{case_review_user.user_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "评审人ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "评审人ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String userId; - + } \ No newline at end of file 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 6939db5338..4157902a57 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,34 +1,33 @@ package io.metersphere.functional.domain; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "自定义字段功能用例关系") +@Schema(title = "自定义字段功能用例关系") @Table("custom_field_test_case") @Data public class CustomFieldTestCase implements Serializable { private static final long serialVersionUID = 1L; @NotBlank(message = "{custom_field_test_case.resource_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "资源ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String resourceId; @NotBlank(message = "{custom_field_test_case.field_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "字段ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "字段ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String fieldId; - @ApiModelProperty(name = "字段值", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "字段值", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1000]") private String value; - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]") + @Schema(title = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, ]") private String textValue; 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 20721b96dc..eafc050763 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,19 +1,18 @@ package io.metersphere.functional.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "功能用例") +@Schema(title = "功能用例") @Table("functional_case") @Data public class FunctionalCase implements Serializable { @@ -22,99 +21,99 @@ public class FunctionalCase implements Serializable { @Id @NotBlank(message = "{functional_case.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - @ApiModelProperty(name = "业务ID", required = true, dataType = "Integer") + @Schema(title = "业务ID", requiredMode = Schema.RequiredMode.REQUIRED) private Integer num; @Size(min = 1, max = 64, message = "{functional_case.custom_num.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.custom_num.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "自定义业务ID", required = true, allowableValues = "range[1, 64]") + @Schema(title = "自定义业务ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String customNum; @Size(min = 1, max = 50, message = "{functional_case.module_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.module_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "模块ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String moduleId; @Size(min = 1, max = 50, message = "{functional_case.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; @Size(min = 1, max = 255, message = "{functional_case.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "名称", required = true, allowableValues = "range[1, 255]") + @Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") private String name; @Size(min = 1, max = 64, message = "{functional_case.review_status.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.review_status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "评审状态:未开始/进行中/已完成/已结束", required = true, allowableValues = "range[1, 64]") + @Schema(title = "评审状态:未开始/进行中/已完成/已结束", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String reviewStatus; - @ApiModelProperty(name = "标签(JSON)", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "标签(JSON)", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 1000]") private String tags; @Size(min = 1, max = 64, message = "{functional_case.step_model.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.step_model.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "编辑模式:步骤模式/文本模式", required = true, allowableValues = "range[1, 64]") + @Schema(title = "编辑模式:步骤模式/文本模式", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String stepModel; - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") + @Schema(title = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; @Size(min = 1, max = 50, message = "{functional_case.version_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.version_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "版本ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String versionId; @Size(min = 1, max = 50, message = "{functional_case.ref_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.ref_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "指向初始版本ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "指向初始版本ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String refId; @Size(min = 1, max = 64, message = "{functional_case.last_execute_result.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.last_execute_result.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "最近的执行结果:未执行/通过/失败/阻塞/跳过", required = true, allowableValues = "range[1, 64]") + @Schema(title = "最近的执行结果:未执行/通过/失败/阻塞/跳过", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String lastExecuteResult; @Size(min = 1, max = 1, message = "{functional_case.deleted.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.deleted.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否在回收站:0-否,1-是", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否在回收站:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean deleted; @Size(min = 1, max = 1, message = "{functional_case.public_case.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.public_case.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否是公共用例:0-否,1-是", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否是公共用例:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean publicCase; @Size(min = 1, max = 1, message = "{functional_case.latest.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.latest.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否为最新版本:0-否,1-是", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否为最新版本:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean latest; @Size(min = 1, max = 100, message = "{functional_case.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") private String createUser; - @ApiModelProperty(name = "删除人", required = false, allowableValues = "range[1, 64]") + @Schema(title = "删除人", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 64]") private String deleteUser; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; - @ApiModelProperty(name = "删除时间", required = false, dataType = "Long") + @Schema(title = "删除时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long deleteTime; } 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 ebcce208d9..d7dbf2235f 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,26 +1,25 @@ package io.metersphere.functional.domain; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "功能用例和附件的中间表") +@Schema(title = "功能用例和附件的中间表") @Table("functional_case_attachment") @Data public class FunctionalCaseAttachment implements Serializable { private static final long serialVersionUID = 1L; @NotBlank(message = "{functional_case_attachment.functional_case_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "功能用例ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String functionalCaseId; @NotBlank(message = "{functional_case_attachment.file_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "文件的ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "文件的ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String fileId; } 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 2282ddde63..8396e58a91 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,36 +1,36 @@ package io.metersphere.functional.domain; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; + +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "功能用例") +@Schema(title = "功能用例") @Table("functional_case_blob") @Data @EqualsAndHashCode(callSuper = false) public class FunctionalCaseBlob implements Serializable { private static final long serialVersionUID = 1L; - @ApiModelProperty(name = "用例步骤(JSON),step_model 为 0 时启用", required = false) + @Schema(title = "用例步骤(JSON),step_model 为 0 时启用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String steps; - @ApiModelProperty(name = "步骤描述,step_model 为 1 时启用", required = false) + @Schema(title = "步骤描述,step_model 为 1 时启用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String stepDescription; - @ApiModelProperty(name = "预期结果,step_model 为 1 时启用", required = false) + @Schema(title = "预期结果,step_model 为 1 时启用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String expectedResult; - @ApiModelProperty(name = "前置条件", required = false) + @Schema(title = "前置条件", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String prerequisite; - @ApiModelProperty(name = "备注", required = false) + @Schema(title = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String description; } 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 6dfe07be11..05db03a554 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 @@ -1,18 +1,17 @@ package io.metersphere.functional.domain; -import java.io.Serializable; - -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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; -@ApiModel(value = "功能用例评论") +import java.io.Serializable; + +@Schema(title = "功能用例评论") @Table("functional_case_comment") @Data public class FunctionalCaseComment implements Serializable { @@ -20,43 +19,43 @@ public class FunctionalCaseComment implements Serializable { @Id @NotBlank(message = "{functional_case_comment.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{functional_case_comment.case_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_comment.case_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "功能用例ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String caseId; @Size(min = 1, max = 50, message = "{functional_case_comment.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_comment.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "评论人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "评论人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "评论时添加的状态:通过/不通过/重新提审/通过标准变更标记/强制通过标记/强制不通过标记/状态变更标记", required = false, allowableValues = "range[1, 64]") + @Schema(title = "评论时添加的状态:通过/不通过/重新提审/通过标准变更标记/强制通过标记/强制不通过标记/状态变更标记", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 64]") private String status; @Size(min = 1, max = 64, message = "{functional_case_comment.type.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_comment.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "评论类型:用例评论/测试计划用例评论/评审用例评论", required = true, allowableValues = "range[1, 64]") + @Schema(title = "评论类型:用例评论/测试计划用例评论/评审用例评论", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String type; - @ApiModelProperty(name = "当前评审所属的测试计划ID或评审ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "当前评审所属的测试计划ID或评审ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String belongId; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; - @ApiModelProperty(name = "描述", required = false) + @Schema(title = "描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private String description; } 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 576171b821..c3bbadd871 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,26 +1,25 @@ package io.metersphere.functional.domain; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "功能用例和关注人的中间表") +@Schema(title = "功能用例和关注人的中间表") @Table("functional_case_follow") @Data public class FunctionalCaseFollow implements Serializable { private static final long serialVersionUID = 1L; @NotBlank(message = "{functional_case_follow.case_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "功能用例ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String caseId; @NotBlank(message = "{functional_case_follow.follow_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "关注人ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "关注人ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String followId; 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 d6be3da6a2..75f23683b5 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 @@ -1,18 +1,17 @@ package io.metersphere.functional.domain; -import java.io.Serializable; - -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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; -@ApiModel(value = "功能用例模块") +import java.io.Serializable; + +@Schema(title = "功能用例模块") @Table("functional_case_module") @Data public class FunctionalCaseModule implements Serializable { @@ -20,39 +19,39 @@ public class FunctionalCaseModule implements Serializable { @Id @NotBlank(message = "{functional_case_module.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{functional_case_module.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_module.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; @Size(min = 1, max = 100, message = "{functional_case_module.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_module.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "名称", required = true, allowableValues = "range[1, 100]") + @Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") private String name; - @ApiModelProperty(name = "父节点ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "父节点ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String parentId; - @ApiModelProperty(name = "节点的层级", required = true, dataType = "Integer") + @Schema(title = "节点的层级", requiredMode = Schema.RequiredMode.REQUIRED) private Integer level; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; @Size(min = 1, max = 10, message = "{functional_case_module.pos.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_module.pos.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "同一节点下的顺序", required = true, dataType = "Long") + @Schema(title = "同一节点下的顺序", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; @Size(min = 1, max = 50, message = "{functional_case_module.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_module.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; } 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 95d7de7ba6..da4610b188 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,53 +1,52 @@ package io.metersphere.functional.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "功能用例的前后置关系") +@Schema(title = "功能用例的前后置关系") @Table("functional_case_relationship_edge") @Data public class FunctionalCaseRelationshipEdge implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{functional_case_relationship_edge.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{functional_case_relationship_edge.source_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_relationship_edge.source_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "源节点的ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "源节点的ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String sourceId; @Size(min = 1, max = 50, message = "{functional_case_relationship_edge.target_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_relationship_edge.target_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "目标节点的ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "目标节点的ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String targetId; @Size(min = 1, max = 50, message = "{functional_case_relationship_edge.graph_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_relationship_edge.graph_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "所属关系图的ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "所属关系图的ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String graphId; @Size(min = 1, max = 50, message = "{functional_case_relationship_edge.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_relationship_edge.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; 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 49840e5ed3..dea47d4824 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,18 +1,17 @@ package io.metersphere.functional.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "功能用例和其他用例的中间表") +@Schema(title = "功能用例和其他用例的中间表") @Table("functional_case_test") @Data public class FunctionalCaseTest implements Serializable { @@ -20,30 +19,30 @@ public class FunctionalCaseTest implements Serializable { @Id @NotBlank(message = "{functional_case_test.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{functional_case_test.functional_case_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_test.functional_case_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "功能用例ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String functionalCaseId; @Size(min = 1, max = 50, message = "{functional_case_test.test_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_test.test_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "其他类型用例ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "其他类型用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testId; @Size(min = 1, max = 64, message = "{functional_case_test.test_type.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{functional_case_test.test_type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用例类型:接口用例/场景用例/性能用例/UI用例", required = true, allowableValues = "range[1, 64]") + @Schema(title = "用例类型:接口用例/场景用例/性能用例/UI用例", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") private String testType; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long updateTime; 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 5fc7b976f8..b721fbd382 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,44 +1,44 @@ package io.metersphere.functional.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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 = "脑图临时节点") +@Schema(title = "脑图临时节点") @Table("minder_extra_node") @Data public class MinderExtraNode implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{minder_extra_node.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; - + @Size(min = 1, max = 50, message = "{minder_extra_node.parent_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{minder_extra_node.parent_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "父节点的ID,即模块ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "父节点的ID,即模块ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String parentId; - + @Size(min = 1, max = 50, message = "{minder_extra_node.group_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{minder_extra_node.group_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID,可扩展为其他资源ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "项目ID,可扩展为其他资源ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String groupId; - + @Size(min = 1, max = 30, message = "{minder_extra_node.type.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{minder_extra_node.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "类型,如:用例编辑脑图", required = true, allowableValues="range[1, 30]") + @Schema(title = "类型,如:用例编辑脑图", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 30]") private String type; - - - @ApiModelProperty(name = "存储脑图节点额外信息", required = true, allowableValues="range[1, ]") + + + @Schema(title = "存储脑图节点额外信息", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, ]") private String nodeData; - + } \ No newline at end of file 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 50e834c0b4..2785d59403 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,86 +1,78 @@ package io.metersphere.load.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "性能测试用例") -@Table("load_test") @Data public class LoadTest implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{load_test.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "测试ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{load_test.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test.project_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{load_test.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") private String projectId; + @Schema(title = "测试名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{load_test.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 255, message = "{load_test.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试名称", required = true, allowableValues = "range[1, 255]") private String name; - - @ApiModelProperty(name = "状态为Error时表示错误信息", required = false, allowableValues = "range[1, 500]") + @Schema(title = "状态为Error时表示错误信息") private String description; - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") + @Schema(title = "更新时间") private Long updateTime; + @Schema(title = "状态: Starting, Running, Completed, Error, etc.", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{load_test.status.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{load_test.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "状态: Starting, Running, Completed, Error, etc.", required = true, allowableValues = "range[1, 64]") private String status; + @Schema(title = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test.test_resource_pool_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{load_test.test_resource_pool_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test.test_resource_pool_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源池ID", required = true, allowableValues = "range[1, 50]") private String testResourcePoolId; - - @ApiModelProperty(name = "测试数字ID,例如: 100001", required = true, dataType = "Integer") + @Schema(title = "测试数字ID,例如: 100001", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 10]") + @NotBlank(message = "{load_test.num.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 10, message = "{load_test.num.length_range}", groups = {Created.class, Updated.class}) private Integer num; + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{load_test.create_user.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 100, message = "{load_test.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]") private String createUser; - - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") + @Schema(title = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 19]") + @NotBlank(message = "{load_test.pos.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 19, message = "{load_test.pos.length_range}", groups = {Created.class, Updated.class}) private Long pos; + @Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test.version_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{load_test.version_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test.version_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "版本ID", required = true, allowableValues = "range[1, 50]") private String versionId; + @Schema(title = "基版本数据ID,首条测试和测试ID相同", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test.ref_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{load_test.ref_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test.ref_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "基版本数据ID,首条测试和测试ID相同", required = true, allowableValues = "range[1, 50]") private String refId; + @Schema(title = "是否为最新版本 0:否,1:是", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") + @NotBlank(message = "{load_test.latest.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 1, message = "{load_test.latest.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test.latest.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否为最新版本 0:否,1:是", required = true, allowableValues = "range[1, 1]") private Boolean latest; - + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 156eecd5e0..7cdabfbc5e 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,48 +1,40 @@ package io.metersphere.load.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "关联场景测试和性能测试") -@Table("load_test_api") @Data public class LoadTestApi implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{load_test_api.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_api.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_api.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @Size(min = 1, max = 255, message = "{load_test_api.api_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_api.api_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口场景或用例ID", required = true, allowableValues="range[1, 255]") - private String apiId; - - @Size(min = 1, max = 50, message = "{load_test_api.load_test_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_api.load_test_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "性能测试ID", required = true, allowableValues="range[1, 50]") - private String loadTestId; - - - @ApiModelProperty(name = "环境ID", required = false, allowableValues="range[1, 50]") - private String envId; - - @Size(min = 1, max = 20, message = "{load_test_api.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_api.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "类型: SCENARIO, CASE", required = true, allowableValues="range[1, 20]") - private String type; - - - @ApiModelProperty(name = "关联版本", required = false, dataType = "Integer") - private Integer apiVersion; - + @Schema(title = "接口场景或用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{load_test_api.api_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 255, message = "{load_test_api.api_id.length_range}", groups = {Created.class, Updated.class}) + private String apiId; + + @Schema(title = "性能测试ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_api.load_test_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_api.load_test_id.length_range}", groups = {Created.class, Updated.class}) + private String loadTestId; + + @Schema(title = "环境ID") + private String envId; + + @Schema(title = "类型: SCENARIO, CASE", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") + @NotBlank(message = "{load_test_api.type.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 20, message = "{load_test_api.type.length_range}", groups = {Created.class, Updated.class}) + private String type; + + @Schema(title = "关联版本") + private Integer apiVersion; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestApiExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestApiExample.java new file mode 100644 index 0000000000..37c5e3c61f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestApiExample.java @@ -0,0 +1,610 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestApiExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestApiExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andApiIdIsNull() { + addCriterion("api_id is null"); + return (Criteria) this; + } + + public Criteria andApiIdIsNotNull() { + addCriterion("api_id is not null"); + return (Criteria) this; + } + + public Criteria andApiIdEqualTo(String value) { + addCriterion("api_id =", value, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdNotEqualTo(String value) { + addCriterion("api_id <>", value, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdGreaterThan(String value) { + addCriterion("api_id >", value, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdGreaterThanOrEqualTo(String value) { + addCriterion("api_id >=", value, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdLessThan(String value) { + addCriterion("api_id <", value, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdLessThanOrEqualTo(String value) { + addCriterion("api_id <=", value, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdLike(String value) { + addCriterion("api_id like", value, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdNotLike(String value) { + addCriterion("api_id not like", value, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdIn(List values) { + addCriterion("api_id in", values, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdNotIn(List values) { + addCriterion("api_id not in", values, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdBetween(String value1, String value2) { + addCriterion("api_id between", value1, value2, "apiId"); + return (Criteria) this; + } + + public Criteria andApiIdNotBetween(String value1, String value2) { + addCriterion("api_id not between", value1, value2, "apiId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdIsNull() { + addCriterion("load_test_id is null"); + return (Criteria) this; + } + + public Criteria andLoadTestIdIsNotNull() { + addCriterion("load_test_id is not null"); + return (Criteria) this; + } + + public Criteria andLoadTestIdEqualTo(String value) { + addCriterion("load_test_id =", value, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdNotEqualTo(String value) { + addCriterion("load_test_id <>", value, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdGreaterThan(String value) { + addCriterion("load_test_id >", value, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdGreaterThanOrEqualTo(String value) { + addCriterion("load_test_id >=", value, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdLessThan(String value) { + addCriterion("load_test_id <", value, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdLessThanOrEqualTo(String value) { + addCriterion("load_test_id <=", value, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdLike(String value) { + addCriterion("load_test_id like", value, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdNotLike(String value) { + addCriterion("load_test_id not like", value, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdIn(List values) { + addCriterion("load_test_id in", values, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdNotIn(List values) { + addCriterion("load_test_id not in", values, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdBetween(String value1, String value2) { + addCriterion("load_test_id between", value1, value2, "loadTestId"); + return (Criteria) this; + } + + public Criteria andLoadTestIdNotBetween(String value1, String value2) { + addCriterion("load_test_id not between", value1, value2, "loadTestId"); + return (Criteria) this; + } + + public Criteria andEnvIdIsNull() { + addCriterion("env_id is null"); + return (Criteria) this; + } + + public Criteria andEnvIdIsNotNull() { + addCriterion("env_id is not null"); + return (Criteria) this; + } + + public Criteria andEnvIdEqualTo(String value) { + addCriterion("env_id =", value, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdNotEqualTo(String value) { + addCriterion("env_id <>", value, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdGreaterThan(String value) { + addCriterion("env_id >", value, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdGreaterThanOrEqualTo(String value) { + addCriterion("env_id >=", value, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdLessThan(String value) { + addCriterion("env_id <", value, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdLessThanOrEqualTo(String value) { + addCriterion("env_id <=", value, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdLike(String value) { + addCriterion("env_id like", value, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdNotLike(String value) { + addCriterion("env_id not like", value, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdIn(List values) { + addCriterion("env_id in", values, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdNotIn(List values) { + addCriterion("env_id not in", values, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdBetween(String value1, String value2) { + addCriterion("env_id between", value1, value2, "envId"); + return (Criteria) this; + } + + public Criteria andEnvIdNotBetween(String value1, String value2) { + addCriterion("env_id not between", value1, value2, "envId"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andApiVersionIsNull() { + addCriterion("api_version is null"); + return (Criteria) this; + } + + public Criteria andApiVersionIsNotNull() { + addCriterion("api_version is not null"); + return (Criteria) this; + } + + public Criteria andApiVersionEqualTo(Integer value) { + addCriterion("api_version =", value, "apiVersion"); + return (Criteria) this; + } + + public Criteria andApiVersionNotEqualTo(Integer value) { + addCriterion("api_version <>", value, "apiVersion"); + return (Criteria) this; + } + + public Criteria andApiVersionGreaterThan(Integer value) { + addCriterion("api_version >", value, "apiVersion"); + return (Criteria) this; + } + + public Criteria andApiVersionGreaterThanOrEqualTo(Integer value) { + addCriterion("api_version >=", value, "apiVersion"); + return (Criteria) this; + } + + public Criteria andApiVersionLessThan(Integer value) { + addCriterion("api_version <", value, "apiVersion"); + return (Criteria) this; + } + + public Criteria andApiVersionLessThanOrEqualTo(Integer value) { + addCriterion("api_version <=", value, "apiVersion"); + return (Criteria) this; + } + + public Criteria andApiVersionIn(List values) { + addCriterion("api_version in", values, "apiVersion"); + return (Criteria) this; + } + + public Criteria andApiVersionNotIn(List values) { + addCriterion("api_version not in", values, "apiVersion"); + return (Criteria) this; + } + + public Criteria andApiVersionBetween(Integer value1, Integer value2) { + addCriterion("api_version between", value1, value2, "apiVersion"); + return (Criteria) this; + } + + public Criteria andApiVersionNotBetween(Integer value1, Integer value2) { + addCriterion("api_version not between", value1, value2, "apiVersion"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 d726cced65..1ca10de142 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,40 +1,28 @@ package io.metersphere.load.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "性能测试用例大字段") -@Table("load_test_blob") @Data -@EqualsAndHashCode(callSuper=false) public class LoadTestBlob implements Serializable { - private static final long serialVersionUID = 1L; - @Id + @Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") @NotBlank(message = "{load_test_blob.test_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "测试ID", required = true, allowableValues = "range[1, 50]") + @Size(min = 1, max = 50, message = "{load_test_blob.test_id.length_range}", groups = {Created.class, Updated.class}) private String testId; - - @ApiModelProperty(name = "压力配置", required = false, allowableValues = "range[1, ]") + @Schema(title = "压力配置") private byte[] loadConfiguration; - - @ApiModelProperty(name = "高级配置", required = false, allowableValues = "range[1, ]") + @Schema(title = "高级配置") private byte[] advancedConfiguration; - - @ApiModelProperty(name = "环境信息 (JSON format)", required = false, allowableValues = "range[1, ]") + @Schema(title = "环境信息 (JSON format)") private byte[] envInfo; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestBlobExample.java new file mode 100644 index 0000000000..6ea39a8383 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestBlobExample.java @@ -0,0 +1,270 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestBlobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestBlobExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTestIdIsNull() { + addCriterion("test_id is null"); + return (Criteria) this; + } + + public Criteria andTestIdIsNotNull() { + addCriterion("test_id is not null"); + return (Criteria) this; + } + + public Criteria andTestIdEqualTo(String value) { + addCriterion("test_id =", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotEqualTo(String value) { + addCriterion("test_id <>", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThan(String value) { + addCriterion("test_id >", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThanOrEqualTo(String value) { + addCriterion("test_id >=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThan(String value) { + addCriterion("test_id <", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThanOrEqualTo(String value) { + addCriterion("test_id <=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLike(String value) { + addCriterion("test_id like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotLike(String value) { + addCriterion("test_id not like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdIn(List values) { + addCriterion("test_id in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotIn(List values) { + addCriterion("test_id not in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdBetween(String value1, String value2) { + addCriterion("test_id between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotBetween(String value1, String value2) { + addCriterion("test_id not between", value1, value2, "testId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestExample.java new file mode 100644 index 0000000000..3be413754a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestExample.java @@ -0,0 +1,1130 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIsNull() { + addCriterion("test_resource_pool_id is null"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIsNotNull() { + addCriterion("test_resource_pool_id is not null"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdEqualTo(String value) { + addCriterion("test_resource_pool_id =", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotEqualTo(String value) { + addCriterion("test_resource_pool_id <>", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdGreaterThan(String value) { + addCriterion("test_resource_pool_id >", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdGreaterThanOrEqualTo(String value) { + addCriterion("test_resource_pool_id >=", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLessThan(String value) { + addCriterion("test_resource_pool_id <", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLessThanOrEqualTo(String value) { + addCriterion("test_resource_pool_id <=", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLike(String value) { + addCriterion("test_resource_pool_id like", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotLike(String value) { + addCriterion("test_resource_pool_id not like", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIn(List values) { + addCriterion("test_resource_pool_id in", values, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotIn(List values) { + addCriterion("test_resource_pool_id not in", values, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdBetween(String value1, String value2) { + addCriterion("test_resource_pool_id between", value1, value2, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotBetween(String value1, String value2) { + addCriterion("test_resource_pool_id not between", value1, value2, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andNumIsNull() { + addCriterion("num is null"); + return (Criteria) this; + } + + public Criteria andNumIsNotNull() { + addCriterion("num is not null"); + return (Criteria) this; + } + + public Criteria andNumEqualTo(Integer value) { + addCriterion("num =", value, "num"); + return (Criteria) this; + } + + public Criteria andNumNotEqualTo(Integer value) { + addCriterion("num <>", value, "num"); + return (Criteria) this; + } + + public Criteria andNumGreaterThan(Integer value) { + addCriterion("num >", value, "num"); + return (Criteria) this; + } + + public Criteria andNumGreaterThanOrEqualTo(Integer value) { + addCriterion("num >=", value, "num"); + return (Criteria) this; + } + + public Criteria andNumLessThan(Integer value) { + addCriterion("num <", value, "num"); + return (Criteria) this; + } + + public Criteria andNumLessThanOrEqualTo(Integer value) { + addCriterion("num <=", value, "num"); + return (Criteria) this; + } + + public Criteria andNumIn(List values) { + addCriterion("num in", values, "num"); + return (Criteria) this; + } + + public Criteria andNumNotIn(List values) { + addCriterion("num not in", values, "num"); + return (Criteria) this; + } + + public Criteria andNumBetween(Integer value1, Integer value2) { + addCriterion("num between", value1, value2, "num"); + return (Criteria) this; + } + + public Criteria andNumNotBetween(Integer value1, Integer value2) { + addCriterion("num not between", value1, value2, "num"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andPosIsNull() { + addCriterion("pos is null"); + return (Criteria) this; + } + + public Criteria andPosIsNotNull() { + addCriterion("pos is not null"); + return (Criteria) this; + } + + public Criteria andPosEqualTo(Long value) { + addCriterion("pos =", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotEqualTo(Long value) { + addCriterion("pos <>", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThan(Long value) { + addCriterion("pos >", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThanOrEqualTo(Long value) { + addCriterion("pos >=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThan(Long value) { + addCriterion("pos <", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThanOrEqualTo(Long value) { + addCriterion("pos <=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosIn(List values) { + addCriterion("pos in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotIn(List values) { + addCriterion("pos not in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosBetween(Long value1, Long value2) { + addCriterion("pos between", value1, value2, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotBetween(Long value1, Long value2) { + addCriterion("pos not between", value1, value2, "pos"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNull() { + addCriterion("version_id is null"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNotNull() { + addCriterion("version_id is not null"); + return (Criteria) this; + } + + public Criteria andVersionIdEqualTo(String value) { + addCriterion("version_id =", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotEqualTo(String value) { + addCriterion("version_id <>", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThan(String value) { + addCriterion("version_id >", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThanOrEqualTo(String value) { + addCriterion("version_id >=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThan(String value) { + addCriterion("version_id <", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThanOrEqualTo(String value) { + addCriterion("version_id <=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLike(String value) { + addCriterion("version_id like", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotLike(String value) { + addCriterion("version_id not like", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdIn(List values) { + addCriterion("version_id in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotIn(List values) { + addCriterion("version_id not in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdBetween(String value1, String value2) { + addCriterion("version_id between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotBetween(String value1, String value2) { + addCriterion("version_id not between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andRefIdIsNull() { + addCriterion("ref_id is null"); + return (Criteria) this; + } + + public Criteria andRefIdIsNotNull() { + addCriterion("ref_id is not null"); + return (Criteria) this; + } + + public Criteria andRefIdEqualTo(String value) { + addCriterion("ref_id =", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotEqualTo(String value) { + addCriterion("ref_id <>", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThan(String value) { + addCriterion("ref_id >", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThanOrEqualTo(String value) { + addCriterion("ref_id >=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThan(String value) { + addCriterion("ref_id <", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThanOrEqualTo(String value) { + addCriterion("ref_id <=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLike(String value) { + addCriterion("ref_id like", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotLike(String value) { + addCriterion("ref_id not like", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdIn(List values) { + addCriterion("ref_id in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotIn(List values) { + addCriterion("ref_id not in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdBetween(String value1, String value2) { + addCriterion("ref_id between", value1, value2, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotBetween(String value1, String value2) { + addCriterion("ref_id not between", value1, value2, "refId"); + return (Criteria) this; + } + + public Criteria andLatestIsNull() { + addCriterion("latest is null"); + return (Criteria) this; + } + + public Criteria andLatestIsNotNull() { + addCriterion("latest is not null"); + return (Criteria) this; + } + + public Criteria andLatestEqualTo(Boolean value) { + addCriterion("latest =", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestNotEqualTo(Boolean value) { + addCriterion("latest <>", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestGreaterThan(Boolean value) { + addCriterion("latest >", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestGreaterThanOrEqualTo(Boolean value) { + addCriterion("latest >=", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestLessThan(Boolean value) { + addCriterion("latest <", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestLessThanOrEqualTo(Boolean value) { + addCriterion("latest <=", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestIn(List values) { + addCriterion("latest in", values, "latest"); + return (Criteria) this; + } + + public Criteria andLatestNotIn(List values) { + addCriterion("latest not in", values, "latest"); + return (Criteria) this; + } + + public Criteria andLatestBetween(Boolean value1, Boolean value2) { + addCriterion("latest between", value1, value2, "latest"); + return (Criteria) this; + } + + public Criteria andLatestNotBetween(Boolean value1, Boolean value2) { + addCriterion("latest not between", value1, value2, "latest"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 e0dbe1fb89..04d5f5ed04 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 @@ -2,33 +2,28 @@ package io.metersphere.load.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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; +import lombok.Data; -@ApiModel(value = "测试和文件的关联表") -@Table("load_test_file") @Data public class LoadTestFile implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{load_test_file.test_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{load_test_file.test_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_file.test_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试ID", required = true, allowableValues = "range[1, 64]") private String testId; + @Schema(title = "文件ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{load_test_file.file_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{load_test_file.file_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_file.file_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "文件ID", required = true, allowableValues = "range[1, 64]") private String fileId; - - @ApiModelProperty(name = "文件排序", required = true, dataType = "Integer") + @Schema(title = "文件排序", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 10]") + @NotBlank(message = "{load_test_file.sort.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 10, message = "{load_test_file.sort.length_range}", groups = {Created.class, Updated.class}) private Integer sort; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFileExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFileExample.java new file mode 100644 index 0000000000..4244a9f2b7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFileExample.java @@ -0,0 +1,400 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestFileExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTestIdIsNull() { + addCriterion("test_id is null"); + return (Criteria) this; + } + + public Criteria andTestIdIsNotNull() { + addCriterion("test_id is not null"); + return (Criteria) this; + } + + public Criteria andTestIdEqualTo(String value) { + addCriterion("test_id =", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotEqualTo(String value) { + addCriterion("test_id <>", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThan(String value) { + addCriterion("test_id >", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThanOrEqualTo(String value) { + addCriterion("test_id >=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThan(String value) { + addCriterion("test_id <", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThanOrEqualTo(String value) { + addCriterion("test_id <=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLike(String value) { + addCriterion("test_id like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotLike(String value) { + addCriterion("test_id not like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdIn(List values) { + addCriterion("test_id in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotIn(List values) { + addCriterion("test_id not in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdBetween(String value1, String value2) { + addCriterion("test_id between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotBetween(String value1, String value2) { + addCriterion("test_id not between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andFileIdIsNull() { + addCriterion("file_id is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("file_id is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(String value) { + addCriterion("file_id =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(String value) { + addCriterion("file_id <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(String value) { + addCriterion("file_id >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(String value) { + addCriterion("file_id >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(String value) { + addCriterion("file_id <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(String value) { + addCriterion("file_id <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLike(String value) { + addCriterion("file_id like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotLike(String value) { + addCriterion("file_id not like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("file_id in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("file_id not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(String value1, String value2) { + addCriterion("file_id between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(String value1, String value2) { + addCriterion("file_id not between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andSortIsNull() { + addCriterion("sort is null"); + return (Criteria) this; + } + + public Criteria andSortIsNotNull() { + addCriterion("sort is not null"); + return (Criteria) this; + } + + public Criteria andSortEqualTo(Integer value) { + addCriterion("sort =", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotEqualTo(Integer value) { + addCriterion("sort <>", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThan(Integer value) { + addCriterion("sort >", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThanOrEqualTo(Integer value) { + addCriterion("sort >=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThan(Integer value) { + addCriterion("sort <", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThanOrEqualTo(Integer value) { + addCriterion("sort <=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortIn(List values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List values) { + addCriterion("sort not in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortBetween(Integer value1, Integer value2) { + addCriterion("sort between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotBetween(Integer value1, Integer value2) { + addCriterion("sort not between", value1, value2, "sort"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 91d16026f8..1c58c6aba5 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 @@ -2,29 +2,23 @@ package io.metersphere.load.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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; +import lombok.Data; -@ApiModel(value = "性能用例关注人") -@Table("load_test_follow") @Data public class LoadTestFollow implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_follow.test_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{load_test_follow.test_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_follow.test_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试ID", required = true, allowableValues = "range[1, 50]") private String testId; + @Schema(title = "关注人ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_follow.follow_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{load_test_follow.follow_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_follow.follow_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "关注人ID", required = true, allowableValues = "range[1, 50]") private String followId; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowExample.java new file mode 100644 index 0000000000..0034341ef7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestFollowExample.java @@ -0,0 +1,340 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestFollowExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestFollowExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTestIdIsNull() { + addCriterion("test_id is null"); + return (Criteria) this; + } + + public Criteria andTestIdIsNotNull() { + addCriterion("test_id is not null"); + return (Criteria) this; + } + + public Criteria andTestIdEqualTo(String value) { + addCriterion("test_id =", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotEqualTo(String value) { + addCriterion("test_id <>", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThan(String value) { + addCriterion("test_id >", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThanOrEqualTo(String value) { + addCriterion("test_id >=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThan(String value) { + addCriterion("test_id <", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThanOrEqualTo(String value) { + addCriterion("test_id <=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLike(String value) { + addCriterion("test_id like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotLike(String value) { + addCriterion("test_id not like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdIn(List values) { + addCriterion("test_id in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotIn(List values) { + addCriterion("test_id not in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdBetween(String value1, String value2) { + addCriterion("test_id between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotBetween(String value1, String value2) { + addCriterion("test_id not between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andFollowIdIsNull() { + addCriterion("follow_id is null"); + return (Criteria) this; + } + + public Criteria andFollowIdIsNotNull() { + addCriterion("follow_id is not null"); + return (Criteria) this; + } + + public Criteria andFollowIdEqualTo(String value) { + addCriterion("follow_id =", value, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdNotEqualTo(String value) { + addCriterion("follow_id <>", value, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdGreaterThan(String value) { + addCriterion("follow_id >", value, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdGreaterThanOrEqualTo(String value) { + addCriterion("follow_id >=", value, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdLessThan(String value) { + addCriterion("follow_id <", value, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdLessThanOrEqualTo(String value) { + addCriterion("follow_id <=", value, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdLike(String value) { + addCriterion("follow_id like", value, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdNotLike(String value) { + addCriterion("follow_id not like", value, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdIn(List values) { + addCriterion("follow_id in", values, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdNotIn(List values) { + addCriterion("follow_id not in", values, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdBetween(String value1, String value2) { + addCriterion("follow_id between", value1, value2, "followId"); + return (Criteria) this; + } + + public Criteria andFollowIdNotBetween(String value1, String value2) { + addCriterion("follow_id not between", value1, value2, "followId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 38be48dfba..f8b8cd45a1 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,110 +1,94 @@ package io.metersphere.load.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "性能报告") -@Table("load_test_report") @Data public class LoadTestReport implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{load_test_report.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "报告ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @Size(min = 1, max = 50, message = "{load_test_report.test_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report.test_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试ID", required = true, allowableValues="range[1, 50]") - private String testId; - - @Size(min = 1, max = 64, message = "{load_test_report.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告名称", required = true, allowableValues="range[1, 64]") - private String name; - - - @ApiModelProperty(name = "报告描述", required = false, allowableValues="range[1, 500]") - private String description; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") - private Long updateTime; - - @Size(min = 1, max = 64, message = "{load_test_report.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "状态: Starting, Running, Error,Completed etc.", required = true, allowableValues="range[1, 64]") - private String status; - - @Size(min = 1, max = 64, message = "{load_test_report.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人(执行人)ID", required = true, allowableValues="range[1, 64]") - private String createUser; - - @Size(min = 1, max = 64, message = "{load_test_report.trigger_mode.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report.trigger_mode.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "触发方式", required = true, allowableValues="range[1, 64]") - private String triggerMode; - - - @ApiModelProperty(name = "最大并发数", required = false, allowableValues="range[1, 10]") - private String maxUsers; - - - @ApiModelProperty(name = "平均响应时间", required = false, allowableValues="range[1, 10]") - private String avgResponseTime; - - - @ApiModelProperty(name = "每秒事务数", required = false, allowableValues="range[1, 10]") - private String tps; - - @Size(min = 1, max = 50, message = "{load_test_report.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - - @Size(min = 1, max = 64, message = "{load_test_report.test_name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report.test_name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试名称", required = true, allowableValues="range[1, 64]") - private String testName; - - @Size(min = 1, max = 50, message = "{load_test_report.test_resource_pool_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report.test_resource_pool_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源池ID", required = true, allowableValues="range[1, 50]") - private String testResourcePoolId; - - - @ApiModelProperty(name = "测试开始时间", required = false, dataType = "Long") - private Long testStartTime; - - - @ApiModelProperty(name = "测试结束时间", required = false, dataType = "Long") - private Long testEndTime; - - - @ApiModelProperty(name = "执行时长", required = false, dataType = "Long") - private Long testDuration; - - @Size(min = 1, max = 50, message = "{load_test_report.version_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report.version_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "版本ID", required = true, allowableValues="range[1, 50]") - private String versionId; - - - @ApiModelProperty(name = "关联的测试计划报告ID(可以为空)", required = false, allowableValues="range[1, 50]") - private String relevanceTestPlanReportId; - + @Schema(title = "测试ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report.test_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report.test_id.length_range}", groups = {Created.class, Updated.class}) + private String testId; + + @Schema(title = "报告名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{load_test_report.name.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 64, message = "{load_test_report.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(title = "报告描述") + private String description; + + @Schema(title = "创建时间") + private Long createTime; + + @Schema(title = "更新时间") + private Long updateTime; + + @Schema(title = "状态: Starting, Running, Error,Completed etc.", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{load_test_report.status.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 64, message = "{load_test_report.status.length_range}", groups = {Created.class, Updated.class}) + private String status; + + @Schema(title = "创建人(执行人)ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{load_test_report.create_user.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 64, message = "{load_test_report.create_user.length_range}", groups = {Created.class, Updated.class}) + private String createUser; + + @Schema(title = "触发方式", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{load_test_report.trigger_mode.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 64, message = "{load_test_report.trigger_mode.length_range}", groups = {Created.class, Updated.class}) + private String triggerMode; + + @Schema(title = "最大并发数") + private String maxUsers; + + @Schema(title = "平均响应时间") + private String avgResponseTime; + + @Schema(title = "每秒事务数") + private String tps; + + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report.project_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report.project_id.length_range}", groups = {Created.class, Updated.class}) + private String projectId; + + @Schema(title = "测试名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{load_test_report.test_name.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 64, message = "{load_test_report.test_name.length_range}", groups = {Created.class, Updated.class}) + private String testName; + + @Schema(title = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report.test_resource_pool_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report.test_resource_pool_id.length_range}", groups = {Created.class, Updated.class}) + private String testResourcePoolId; + + @Schema(title = "测试开始时间") + private Long testStartTime; + + @Schema(title = "测试结束时间") + private Long testEndTime; + + @Schema(title = "执行时长") + private Long testDuration; + + @Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report.version_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report.version_id.length_range}", groups = {Created.class, Updated.class}) + private String versionId; + + @Schema(title = "关联的测试计划报告ID(可以为空)") + private String relevanceTestPlanReportId; + + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 efd5cd283a..eef4fbcaa6 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,42 +1,31 @@ package io.metersphere.load.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import lombok.EqualsAndHashCode; - +import jakarta.validation.constraints.Size; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "性能报告大字段") -@Table("load_test_report_blob") @Data -@EqualsAndHashCode(callSuper=false) public class LoadTestReportBlob implements Serializable { - private static final long serialVersionUID = 1L; - @Id + @Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") @NotBlank(message = "{load_test_report_blob.report_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]") + @Size(min = 1, max = 50, message = "{load_test_report_blob.report_id.length_range}", groups = {Created.class, Updated.class}) private String reportId; - - @ApiModelProperty(name = "压力配置", required = false, allowableValues = "range[1, ]") + @Schema(title = "压力配置") private byte[] loadConfiguration; - - @ApiModelProperty(name = "JMX内容", required = false, allowableValues = "range[1, ]") + @Schema(title = "JMX内容") private byte[] jmxContent; - - @ApiModelProperty(name = "高级配置", required = false, allowableValues = "range[1, ]") + @Schema(title = "高级配置") private byte[] advancedConfiguration; - - @ApiModelProperty(name = "环境信息 (JSON format)", required = false, allowableValues = "range[1, ]") + @Schema(title = "环境信息 (JSON format)") private byte[] envInfo; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportBlobExample.java new file mode 100644 index 0000000000..f1c76047f7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportBlobExample.java @@ -0,0 +1,270 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestReportBlobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestReportBlobExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportExample.java new file mode 100644 index 0000000000..8c853e8692 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportExample.java @@ -0,0 +1,1550 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestReportExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestReportExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTestIdIsNull() { + addCriterion("test_id is null"); + return (Criteria) this; + } + + public Criteria andTestIdIsNotNull() { + addCriterion("test_id is not null"); + return (Criteria) this; + } + + public Criteria andTestIdEqualTo(String value) { + addCriterion("test_id =", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotEqualTo(String value) { + addCriterion("test_id <>", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThan(String value) { + addCriterion("test_id >", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThanOrEqualTo(String value) { + addCriterion("test_id >=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThan(String value) { + addCriterion("test_id <", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThanOrEqualTo(String value) { + addCriterion("test_id <=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLike(String value) { + addCriterion("test_id like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotLike(String value) { + addCriterion("test_id not like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdIn(List values) { + addCriterion("test_id in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotIn(List values) { + addCriterion("test_id not in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdBetween(String value1, String value2) { + addCriterion("test_id between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotBetween(String value1, String value2) { + addCriterion("test_id not between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andTriggerModeIsNull() { + addCriterion("trigger_mode is null"); + return (Criteria) this; + } + + public Criteria andTriggerModeIsNotNull() { + addCriterion("trigger_mode is not null"); + return (Criteria) this; + } + + public Criteria andTriggerModeEqualTo(String value) { + addCriterion("trigger_mode =", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeNotEqualTo(String value) { + addCriterion("trigger_mode <>", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeGreaterThan(String value) { + addCriterion("trigger_mode >", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeGreaterThanOrEqualTo(String value) { + addCriterion("trigger_mode >=", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeLessThan(String value) { + addCriterion("trigger_mode <", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeLessThanOrEqualTo(String value) { + addCriterion("trigger_mode <=", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeLike(String value) { + addCriterion("trigger_mode like", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeNotLike(String value) { + addCriterion("trigger_mode not like", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeIn(List values) { + addCriterion("trigger_mode in", values, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeNotIn(List values) { + addCriterion("trigger_mode not in", values, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeBetween(String value1, String value2) { + addCriterion("trigger_mode between", value1, value2, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeNotBetween(String value1, String value2) { + addCriterion("trigger_mode not between", value1, value2, "triggerMode"); + return (Criteria) this; + } + + public Criteria andMaxUsersIsNull() { + addCriterion("max_users is null"); + return (Criteria) this; + } + + public Criteria andMaxUsersIsNotNull() { + addCriterion("max_users is not null"); + return (Criteria) this; + } + + public Criteria andMaxUsersEqualTo(String value) { + addCriterion("max_users =", value, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersNotEqualTo(String value) { + addCriterion("max_users <>", value, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersGreaterThan(String value) { + addCriterion("max_users >", value, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersGreaterThanOrEqualTo(String value) { + addCriterion("max_users >=", value, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersLessThan(String value) { + addCriterion("max_users <", value, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersLessThanOrEqualTo(String value) { + addCriterion("max_users <=", value, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersLike(String value) { + addCriterion("max_users like", value, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersNotLike(String value) { + addCriterion("max_users not like", value, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersIn(List values) { + addCriterion("max_users in", values, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersNotIn(List values) { + addCriterion("max_users not in", values, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersBetween(String value1, String value2) { + addCriterion("max_users between", value1, value2, "maxUsers"); + return (Criteria) this; + } + + public Criteria andMaxUsersNotBetween(String value1, String value2) { + addCriterion("max_users not between", value1, value2, "maxUsers"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeIsNull() { + addCriterion("avg_response_time is null"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeIsNotNull() { + addCriterion("avg_response_time is not null"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeEqualTo(String value) { + addCriterion("avg_response_time =", value, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeNotEqualTo(String value) { + addCriterion("avg_response_time <>", value, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeGreaterThan(String value) { + addCriterion("avg_response_time >", value, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeGreaterThanOrEqualTo(String value) { + addCriterion("avg_response_time >=", value, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeLessThan(String value) { + addCriterion("avg_response_time <", value, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeLessThanOrEqualTo(String value) { + addCriterion("avg_response_time <=", value, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeLike(String value) { + addCriterion("avg_response_time like", value, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeNotLike(String value) { + addCriterion("avg_response_time not like", value, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeIn(List values) { + addCriterion("avg_response_time in", values, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeNotIn(List values) { + addCriterion("avg_response_time not in", values, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeBetween(String value1, String value2) { + addCriterion("avg_response_time between", value1, value2, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andAvgResponseTimeNotBetween(String value1, String value2) { + addCriterion("avg_response_time not between", value1, value2, "avgResponseTime"); + return (Criteria) this; + } + + public Criteria andTpsIsNull() { + addCriterion("tps is null"); + return (Criteria) this; + } + + public Criteria andTpsIsNotNull() { + addCriterion("tps is not null"); + return (Criteria) this; + } + + public Criteria andTpsEqualTo(String value) { + addCriterion("tps =", value, "tps"); + return (Criteria) this; + } + + public Criteria andTpsNotEqualTo(String value) { + addCriterion("tps <>", value, "tps"); + return (Criteria) this; + } + + public Criteria andTpsGreaterThan(String value) { + addCriterion("tps >", value, "tps"); + return (Criteria) this; + } + + public Criteria andTpsGreaterThanOrEqualTo(String value) { + addCriterion("tps >=", value, "tps"); + return (Criteria) this; + } + + public Criteria andTpsLessThan(String value) { + addCriterion("tps <", value, "tps"); + return (Criteria) this; + } + + public Criteria andTpsLessThanOrEqualTo(String value) { + addCriterion("tps <=", value, "tps"); + return (Criteria) this; + } + + public Criteria andTpsLike(String value) { + addCriterion("tps like", value, "tps"); + return (Criteria) this; + } + + public Criteria andTpsNotLike(String value) { + addCriterion("tps not like", value, "tps"); + return (Criteria) this; + } + + public Criteria andTpsIn(List values) { + addCriterion("tps in", values, "tps"); + return (Criteria) this; + } + + public Criteria andTpsNotIn(List values) { + addCriterion("tps not in", values, "tps"); + return (Criteria) this; + } + + public Criteria andTpsBetween(String value1, String value2) { + addCriterion("tps between", value1, value2, "tps"); + return (Criteria) this; + } + + public Criteria andTpsNotBetween(String value1, String value2) { + addCriterion("tps not between", value1, value2, "tps"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andTestNameIsNull() { + addCriterion("test_name is null"); + return (Criteria) this; + } + + public Criteria andTestNameIsNotNull() { + addCriterion("test_name is not null"); + return (Criteria) this; + } + + public Criteria andTestNameEqualTo(String value) { + addCriterion("test_name =", value, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameNotEqualTo(String value) { + addCriterion("test_name <>", value, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameGreaterThan(String value) { + addCriterion("test_name >", value, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameGreaterThanOrEqualTo(String value) { + addCriterion("test_name >=", value, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameLessThan(String value) { + addCriterion("test_name <", value, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameLessThanOrEqualTo(String value) { + addCriterion("test_name <=", value, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameLike(String value) { + addCriterion("test_name like", value, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameNotLike(String value) { + addCriterion("test_name not like", value, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameIn(List values) { + addCriterion("test_name in", values, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameNotIn(List values) { + addCriterion("test_name not in", values, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameBetween(String value1, String value2) { + addCriterion("test_name between", value1, value2, "testName"); + return (Criteria) this; + } + + public Criteria andTestNameNotBetween(String value1, String value2) { + addCriterion("test_name not between", value1, value2, "testName"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIsNull() { + addCriterion("test_resource_pool_id is null"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIsNotNull() { + addCriterion("test_resource_pool_id is not null"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdEqualTo(String value) { + addCriterion("test_resource_pool_id =", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotEqualTo(String value) { + addCriterion("test_resource_pool_id <>", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdGreaterThan(String value) { + addCriterion("test_resource_pool_id >", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdGreaterThanOrEqualTo(String value) { + addCriterion("test_resource_pool_id >=", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLessThan(String value) { + addCriterion("test_resource_pool_id <", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLessThanOrEqualTo(String value) { + addCriterion("test_resource_pool_id <=", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLike(String value) { + addCriterion("test_resource_pool_id like", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotLike(String value) { + addCriterion("test_resource_pool_id not like", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIn(List values) { + addCriterion("test_resource_pool_id in", values, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotIn(List values) { + addCriterion("test_resource_pool_id not in", values, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdBetween(String value1, String value2) { + addCriterion("test_resource_pool_id between", value1, value2, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotBetween(String value1, String value2) { + addCriterion("test_resource_pool_id not between", value1, value2, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestStartTimeIsNull() { + addCriterion("test_start_time is null"); + return (Criteria) this; + } + + public Criteria andTestStartTimeIsNotNull() { + addCriterion("test_start_time is not null"); + return (Criteria) this; + } + + public Criteria andTestStartTimeEqualTo(Long value) { + addCriterion("test_start_time =", value, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestStartTimeNotEqualTo(Long value) { + addCriterion("test_start_time <>", value, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestStartTimeGreaterThan(Long value) { + addCriterion("test_start_time >", value, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestStartTimeGreaterThanOrEqualTo(Long value) { + addCriterion("test_start_time >=", value, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestStartTimeLessThan(Long value) { + addCriterion("test_start_time <", value, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestStartTimeLessThanOrEqualTo(Long value) { + addCriterion("test_start_time <=", value, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestStartTimeIn(List values) { + addCriterion("test_start_time in", values, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestStartTimeNotIn(List values) { + addCriterion("test_start_time not in", values, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestStartTimeBetween(Long value1, Long value2) { + addCriterion("test_start_time between", value1, value2, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestStartTimeNotBetween(Long value1, Long value2) { + addCriterion("test_start_time not between", value1, value2, "testStartTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeIsNull() { + addCriterion("test_end_time is null"); + return (Criteria) this; + } + + public Criteria andTestEndTimeIsNotNull() { + addCriterion("test_end_time is not null"); + return (Criteria) this; + } + + public Criteria andTestEndTimeEqualTo(Long value) { + addCriterion("test_end_time =", value, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeNotEqualTo(Long value) { + addCriterion("test_end_time <>", value, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeGreaterThan(Long value) { + addCriterion("test_end_time >", value, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeGreaterThanOrEqualTo(Long value) { + addCriterion("test_end_time >=", value, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeLessThan(Long value) { + addCriterion("test_end_time <", value, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeLessThanOrEqualTo(Long value) { + addCriterion("test_end_time <=", value, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeIn(List values) { + addCriterion("test_end_time in", values, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeNotIn(List values) { + addCriterion("test_end_time not in", values, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeBetween(Long value1, Long value2) { + addCriterion("test_end_time between", value1, value2, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestEndTimeNotBetween(Long value1, Long value2) { + addCriterion("test_end_time not between", value1, value2, "testEndTime"); + return (Criteria) this; + } + + public Criteria andTestDurationIsNull() { + addCriterion("test_duration is null"); + return (Criteria) this; + } + + public Criteria andTestDurationIsNotNull() { + addCriterion("test_duration is not null"); + return (Criteria) this; + } + + public Criteria andTestDurationEqualTo(Long value) { + addCriterion("test_duration =", value, "testDuration"); + return (Criteria) this; + } + + public Criteria andTestDurationNotEqualTo(Long value) { + addCriterion("test_duration <>", value, "testDuration"); + return (Criteria) this; + } + + public Criteria andTestDurationGreaterThan(Long value) { + addCriterion("test_duration >", value, "testDuration"); + return (Criteria) this; + } + + public Criteria andTestDurationGreaterThanOrEqualTo(Long value) { + addCriterion("test_duration >=", value, "testDuration"); + return (Criteria) this; + } + + public Criteria andTestDurationLessThan(Long value) { + addCriterion("test_duration <", value, "testDuration"); + return (Criteria) this; + } + + public Criteria andTestDurationLessThanOrEqualTo(Long value) { + addCriterion("test_duration <=", value, "testDuration"); + return (Criteria) this; + } + + public Criteria andTestDurationIn(List values) { + addCriterion("test_duration in", values, "testDuration"); + return (Criteria) this; + } + + public Criteria andTestDurationNotIn(List values) { + addCriterion("test_duration not in", values, "testDuration"); + return (Criteria) this; + } + + public Criteria andTestDurationBetween(Long value1, Long value2) { + addCriterion("test_duration between", value1, value2, "testDuration"); + return (Criteria) this; + } + + public Criteria andTestDurationNotBetween(Long value1, Long value2) { + addCriterion("test_duration not between", value1, value2, "testDuration"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNull() { + addCriterion("version_id is null"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNotNull() { + addCriterion("version_id is not null"); + return (Criteria) this; + } + + public Criteria andVersionIdEqualTo(String value) { + addCriterion("version_id =", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotEqualTo(String value) { + addCriterion("version_id <>", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThan(String value) { + addCriterion("version_id >", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThanOrEqualTo(String value) { + addCriterion("version_id >=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThan(String value) { + addCriterion("version_id <", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThanOrEqualTo(String value) { + addCriterion("version_id <=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLike(String value) { + addCriterion("version_id like", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotLike(String value) { + addCriterion("version_id not like", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdIn(List values) { + addCriterion("version_id in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotIn(List values) { + addCriterion("version_id not in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdBetween(String value1, String value2) { + addCriterion("version_id between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotBetween(String value1, String value2) { + addCriterion("version_id not between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdIsNull() { + addCriterion("relevance_test_plan_report_id is null"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdIsNotNull() { + addCriterion("relevance_test_plan_report_id is not null"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdEqualTo(String value) { + addCriterion("relevance_test_plan_report_id =", value, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdNotEqualTo(String value) { + addCriterion("relevance_test_plan_report_id <>", value, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdGreaterThan(String value) { + addCriterion("relevance_test_plan_report_id >", value, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdGreaterThanOrEqualTo(String value) { + addCriterion("relevance_test_plan_report_id >=", value, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdLessThan(String value) { + addCriterion("relevance_test_plan_report_id <", value, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdLessThanOrEqualTo(String value) { + addCriterion("relevance_test_plan_report_id <=", value, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdLike(String value) { + addCriterion("relevance_test_plan_report_id like", value, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdNotLike(String value) { + addCriterion("relevance_test_plan_report_id not like", value, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdIn(List values) { + addCriterion("relevance_test_plan_report_id in", values, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdNotIn(List values) { + addCriterion("relevance_test_plan_report_id not in", values, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdBetween(String value1, String value2) { + addCriterion("relevance_test_plan_report_id between", value1, value2, "relevanceTestPlanReportId"); + return (Criteria) this; + } + + public Criteria andRelevanceTestPlanReportIdNotBetween(String value1, String value2) { + addCriterion("relevance_test_plan_report_id not between", value1, value2, "relevanceTestPlanReportId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 54b60ff499..3e45c312f0 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,34 +1,29 @@ package io.metersphere.load.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "测试报告文件关联表") -@Table("load_test_report_file") @Data public class LoadTestReportFile implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report_file.report_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{load_test_report_file.report_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report_file.report_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告ID", required = true, allowableValues="range[1, 50]") private String reportId; - - @Size(min = 1, max = 50, message = "{load_test_report_file.file_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report_file.file_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "文件ID", required = true, allowableValues="range[1, 50]") - private String fileId; - - - @ApiModelProperty(name = "文件排序", required = true, dataType = "Integer") - private Integer sort; - + @Schema(title = "文件ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report_file.file_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report_file.file_id.length_range}", groups = {Created.class, Updated.class}) + private String fileId; + + @Schema(title = "文件排序", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 10]") + @NotBlank(message = "{load_test_report_file.sort.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 10, message = "{load_test_report_file.sort.length_range}", groups = {Created.class, Updated.class}) + private Integer sort; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportFileExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportFileExample.java new file mode 100644 index 0000000000..d337cd5cc8 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportFileExample.java @@ -0,0 +1,400 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestReportFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestReportFileExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andFileIdIsNull() { + addCriterion("file_id is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("file_id is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(String value) { + addCriterion("file_id =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(String value) { + addCriterion("file_id <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(String value) { + addCriterion("file_id >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(String value) { + addCriterion("file_id >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(String value) { + addCriterion("file_id <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(String value) { + addCriterion("file_id <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLike(String value) { + addCriterion("file_id like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotLike(String value) { + addCriterion("file_id not like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("file_id in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("file_id not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(String value1, String value2) { + addCriterion("file_id between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(String value1, String value2) { + addCriterion("file_id not between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andSortIsNull() { + addCriterion("sort is null"); + return (Criteria) this; + } + + public Criteria andSortIsNotNull() { + addCriterion("sort is not null"); + return (Criteria) this; + } + + public Criteria andSortEqualTo(Integer value) { + addCriterion("sort =", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotEqualTo(Integer value) { + addCriterion("sort <>", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThan(Integer value) { + addCriterion("sort >", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThanOrEqualTo(Integer value) { + addCriterion("sort >=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThan(Integer value) { + addCriterion("sort <", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThanOrEqualTo(Integer value) { + addCriterion("sort <=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortIn(List values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List values) { + addCriterion("sort not in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortBetween(Integer value1, Integer value2) { + addCriterion("sort between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotBetween(Integer value1, Integer value2) { + addCriterion("sort not between", value1, value2, "sort"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 61895cac95..7c283e4ad7 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,43 +1,35 @@ package io.metersphere.load.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "报告日志jmeter.log") -@Table("load_test_report_log") @Data public class LoadTestReportLog implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{load_test_report_log.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "主键无实际意义", required = true, allowableValues="range[1, 50]") + @Schema(title = "主键无实际意义", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report_log.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report_log.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @Size(min = 1, max = 50, message = "{load_test_report_log.report_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report_log.report_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告ID", required = true, allowableValues="range[1, 50]") - private String reportId; - - @Size(min = 1, max = 50, message = "{load_test_report_log.resource_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report_log.resource_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源节点ID", required = true, allowableValues="range[1, 50]") - private String resourceId; - - - @ApiModelProperty(name = "jmeter.log 内容", required = false, allowableValues="range[1, ]") - private byte[] content; - - - @ApiModelProperty(name = "日志内容分段", required = false, dataType = "Long") - private Long part; - + @Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report_log.report_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report_log.report_id.length_range}", groups = {Created.class, Updated.class}) + private String reportId; + + @Schema(title = "资源节点ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report_log.resource_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report_log.resource_id.length_range}", groups = {Created.class, Updated.class}) + private String resourceId; + + @Schema(title = "日志内容分段") + private Long part; + + @Schema(title = "jmeter.log 内容") + private byte[] content; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportLogExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportLogExample.java new file mode 100644 index 0000000000..2528b169a3 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportLogExample.java @@ -0,0 +1,470 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestReportLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestReportLogExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNull() { + addCriterion("resource_id is null"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNotNull() { + addCriterion("resource_id is not null"); + return (Criteria) this; + } + + public Criteria andResourceIdEqualTo(String value) { + addCriterion("resource_id =", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotEqualTo(String value) { + addCriterion("resource_id <>", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThan(String value) { + addCriterion("resource_id >", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThanOrEqualTo(String value) { + addCriterion("resource_id >=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThan(String value) { + addCriterion("resource_id <", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThanOrEqualTo(String value) { + addCriterion("resource_id <=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLike(String value) { + addCriterion("resource_id like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotLike(String value) { + addCriterion("resource_id not like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdIn(List values) { + addCriterion("resource_id in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotIn(List values) { + addCriterion("resource_id not in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdBetween(String value1, String value2) { + addCriterion("resource_id between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotBetween(String value1, String value2) { + addCriterion("resource_id not between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andPartIsNull() { + addCriterion("`part` is null"); + return (Criteria) this; + } + + public Criteria andPartIsNotNull() { + addCriterion("`part` is not null"); + return (Criteria) this; + } + + public Criteria andPartEqualTo(Long value) { + addCriterion("`part` =", value, "part"); + return (Criteria) this; + } + + public Criteria andPartNotEqualTo(Long value) { + addCriterion("`part` <>", value, "part"); + return (Criteria) this; + } + + public Criteria andPartGreaterThan(Long value) { + addCriterion("`part` >", value, "part"); + return (Criteria) this; + } + + public Criteria andPartGreaterThanOrEqualTo(Long value) { + addCriterion("`part` >=", value, "part"); + return (Criteria) this; + } + + public Criteria andPartLessThan(Long value) { + addCriterion("`part` <", value, "part"); + return (Criteria) this; + } + + public Criteria andPartLessThanOrEqualTo(Long value) { + addCriterion("`part` <=", value, "part"); + return (Criteria) this; + } + + public Criteria andPartIn(List values) { + addCriterion("`part` in", values, "part"); + return (Criteria) this; + } + + public Criteria andPartNotIn(List values) { + addCriterion("`part` not in", values, "part"); + return (Criteria) this; + } + + public Criteria andPartBetween(Long value1, Long value2) { + addCriterion("`part` between", value1, value2, "part"); + return (Criteria) this; + } + + public Criteria andPartNotBetween(Long value1, Long value2) { + addCriterion("`part` not between", value1, value2, "part"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 44e19df7f2..063630d705 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,39 +1,30 @@ package io.metersphere.load.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "报告结果") -@Table("load_test_report_result") @Data public class LoadTestReportResult implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{load_test_report_result.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "主键无实际意义", required = true, allowableValues = "range[1, 50]") + @Schema(title = "主键无实际意义", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report_result.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{load_test_report_result.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{load_test_report_result.report_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{load_test_report_result.report_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{load_test_report_result.report_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]") private String reportId; - - @ApiModelProperty(name = "报告项目key", required = false, allowableValues = "range[1, 64]") + @Schema(title = "报告项目key") private String reportKey; - - @ApiModelProperty(name = "报告项目内容", required = false, allowableValues = "range[1, ]") + @Schema(title = "报告项目内容") private byte[] reportValue; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultExample.java new file mode 100644 index 0000000000..d99e6c260f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultExample.java @@ -0,0 +1,410 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestReportResultExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestReportResultExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportKeyIsNull() { + addCriterion("report_key is null"); + return (Criteria) this; + } + + public Criteria andReportKeyIsNotNull() { + addCriterion("report_key is not null"); + return (Criteria) this; + } + + public Criteria andReportKeyEqualTo(String value) { + addCriterion("report_key =", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotEqualTo(String value) { + addCriterion("report_key <>", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyGreaterThan(String value) { + addCriterion("report_key >", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyGreaterThanOrEqualTo(String value) { + addCriterion("report_key >=", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyLessThan(String value) { + addCriterion("report_key <", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyLessThanOrEqualTo(String value) { + addCriterion("report_key <=", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyLike(String value) { + addCriterion("report_key like", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotLike(String value) { + addCriterion("report_key not like", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyIn(List values) { + addCriterion("report_key in", values, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotIn(List values) { + addCriterion("report_key not in", values, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyBetween(String value1, String value2) { + addCriterion("report_key between", value1, value2, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotBetween(String value1, String value2) { + addCriterion("report_key not between", value1, value2, "reportKey"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 a3828100d7..f336d73deb 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,32 +1,32 @@ package io.metersphere.load.domain; +import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import org.springframework.data.relational.core.mapping.Table; - +import jakarta.validation.constraints.Size; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "部分报告结果") -@Table("load_test_report_result_part") @Data public class LoadTestReportResultPart implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") @NotBlank(message = "{load_test_report_result_part.report_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]") + @Size(min = 1, max = 50, message = "{load_test_report_result_part.report_id.length_range}", groups = {Created.class, Updated.class}) private String reportId; + @Schema(title = "报告项目key", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") @NotBlank(message = "{load_test_report_result_part.report_key.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "报告项目key", required = true, allowableValues = "range[1, 64]") + @Size(min = 1, max = 64, message = "{load_test_report_result_part.report_key.length_range}", groups = {Created.class, Updated.class}) private String reportKey; + @Schema(title = "资源节点索引号", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 10]") @NotBlank(message = "{load_test_report_result_part.resource_index.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "资源节点索引号", required = true, dataType = "Integer") + @Size(min = 1, max = 10, message = "{load_test_report_result_part.resource_index.length_range}", groups = {Created.class, Updated.class}) private Integer resourceIndex; - - @ApiModelProperty(name = "报告项目内容", required = false, allowableValues = "range[1, ]") + @Schema(title = "报告项目内容") private byte[] reportValue; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultPartExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultPartExample.java new file mode 100644 index 0000000000..f3b8a685b5 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultPartExample.java @@ -0,0 +1,400 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestReportResultPartExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestReportResultPartExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportKeyIsNull() { + addCriterion("report_key is null"); + return (Criteria) this; + } + + public Criteria andReportKeyIsNotNull() { + addCriterion("report_key is not null"); + return (Criteria) this; + } + + public Criteria andReportKeyEqualTo(String value) { + addCriterion("report_key =", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotEqualTo(String value) { + addCriterion("report_key <>", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyGreaterThan(String value) { + addCriterion("report_key >", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyGreaterThanOrEqualTo(String value) { + addCriterion("report_key >=", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyLessThan(String value) { + addCriterion("report_key <", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyLessThanOrEqualTo(String value) { + addCriterion("report_key <=", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyLike(String value) { + addCriterion("report_key like", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotLike(String value) { + addCriterion("report_key not like", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyIn(List values) { + addCriterion("report_key in", values, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotIn(List values) { + addCriterion("report_key not in", values, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyBetween(String value1, String value2) { + addCriterion("report_key between", value1, value2, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotBetween(String value1, String value2) { + addCriterion("report_key not between", value1, value2, "reportKey"); + return (Criteria) this; + } + + public Criteria andResourceIndexIsNull() { + addCriterion("resource_index is null"); + return (Criteria) this; + } + + public Criteria andResourceIndexIsNotNull() { + addCriterion("resource_index is not null"); + return (Criteria) this; + } + + public Criteria andResourceIndexEqualTo(Integer value) { + addCriterion("resource_index =", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexNotEqualTo(Integer value) { + addCriterion("resource_index <>", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexGreaterThan(Integer value) { + addCriterion("resource_index >", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexGreaterThanOrEqualTo(Integer value) { + addCriterion("resource_index >=", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexLessThan(Integer value) { + addCriterion("resource_index <", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexLessThanOrEqualTo(Integer value) { + addCriterion("resource_index <=", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexIn(List values) { + addCriterion("resource_index in", values, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexNotIn(List values) { + addCriterion("resource_index not in", values, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexBetween(Integer value1, Integer value2) { + addCriterion("resource_index between", value1, value2, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexNotBetween(Integer value1, Integer value2) { + addCriterion("resource_index not between", value1, value2, "resourceIndex"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 b54e4ffd78..1232376d14 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,42 +1,37 @@ package io.metersphere.load.domain; +import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import org.springframework.data.relational.core.mapping.Table; - +import jakarta.validation.constraints.Size; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "即时报告结果") -@Table("load_test_report_result_realtime") @Data public class LoadTestReportResultRealtime implements Serializable { - private static final long serialVersionUID = 1L; - + @Schema(title = "报告ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") @NotBlank(message = "{load_test_report_result_realtime.report_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "报告ID", required = true, allowableValues = "range[1, 50]") + @Size(min = 1, max = 50, message = "{load_test_report_result_realtime.report_id.length_range}", groups = {Created.class, Updated.class}) private String reportId; - + @Schema(title = "报告项目key", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") @NotBlank(message = "{load_test_report_result_realtime.report_key.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "报告项目key", required = true, allowableValues = "range[1, 64]") + @Size(min = 1, max = 64, message = "{load_test_report_result_realtime.report_key.length_range}", groups = {Created.class, Updated.class}) private String reportKey; - + @Schema(title = "资源节点索引号", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 10]") @NotBlank(message = "{load_test_report_result_realtime.resource_index.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "资源节点索引号", required = true, dataType = "Integer") + @Size(min = 1, max = 10, message = "{load_test_report_result_realtime.resource_index.length_range}", groups = {Created.class, Updated.class}) private Integer resourceIndex; - + @Schema(title = "报告项目内容排序", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 10]") @NotBlank(message = "{load_test_report_result_realtime.sort.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "报告项目内容排序", required = true, dataType = "Integer") + @Size(min = 1, max = 10, message = "{load_test_report_result_realtime.sort.length_range}", groups = {Created.class, Updated.class}) private Integer sort; - - @ApiModelProperty(name = "报告项目内容", required = false, allowableValues = "range[1, ]") + @Schema(title = "报告项目内容") private byte[] reportValue; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultRealtimeExample.java b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultRealtimeExample.java new file mode 100644 index 0000000000..4980786360 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/domain/LoadTestReportResultRealtimeExample.java @@ -0,0 +1,460 @@ +package io.metersphere.load.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestReportResultRealtimeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestReportResultRealtimeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportKeyIsNull() { + addCriterion("report_key is null"); + return (Criteria) this; + } + + public Criteria andReportKeyIsNotNull() { + addCriterion("report_key is not null"); + return (Criteria) this; + } + + public Criteria andReportKeyEqualTo(String value) { + addCriterion("report_key =", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotEqualTo(String value) { + addCriterion("report_key <>", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyGreaterThan(String value) { + addCriterion("report_key >", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyGreaterThanOrEqualTo(String value) { + addCriterion("report_key >=", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyLessThan(String value) { + addCriterion("report_key <", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyLessThanOrEqualTo(String value) { + addCriterion("report_key <=", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyLike(String value) { + addCriterion("report_key like", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotLike(String value) { + addCriterion("report_key not like", value, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyIn(List values) { + addCriterion("report_key in", values, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotIn(List values) { + addCriterion("report_key not in", values, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyBetween(String value1, String value2) { + addCriterion("report_key between", value1, value2, "reportKey"); + return (Criteria) this; + } + + public Criteria andReportKeyNotBetween(String value1, String value2) { + addCriterion("report_key not between", value1, value2, "reportKey"); + return (Criteria) this; + } + + public Criteria andResourceIndexIsNull() { + addCriterion("resource_index is null"); + return (Criteria) this; + } + + public Criteria andResourceIndexIsNotNull() { + addCriterion("resource_index is not null"); + return (Criteria) this; + } + + public Criteria andResourceIndexEqualTo(Integer value) { + addCriterion("resource_index =", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexNotEqualTo(Integer value) { + addCriterion("resource_index <>", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexGreaterThan(Integer value) { + addCriterion("resource_index >", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexGreaterThanOrEqualTo(Integer value) { + addCriterion("resource_index >=", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexLessThan(Integer value) { + addCriterion("resource_index <", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexLessThanOrEqualTo(Integer value) { + addCriterion("resource_index <=", value, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexIn(List values) { + addCriterion("resource_index in", values, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexNotIn(List values) { + addCriterion("resource_index not in", values, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexBetween(Integer value1, Integer value2) { + addCriterion("resource_index between", value1, value2, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andResourceIndexNotBetween(Integer value1, Integer value2) { + addCriterion("resource_index not between", value1, value2, "resourceIndex"); + return (Criteria) this; + } + + public Criteria andSortIsNull() { + addCriterion("sort is null"); + return (Criteria) this; + } + + public Criteria andSortIsNotNull() { + addCriterion("sort is not null"); + return (Criteria) this; + } + + public Criteria andSortEqualTo(Integer value) { + addCriterion("sort =", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotEqualTo(Integer value) { + addCriterion("sort <>", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThan(Integer value) { + addCriterion("sort >", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThanOrEqualTo(Integer value) { + addCriterion("sort >=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThan(Integer value) { + addCriterion("sort <", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThanOrEqualTo(Integer value) { + addCriterion("sort <=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortIn(List values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List values) { + addCriterion("sort not in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortBetween(Integer value1, Integer value2) { + addCriterion("sort between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotBetween(Integer value1, Integer value2) { + addCriterion("sort not between", value1, value2, "sort"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestApiMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestApiMapper.java new file mode 100644 index 0000000000..3e73f829f5 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestApiMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestApi; +import io.metersphere.load.domain.LoadTestApiExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestApiMapper { + long countByExample(LoadTestApiExample example); + + int deleteByExample(LoadTestApiExample example); + + int deleteByPrimaryKey(String id); + + int insert(LoadTestApi record); + + int insertSelective(LoadTestApi record); + + List selectByExample(LoadTestApiExample example); + + LoadTestApi selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") LoadTestApi record, @Param("example") LoadTestApiExample example); + + int updateByExample(@Param("record") LoadTestApi record, @Param("example") LoadTestApiExample example); + + int updateByPrimaryKeySelective(LoadTestApi record); + + int updateByPrimaryKey(LoadTestApi record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestApiMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestApiMapper.xml new file mode 100644 index 0000000000..fb7a8ba04d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestApiMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, api_id, load_test_id, env_id, `type`, api_version + + + + + delete from load_test_api + where id = #{id,jdbcType=VARCHAR} + + + delete from load_test_api + + + + + + insert into load_test_api (id, api_id, load_test_id, + env_id, `type`, api_version + ) + values (#{id,jdbcType=VARCHAR}, #{apiId,jdbcType=VARCHAR}, #{loadTestId,jdbcType=VARCHAR}, + #{envId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{apiVersion,jdbcType=INTEGER} + ) + + + insert into load_test_api + + + id, + + + api_id, + + + load_test_id, + + + env_id, + + + `type`, + + + api_version, + + + + + #{id,jdbcType=VARCHAR}, + + + #{apiId,jdbcType=VARCHAR}, + + + #{loadTestId,jdbcType=VARCHAR}, + + + #{envId,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{apiVersion,jdbcType=INTEGER}, + + + + + + update load_test_api + + + id = #{record.id,jdbcType=VARCHAR}, + + + api_id = #{record.apiId,jdbcType=VARCHAR}, + + + load_test_id = #{record.loadTestId,jdbcType=VARCHAR}, + + + env_id = #{record.envId,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + api_version = #{record.apiVersion,jdbcType=INTEGER}, + + + + + + + + update load_test_api + set id = #{record.id,jdbcType=VARCHAR}, + api_id = #{record.apiId,jdbcType=VARCHAR}, + load_test_id = #{record.loadTestId,jdbcType=VARCHAR}, + env_id = #{record.envId,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + api_version = #{record.apiVersion,jdbcType=INTEGER} + + + + + + update load_test_api + + + api_id = #{apiId,jdbcType=VARCHAR}, + + + load_test_id = #{loadTestId,jdbcType=VARCHAR}, + + + env_id = #{envId,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + api_version = #{apiVersion,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=VARCHAR} + + + update load_test_api + set api_id = #{apiId,jdbcType=VARCHAR}, + load_test_id = #{loadTestId,jdbcType=VARCHAR}, + env_id = #{envId,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + api_version = #{apiVersion,jdbcType=INTEGER} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestBlobMapper.java new file mode 100644 index 0000000000..3f4057bcf3 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestBlobMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestBlob; +import io.metersphere.load.domain.LoadTestBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestBlobMapper { + long countByExample(LoadTestBlobExample example); + + int deleteByExample(LoadTestBlobExample example); + + int deleteByPrimaryKey(String testId); + + int insert(LoadTestBlob record); + + int insertSelective(LoadTestBlob record); + + List selectByExampleWithBLOBs(LoadTestBlobExample example); + + List selectByExample(LoadTestBlobExample example); + + LoadTestBlob selectByPrimaryKey(String testId); + + int updateByExampleSelective(@Param("record") LoadTestBlob record, @Param("example") LoadTestBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") LoadTestBlob record, @Param("example") LoadTestBlobExample example); + + int updateByExample(@Param("record") LoadTestBlob record, @Param("example") LoadTestBlobExample example); + + int updateByPrimaryKeySelective(LoadTestBlob record); + + int updateByPrimaryKeyWithBLOBs(LoadTestBlob record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestBlobMapper.xml new file mode 100644 index 0000000000..52484bb66f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestBlobMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + test_id + + + load_configuration, advanced_configuration, env_info + + + + + + delete from load_test_blob + where test_id = #{testId,jdbcType=VARCHAR} + + + delete from load_test_blob + + + + + + insert into load_test_blob (test_id, load_configuration, + advanced_configuration, env_info + ) + values (#{testId,jdbcType=VARCHAR}, #{loadConfiguration,jdbcType=LONGVARBINARY}, + #{advancedConfiguration,jdbcType=LONGVARBINARY}, #{envInfo,jdbcType=LONGVARBINARY} + ) + + + insert into load_test_blob + + + test_id, + + + load_configuration, + + + advanced_configuration, + + + env_info, + + + + + #{testId,jdbcType=VARCHAR}, + + + #{loadConfiguration,jdbcType=LONGVARBINARY}, + + + #{advancedConfiguration,jdbcType=LONGVARBINARY}, + + + #{envInfo,jdbcType=LONGVARBINARY}, + + + + + + update load_test_blob + + + test_id = #{record.testId,jdbcType=VARCHAR}, + + + load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY}, + + + advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARBINARY}, + + + env_info = #{record.envInfo,jdbcType=LONGVARBINARY}, + + + + + + + + update load_test_blob + set test_id = #{record.testId,jdbcType=VARCHAR}, + load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY}, + advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARBINARY}, + env_info = #{record.envInfo,jdbcType=LONGVARBINARY} + + + + + + update load_test_blob + set test_id = #{record.testId,jdbcType=VARCHAR} + + + + + + update load_test_blob + + + load_configuration = #{loadConfiguration,jdbcType=LONGVARBINARY}, + + + advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARBINARY}, + + + env_info = #{envInfo,jdbcType=LONGVARBINARY}, + + + where test_id = #{testId,jdbcType=VARCHAR} + + + update load_test_blob + set load_configuration = #{loadConfiguration,jdbcType=LONGVARBINARY}, + advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARBINARY}, + env_info = #{envInfo,jdbcType=LONGVARBINARY} + where test_id = #{testId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFileMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFileMapper.java new file mode 100644 index 0000000000..5e3f60097f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFileMapper.java @@ -0,0 +1,22 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestFile; +import io.metersphere.load.domain.LoadTestFileExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestFileMapper { + long countByExample(LoadTestFileExample example); + + int deleteByExample(LoadTestFileExample example); + + int insert(LoadTestFile record); + + int insertSelective(LoadTestFile record); + + List selectByExample(LoadTestFileExample example); + + int updateByExampleSelective(@Param("record") LoadTestFile record, @Param("example") LoadTestFileExample example); + + int updateByExample(@Param("record") LoadTestFile record, @Param("example") LoadTestFileExample example); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFileMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFileMapper.xml new file mode 100644 index 0000000000..5276a006f3 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFileMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + test_id, file_id, sort + + + + delete from load_test_file + + + + + + insert into load_test_file (test_id, file_id, sort + ) + values (#{testId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER} + ) + + + insert into load_test_file + + + test_id, + + + file_id, + + + sort, + + + + + #{testId,jdbcType=VARCHAR}, + + + #{fileId,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + + + + update load_test_file + + + test_id = #{record.testId,jdbcType=VARCHAR}, + + + file_id = #{record.fileId,jdbcType=VARCHAR}, + + + sort = #{record.sort,jdbcType=INTEGER}, + + + + + + + + update load_test_file + set test_id = #{record.testId,jdbcType=VARCHAR}, + file_id = #{record.fileId,jdbcType=VARCHAR}, + sort = #{record.sort,jdbcType=INTEGER} + + + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.java new file mode 100644 index 0000000000..75630412d1 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.java @@ -0,0 +1,22 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestFollow; +import io.metersphere.load.domain.LoadTestFollowExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestFollowMapper { + long countByExample(LoadTestFollowExample example); + + int deleteByExample(LoadTestFollowExample example); + + int insert(LoadTestFollow record); + + int insertSelective(LoadTestFollow record); + + List selectByExample(LoadTestFollowExample example); + + int updateByExampleSelective(@Param("record") LoadTestFollow record, @Param("example") LoadTestFollowExample example); + + int updateByExample(@Param("record") LoadTestFollow record, @Param("example") LoadTestFollowExample example); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.xml new file mode 100644 index 0000000000..565be46c5c --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestFollowMapper.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + test_id, follow_id + + + + delete from load_test_follow + + + + + + insert into load_test_follow (test_id, follow_id) + values (#{testId,jdbcType=VARCHAR}, #{followId,jdbcType=VARCHAR}) + + + insert into load_test_follow + + + test_id, + + + follow_id, + + + + + #{testId,jdbcType=VARCHAR}, + + + #{followId,jdbcType=VARCHAR}, + + + + + + update load_test_follow + + + test_id = #{record.testId,jdbcType=VARCHAR}, + + + follow_id = #{record.followId,jdbcType=VARCHAR}, + + + + + + + + update load_test_follow + set test_id = #{record.testId,jdbcType=VARCHAR}, + follow_id = #{record.followId,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestMapper.java new file mode 100644 index 0000000000..42e170be2d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTest; +import io.metersphere.load.domain.LoadTestExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestMapper { + long countByExample(LoadTestExample example); + + int deleteByExample(LoadTestExample example); + + int deleteByPrimaryKey(String id); + + int insert(LoadTest record); + + int insertSelective(LoadTest record); + + List selectByExample(LoadTestExample example); + + LoadTest selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") LoadTest record, @Param("example") LoadTestExample example); + + int updateByExample(@Param("record") LoadTest record, @Param("example") LoadTestExample example); + + int updateByPrimaryKeySelective(LoadTest record); + + int updateByPrimaryKey(LoadTest record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestMapper.xml new file mode 100644 index 0000000000..6d91335656 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestMapper.xml @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, `name`, description, create_time, update_time, `status`, test_resource_pool_id, + num, create_user, pos, version_id, ref_id, latest + + + + + delete from load_test + where id = #{id,jdbcType=VARCHAR} + + + delete from load_test + + + + + + insert into load_test (id, project_id, `name`, + description, create_time, update_time, + `status`, test_resource_pool_id, num, + create_user, pos, version_id, + ref_id, latest) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{status,jdbcType=VARCHAR}, #{testResourcePoolId,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, + #{createUser,jdbcType=VARCHAR}, #{pos,jdbcType=BIGINT}, #{versionId,jdbcType=VARCHAR}, + #{refId,jdbcType=VARCHAR}, #{latest,jdbcType=BIT}) + + + insert into load_test + + + id, + + + project_id, + + + `name`, + + + description, + + + create_time, + + + update_time, + + + `status`, + + + test_resource_pool_id, + + + num, + + + create_user, + + + pos, + + + version_id, + + + ref_id, + + + latest, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{status,jdbcType=VARCHAR}, + + + #{testResourcePoolId,jdbcType=VARCHAR}, + + + #{num,jdbcType=INTEGER}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{pos,jdbcType=BIGINT}, + + + #{versionId,jdbcType=VARCHAR}, + + + #{refId,jdbcType=VARCHAR}, + + + #{latest,jdbcType=BIT}, + + + + + + update load_test + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}, + + + num = #{record.num,jdbcType=INTEGER}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + pos = #{record.pos,jdbcType=BIGINT}, + + + version_id = #{record.versionId,jdbcType=VARCHAR}, + + + ref_id = #{record.refId,jdbcType=VARCHAR}, + + + latest = #{record.latest,jdbcType=BIT}, + + + + + + + + update load_test + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + `status` = #{record.status,jdbcType=VARCHAR}, + test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}, + num = #{record.num,jdbcType=INTEGER}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + pos = #{record.pos,jdbcType=BIGINT}, + version_id = #{record.versionId,jdbcType=VARCHAR}, + ref_id = #{record.refId,jdbcType=VARCHAR}, + latest = #{record.latest,jdbcType=BIT} + + + + + + update load_test + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}, + + + num = #{num,jdbcType=INTEGER}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + pos = #{pos,jdbcType=BIGINT}, + + + version_id = #{versionId,jdbcType=VARCHAR}, + + + ref_id = #{refId,jdbcType=VARCHAR}, + + + latest = #{latest,jdbcType=BIT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update load_test + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + `status` = #{status,jdbcType=VARCHAR}, + test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}, + num = #{num,jdbcType=INTEGER}, + create_user = #{createUser,jdbcType=VARCHAR}, + pos = #{pos,jdbcType=BIGINT}, + version_id = #{versionId,jdbcType=VARCHAR}, + ref_id = #{refId,jdbcType=VARCHAR}, + latest = #{latest,jdbcType=BIT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportBlobMapper.java new file mode 100644 index 0000000000..3f3d13d580 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportBlobMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestReportBlob; +import io.metersphere.load.domain.LoadTestReportBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestReportBlobMapper { + long countByExample(LoadTestReportBlobExample example); + + int deleteByExample(LoadTestReportBlobExample example); + + int deleteByPrimaryKey(String reportId); + + int insert(LoadTestReportBlob record); + + int insertSelective(LoadTestReportBlob record); + + List selectByExampleWithBLOBs(LoadTestReportBlobExample example); + + List selectByExample(LoadTestReportBlobExample example); + + LoadTestReportBlob selectByPrimaryKey(String reportId); + + int updateByExampleSelective(@Param("record") LoadTestReportBlob record, @Param("example") LoadTestReportBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") LoadTestReportBlob record, @Param("example") LoadTestReportBlobExample example); + + int updateByExample(@Param("record") LoadTestReportBlob record, @Param("example") LoadTestReportBlobExample example); + + int updateByPrimaryKeySelective(LoadTestReportBlob record); + + int updateByPrimaryKeyWithBLOBs(LoadTestReportBlob record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportBlobMapper.xml new file mode 100644 index 0000000000..bed91759f7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportBlobMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + report_id + + + load_configuration, jmx_content, advanced_configuration, env_info + + + + + + delete from load_test_report_blob + where report_id = #{reportId,jdbcType=VARCHAR} + + + delete from load_test_report_blob + + + + + + insert into load_test_report_blob (report_id, load_configuration, + jmx_content, advanced_configuration, + env_info) + values (#{reportId,jdbcType=VARCHAR}, #{loadConfiguration,jdbcType=LONGVARBINARY}, + #{jmxContent,jdbcType=LONGVARBINARY}, #{advancedConfiguration,jdbcType=LONGVARBINARY}, + #{envInfo,jdbcType=LONGVARBINARY}) + + + insert into load_test_report_blob + + + report_id, + + + load_configuration, + + + jmx_content, + + + advanced_configuration, + + + env_info, + + + + + #{reportId,jdbcType=VARCHAR}, + + + #{loadConfiguration,jdbcType=LONGVARBINARY}, + + + #{jmxContent,jdbcType=LONGVARBINARY}, + + + #{advancedConfiguration,jdbcType=LONGVARBINARY}, + + + #{envInfo,jdbcType=LONGVARBINARY}, + + + + + + update load_test_report_blob + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY}, + + + jmx_content = #{record.jmxContent,jdbcType=LONGVARBINARY}, + + + advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARBINARY}, + + + env_info = #{record.envInfo,jdbcType=LONGVARBINARY}, + + + + + + + + update load_test_report_blob + set report_id = #{record.reportId,jdbcType=VARCHAR}, + load_configuration = #{record.loadConfiguration,jdbcType=LONGVARBINARY}, + jmx_content = #{record.jmxContent,jdbcType=LONGVARBINARY}, + advanced_configuration = #{record.advancedConfiguration,jdbcType=LONGVARBINARY}, + env_info = #{record.envInfo,jdbcType=LONGVARBINARY} + + + + + + update load_test_report_blob + set report_id = #{record.reportId,jdbcType=VARCHAR} + + + + + + update load_test_report_blob + + + load_configuration = #{loadConfiguration,jdbcType=LONGVARBINARY}, + + + jmx_content = #{jmxContent,jdbcType=LONGVARBINARY}, + + + advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARBINARY}, + + + env_info = #{envInfo,jdbcType=LONGVARBINARY}, + + + where report_id = #{reportId,jdbcType=VARCHAR} + + + update load_test_report_blob + set load_configuration = #{loadConfiguration,jdbcType=LONGVARBINARY}, + jmx_content = #{jmxContent,jdbcType=LONGVARBINARY}, + advanced_configuration = #{advancedConfiguration,jdbcType=LONGVARBINARY}, + env_info = #{envInfo,jdbcType=LONGVARBINARY} + where report_id = #{reportId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportFileMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportFileMapper.java new file mode 100644 index 0000000000..6c823b54aa --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportFileMapper.java @@ -0,0 +1,22 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestReportFile; +import io.metersphere.load.domain.LoadTestReportFileExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestReportFileMapper { + long countByExample(LoadTestReportFileExample example); + + int deleteByExample(LoadTestReportFileExample example); + + int insert(LoadTestReportFile record); + + int insertSelective(LoadTestReportFile record); + + List selectByExample(LoadTestReportFileExample example); + + int updateByExampleSelective(@Param("record") LoadTestReportFile record, @Param("example") LoadTestReportFileExample example); + + int updateByExample(@Param("record") LoadTestReportFile record, @Param("example") LoadTestReportFileExample example); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportFileMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportFileMapper.xml new file mode 100644 index 0000000000..e384d624ea --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportFileMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + report_id, file_id, sort + + + + delete from load_test_report_file + + + + + + insert into load_test_report_file (report_id, file_id, sort + ) + values (#{reportId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER} + ) + + + insert into load_test_report_file + + + report_id, + + + file_id, + + + sort, + + + + + #{reportId,jdbcType=VARCHAR}, + + + #{fileId,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + + + + update load_test_report_file + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + file_id = #{record.fileId,jdbcType=VARCHAR}, + + + sort = #{record.sort,jdbcType=INTEGER}, + + + + + + + + update load_test_report_file + set report_id = #{record.reportId,jdbcType=VARCHAR}, + file_id = #{record.fileId,jdbcType=VARCHAR}, + sort = #{record.sort,jdbcType=INTEGER} + + + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportLogMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportLogMapper.java new file mode 100644 index 0000000000..6ef383adf1 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportLogMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestReportLog; +import io.metersphere.load.domain.LoadTestReportLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestReportLogMapper { + long countByExample(LoadTestReportLogExample example); + + int deleteByExample(LoadTestReportLogExample example); + + int deleteByPrimaryKey(String id); + + int insert(LoadTestReportLog record); + + int insertSelective(LoadTestReportLog record); + + List selectByExampleWithBLOBs(LoadTestReportLogExample example); + + List selectByExample(LoadTestReportLogExample example); + + LoadTestReportLog selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") LoadTestReportLog record, @Param("example") LoadTestReportLogExample example); + + int updateByExampleWithBLOBs(@Param("record") LoadTestReportLog record, @Param("example") LoadTestReportLogExample example); + + int updateByExample(@Param("record") LoadTestReportLog record, @Param("example") LoadTestReportLogExample example); + + int updateByPrimaryKeySelective(LoadTestReportLog record); + + int updateByPrimaryKeyWithBLOBs(LoadTestReportLog record); + + int updateByPrimaryKey(LoadTestReportLog record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportLogMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportLogMapper.xml new file mode 100644 index 0000000000..cbb280a40c --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportLogMapper.xml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, report_id, resource_id, `part` + + + content + + + + + + delete from load_test_report_log + where id = #{id,jdbcType=VARCHAR} + + + delete from load_test_report_log + + + + + + insert into load_test_report_log (id, report_id, resource_id, + `part`, content) + values (#{id,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, + #{part,jdbcType=BIGINT}, #{content,jdbcType=LONGVARBINARY}) + + + insert into load_test_report_log + + + id, + + + report_id, + + + resource_id, + + + `part`, + + + content, + + + + + #{id,jdbcType=VARCHAR}, + + + #{reportId,jdbcType=VARCHAR}, + + + #{resourceId,jdbcType=VARCHAR}, + + + #{part,jdbcType=BIGINT}, + + + #{content,jdbcType=LONGVARBINARY}, + + + + + + update load_test_report_log + + + id = #{record.id,jdbcType=VARCHAR}, + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + + + `part` = #{record.part,jdbcType=BIGINT}, + + + content = #{record.content,jdbcType=LONGVARBINARY}, + + + + + + + + update load_test_report_log + set id = #{record.id,jdbcType=VARCHAR}, + report_id = #{record.reportId,jdbcType=VARCHAR}, + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + `part` = #{record.part,jdbcType=BIGINT}, + content = #{record.content,jdbcType=LONGVARBINARY} + + + + + + update load_test_report_log + set id = #{record.id,jdbcType=VARCHAR}, + report_id = #{record.reportId,jdbcType=VARCHAR}, + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + `part` = #{record.part,jdbcType=BIGINT} + + + + + + update load_test_report_log + + + report_id = #{reportId,jdbcType=VARCHAR}, + + + resource_id = #{resourceId,jdbcType=VARCHAR}, + + + `part` = #{part,jdbcType=BIGINT}, + + + content = #{content,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update load_test_report_log + set report_id = #{reportId,jdbcType=VARCHAR}, + resource_id = #{resourceId,jdbcType=VARCHAR}, + `part` = #{part,jdbcType=BIGINT}, + content = #{content,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update load_test_report_log + set report_id = #{reportId,jdbcType=VARCHAR}, + resource_id = #{resourceId,jdbcType=VARCHAR}, + `part` = #{part,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportMapper.java new file mode 100644 index 0000000000..c74d5624e7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestReport; +import io.metersphere.load.domain.LoadTestReportExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestReportMapper { + long countByExample(LoadTestReportExample example); + + int deleteByExample(LoadTestReportExample example); + + int deleteByPrimaryKey(String id); + + int insert(LoadTestReport record); + + int insertSelective(LoadTestReport record); + + List selectByExample(LoadTestReportExample example); + + LoadTestReport selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") LoadTestReport record, @Param("example") LoadTestReportExample example); + + int updateByExample(@Param("record") LoadTestReport record, @Param("example") LoadTestReportExample example); + + int updateByPrimaryKeySelective(LoadTestReport record); + + int updateByPrimaryKey(LoadTestReport record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportMapper.xml new file mode 100644 index 0000000000..68c8de5a4c --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportMapper.xml @@ -0,0 +1,448 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, test_id, `name`, description, create_time, update_time, `status`, create_user, + trigger_mode, max_users, avg_response_time, tps, project_id, test_name, test_resource_pool_id, + test_start_time, test_end_time, test_duration, version_id, relevance_test_plan_report_id + + + + + delete from load_test_report + where id = #{id,jdbcType=VARCHAR} + + + delete from load_test_report + + + + + + insert into load_test_report (id, test_id, `name`, + description, create_time, update_time, + `status`, create_user, trigger_mode, + max_users, avg_response_time, tps, + project_id, test_name, test_resource_pool_id, + test_start_time, test_end_time, test_duration, + version_id, relevance_test_plan_report_id) + values (#{id,jdbcType=VARCHAR}, #{testId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{status,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}, + #{maxUsers,jdbcType=VARCHAR}, #{avgResponseTime,jdbcType=VARCHAR}, #{tps,jdbcType=VARCHAR}, + #{projectId,jdbcType=VARCHAR}, #{testName,jdbcType=VARCHAR}, #{testResourcePoolId,jdbcType=VARCHAR}, + #{testStartTime,jdbcType=BIGINT}, #{testEndTime,jdbcType=BIGINT}, #{testDuration,jdbcType=BIGINT}, + #{versionId,jdbcType=VARCHAR}, #{relevanceTestPlanReportId,jdbcType=VARCHAR}) + + + insert into load_test_report + + + id, + + + test_id, + + + `name`, + + + description, + + + create_time, + + + update_time, + + + `status`, + + + create_user, + + + trigger_mode, + + + max_users, + + + avg_response_time, + + + tps, + + + project_id, + + + test_name, + + + test_resource_pool_id, + + + test_start_time, + + + test_end_time, + + + test_duration, + + + version_id, + + + relevance_test_plan_report_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{testId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{status,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{triggerMode,jdbcType=VARCHAR}, + + + #{maxUsers,jdbcType=VARCHAR}, + + + #{avgResponseTime,jdbcType=VARCHAR}, + + + #{tps,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{testName,jdbcType=VARCHAR}, + + + #{testResourcePoolId,jdbcType=VARCHAR}, + + + #{testStartTime,jdbcType=BIGINT}, + + + #{testEndTime,jdbcType=BIGINT}, + + + #{testDuration,jdbcType=BIGINT}, + + + #{versionId,jdbcType=VARCHAR}, + + + #{relevanceTestPlanReportId,jdbcType=VARCHAR}, + + + + + + update load_test_report + + + id = #{record.id,jdbcType=VARCHAR}, + + + test_id = #{record.testId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + trigger_mode = #{record.triggerMode,jdbcType=VARCHAR}, + + + max_users = #{record.maxUsers,jdbcType=VARCHAR}, + + + avg_response_time = #{record.avgResponseTime,jdbcType=VARCHAR}, + + + tps = #{record.tps,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + test_name = #{record.testName,jdbcType=VARCHAR}, + + + test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}, + + + test_start_time = #{record.testStartTime,jdbcType=BIGINT}, + + + test_end_time = #{record.testEndTime,jdbcType=BIGINT}, + + + test_duration = #{record.testDuration,jdbcType=BIGINT}, + + + version_id = #{record.versionId,jdbcType=VARCHAR}, + + + relevance_test_plan_report_id = #{record.relevanceTestPlanReportId,jdbcType=VARCHAR}, + + + + + + + + update load_test_report + set id = #{record.id,jdbcType=VARCHAR}, + test_id = #{record.testId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + trigger_mode = #{record.triggerMode,jdbcType=VARCHAR}, + max_users = #{record.maxUsers,jdbcType=VARCHAR}, + avg_response_time = #{record.avgResponseTime,jdbcType=VARCHAR}, + tps = #{record.tps,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + test_name = #{record.testName,jdbcType=VARCHAR}, + test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}, + test_start_time = #{record.testStartTime,jdbcType=BIGINT}, + test_end_time = #{record.testEndTime,jdbcType=BIGINT}, + test_duration = #{record.testDuration,jdbcType=BIGINT}, + version_id = #{record.versionId,jdbcType=VARCHAR}, + relevance_test_plan_report_id = #{record.relevanceTestPlanReportId,jdbcType=VARCHAR} + + + + + + update load_test_report + + + test_id = #{testId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + trigger_mode = #{triggerMode,jdbcType=VARCHAR}, + + + max_users = #{maxUsers,jdbcType=VARCHAR}, + + + avg_response_time = #{avgResponseTime,jdbcType=VARCHAR}, + + + tps = #{tps,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + test_name = #{testName,jdbcType=VARCHAR}, + + + test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}, + + + test_start_time = #{testStartTime,jdbcType=BIGINT}, + + + test_end_time = #{testEndTime,jdbcType=BIGINT}, + + + test_duration = #{testDuration,jdbcType=BIGINT}, + + + version_id = #{versionId,jdbcType=VARCHAR}, + + + relevance_test_plan_report_id = #{relevanceTestPlanReportId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update load_test_report + set test_id = #{testId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + `status` = #{status,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + trigger_mode = #{triggerMode,jdbcType=VARCHAR}, + max_users = #{maxUsers,jdbcType=VARCHAR}, + avg_response_time = #{avgResponseTime,jdbcType=VARCHAR}, + tps = #{tps,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + test_name = #{testName,jdbcType=VARCHAR}, + test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}, + test_start_time = #{testStartTime,jdbcType=BIGINT}, + test_end_time = #{testEndTime,jdbcType=BIGINT}, + test_duration = #{testDuration,jdbcType=BIGINT}, + version_id = #{versionId,jdbcType=VARCHAR}, + relevance_test_plan_report_id = #{relevanceTestPlanReportId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultMapper.java new file mode 100644 index 0000000000..1feaf09ec4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestReportResult; +import io.metersphere.load.domain.LoadTestReportResultExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestReportResultMapper { + long countByExample(LoadTestReportResultExample example); + + int deleteByExample(LoadTestReportResultExample example); + + int deleteByPrimaryKey(String id); + + int insert(LoadTestReportResult record); + + int insertSelective(LoadTestReportResult record); + + List selectByExampleWithBLOBs(LoadTestReportResultExample example); + + List selectByExample(LoadTestReportResultExample example); + + LoadTestReportResult selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") LoadTestReportResult record, @Param("example") LoadTestReportResultExample example); + + int updateByExampleWithBLOBs(@Param("record") LoadTestReportResult record, @Param("example") LoadTestReportResultExample example); + + int updateByExample(@Param("record") LoadTestReportResult record, @Param("example") LoadTestReportResultExample example); + + int updateByPrimaryKeySelective(LoadTestReportResult record); + + int updateByPrimaryKeyWithBLOBs(LoadTestReportResult record); + + int updateByPrimaryKey(LoadTestReportResult record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultMapper.xml new file mode 100644 index 0000000000..f82778fd6f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultMapper.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, report_id, report_key + + + report_value + + + + + + delete from load_test_report_result + where id = #{id,jdbcType=VARCHAR} + + + delete from load_test_report_result + + + + + + insert into load_test_report_result (id, report_id, report_key, + report_value) + values (#{id,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{reportKey,jdbcType=VARCHAR}, + #{reportValue,jdbcType=LONGVARBINARY}) + + + insert into load_test_report_result + + + id, + + + report_id, + + + report_key, + + + report_value, + + + + + #{id,jdbcType=VARCHAR}, + + + #{reportId,jdbcType=VARCHAR}, + + + #{reportKey,jdbcType=VARCHAR}, + + + #{reportValue,jdbcType=LONGVARBINARY}, + + + + + + update load_test_report_result + + + id = #{record.id,jdbcType=VARCHAR}, + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + report_key = #{record.reportKey,jdbcType=VARCHAR}, + + + report_value = #{record.reportValue,jdbcType=LONGVARBINARY}, + + + + + + + + update load_test_report_result + set id = #{record.id,jdbcType=VARCHAR}, + report_id = #{record.reportId,jdbcType=VARCHAR}, + report_key = #{record.reportKey,jdbcType=VARCHAR}, + report_value = #{record.reportValue,jdbcType=LONGVARBINARY} + + + + + + update load_test_report_result + set id = #{record.id,jdbcType=VARCHAR}, + report_id = #{record.reportId,jdbcType=VARCHAR}, + report_key = #{record.reportKey,jdbcType=VARCHAR} + + + + + + update load_test_report_result + + + report_id = #{reportId,jdbcType=VARCHAR}, + + + report_key = #{reportKey,jdbcType=VARCHAR}, + + + report_value = #{reportValue,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update load_test_report_result + set report_id = #{reportId,jdbcType=VARCHAR}, + report_key = #{reportKey,jdbcType=VARCHAR}, + report_value = #{reportValue,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update load_test_report_result + set report_id = #{reportId,jdbcType=VARCHAR}, + report_key = #{reportKey,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultPartMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultPartMapper.java new file mode 100644 index 0000000000..0b1002d926 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultPartMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestReportResultPart; +import io.metersphere.load.domain.LoadTestReportResultPartExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestReportResultPartMapper { + long countByExample(LoadTestReportResultPartExample example); + + int deleteByExample(LoadTestReportResultPartExample example); + + int deleteByPrimaryKey(@Param("reportId") String reportId, @Param("reportKey") String reportKey, @Param("resourceIndex") Integer resourceIndex); + + int insert(LoadTestReportResultPart record); + + int insertSelective(LoadTestReportResultPart record); + + List selectByExampleWithBLOBs(LoadTestReportResultPartExample example); + + List selectByExample(LoadTestReportResultPartExample example); + + LoadTestReportResultPart selectByPrimaryKey(@Param("reportId") String reportId, @Param("reportKey") String reportKey, @Param("resourceIndex") Integer resourceIndex); + + int updateByExampleSelective(@Param("record") LoadTestReportResultPart record, @Param("example") LoadTestReportResultPartExample example); + + int updateByExampleWithBLOBs(@Param("record") LoadTestReportResultPart record, @Param("example") LoadTestReportResultPartExample example); + + int updateByExample(@Param("record") LoadTestReportResultPart record, @Param("example") LoadTestReportResultPartExample example); + + int updateByPrimaryKeySelective(LoadTestReportResultPart record); + + int updateByPrimaryKeyWithBLOBs(LoadTestReportResultPart record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultPartMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultPartMapper.xml new file mode 100644 index 0000000000..5e9afef764 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultPartMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + report_id, report_key, resource_index + + + report_value + + + + + + delete from load_test_report_result_part + where report_id = #{reportId,jdbcType=VARCHAR} + and report_key = #{reportKey,jdbcType=VARCHAR} + and resource_index = #{resourceIndex,jdbcType=INTEGER} + + + delete from load_test_report_result_part + + + + + + insert into load_test_report_result_part (report_id, report_key, resource_index, + report_value) + values (#{reportId,jdbcType=VARCHAR}, #{reportKey,jdbcType=VARCHAR}, #{resourceIndex,jdbcType=INTEGER}, + #{reportValue,jdbcType=LONGVARBINARY}) + + + insert into load_test_report_result_part + + + report_id, + + + report_key, + + + resource_index, + + + report_value, + + + + + #{reportId,jdbcType=VARCHAR}, + + + #{reportKey,jdbcType=VARCHAR}, + + + #{resourceIndex,jdbcType=INTEGER}, + + + #{reportValue,jdbcType=LONGVARBINARY}, + + + + + + update load_test_report_result_part + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + report_key = #{record.reportKey,jdbcType=VARCHAR}, + + + resource_index = #{record.resourceIndex,jdbcType=INTEGER}, + + + report_value = #{record.reportValue,jdbcType=LONGVARBINARY}, + + + + + + + + update load_test_report_result_part + set report_id = #{record.reportId,jdbcType=VARCHAR}, + report_key = #{record.reportKey,jdbcType=VARCHAR}, + resource_index = #{record.resourceIndex,jdbcType=INTEGER}, + report_value = #{record.reportValue,jdbcType=LONGVARBINARY} + + + + + + update load_test_report_result_part + set report_id = #{record.reportId,jdbcType=VARCHAR}, + report_key = #{record.reportKey,jdbcType=VARCHAR}, + resource_index = #{record.resourceIndex,jdbcType=INTEGER} + + + + + + update load_test_report_result_part + + + report_value = #{reportValue,jdbcType=LONGVARBINARY}, + + + where report_id = #{reportId,jdbcType=VARCHAR} + and report_key = #{reportKey,jdbcType=VARCHAR} + and resource_index = #{resourceIndex,jdbcType=INTEGER} + + + update load_test_report_result_part + set report_value = #{reportValue,jdbcType=LONGVARBINARY} + where report_id = #{reportId,jdbcType=VARCHAR} + and report_key = #{reportKey,jdbcType=VARCHAR} + and resource_index = #{resourceIndex,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultRealtimeMapper.java b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultRealtimeMapper.java new file mode 100644 index 0000000000..c4ecb9747b --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultRealtimeMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.load.mapper; + +import io.metersphere.load.domain.LoadTestReportResultRealtime; +import io.metersphere.load.domain.LoadTestReportResultRealtimeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LoadTestReportResultRealtimeMapper { + long countByExample(LoadTestReportResultRealtimeExample example); + + int deleteByExample(LoadTestReportResultRealtimeExample example); + + int deleteByPrimaryKey(@Param("reportId") String reportId, @Param("reportKey") String reportKey, @Param("resourceIndex") Integer resourceIndex, @Param("sort") Integer sort); + + int insert(LoadTestReportResultRealtime record); + + int insertSelective(LoadTestReportResultRealtime record); + + List selectByExampleWithBLOBs(LoadTestReportResultRealtimeExample example); + + List selectByExample(LoadTestReportResultRealtimeExample example); + + LoadTestReportResultRealtime selectByPrimaryKey(@Param("reportId") String reportId, @Param("reportKey") String reportKey, @Param("resourceIndex") Integer resourceIndex, @Param("sort") Integer sort); + + int updateByExampleSelective(@Param("record") LoadTestReportResultRealtime record, @Param("example") LoadTestReportResultRealtimeExample example); + + int updateByExampleWithBLOBs(@Param("record") LoadTestReportResultRealtime record, @Param("example") LoadTestReportResultRealtimeExample example); + + int updateByExample(@Param("record") LoadTestReportResultRealtime record, @Param("example") LoadTestReportResultRealtimeExample example); + + int updateByPrimaryKeySelective(LoadTestReportResultRealtime record); + + int updateByPrimaryKeyWithBLOBs(LoadTestReportResultRealtime record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultRealtimeMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultRealtimeMapper.xml new file mode 100644 index 0000000000..c16ff55deb --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/load/mapper/LoadTestReportResultRealtimeMapper.xml @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + report_id, report_key, resource_index, sort + + + report_value + + + + + + delete from load_test_report_result_realtime + where report_id = #{reportId,jdbcType=VARCHAR} + and report_key = #{reportKey,jdbcType=VARCHAR} + and resource_index = #{resourceIndex,jdbcType=INTEGER} + and sort = #{sort,jdbcType=INTEGER} + + + delete from load_test_report_result_realtime + + + + + + insert into load_test_report_result_realtime (report_id, report_key, resource_index, + sort, report_value) + values (#{reportId,jdbcType=VARCHAR}, #{reportKey,jdbcType=VARCHAR}, #{resourceIndex,jdbcType=INTEGER}, + #{sort,jdbcType=INTEGER}, #{reportValue,jdbcType=LONGVARBINARY}) + + + insert into load_test_report_result_realtime + + + report_id, + + + report_key, + + + resource_index, + + + sort, + + + report_value, + + + + + #{reportId,jdbcType=VARCHAR}, + + + #{reportKey,jdbcType=VARCHAR}, + + + #{resourceIndex,jdbcType=INTEGER}, + + + #{sort,jdbcType=INTEGER}, + + + #{reportValue,jdbcType=LONGVARBINARY}, + + + + + + update load_test_report_result_realtime + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + report_key = #{record.reportKey,jdbcType=VARCHAR}, + + + resource_index = #{record.resourceIndex,jdbcType=INTEGER}, + + + sort = #{record.sort,jdbcType=INTEGER}, + + + report_value = #{record.reportValue,jdbcType=LONGVARBINARY}, + + + + + + + + update load_test_report_result_realtime + set report_id = #{record.reportId,jdbcType=VARCHAR}, + report_key = #{record.reportKey,jdbcType=VARCHAR}, + resource_index = #{record.resourceIndex,jdbcType=INTEGER}, + sort = #{record.sort,jdbcType=INTEGER}, + report_value = #{record.reportValue,jdbcType=LONGVARBINARY} + + + + + + update load_test_report_result_realtime + set report_id = #{record.reportId,jdbcType=VARCHAR}, + report_key = #{record.reportKey,jdbcType=VARCHAR}, + resource_index = #{record.resourceIndex,jdbcType=INTEGER}, + sort = #{record.sort,jdbcType=INTEGER} + + + + + + update load_test_report_result_realtime + + + report_value = #{reportValue,jdbcType=LONGVARBINARY}, + + + where report_id = #{reportId,jdbcType=VARCHAR} + and report_key = #{reportKey,jdbcType=VARCHAR} + and resource_index = #{resourceIndex,jdbcType=INTEGER} + and sort = #{sort,jdbcType=INTEGER} + + + update load_test_report_result_realtime + set report_value = #{reportValue,jdbcType=LONGVARBINARY} + where report_id = #{reportId,jdbcType=VARCHAR} + and report_key = #{reportKey,jdbcType=VARCHAR} + and resource_index = #{resourceIndex,jdbcType=INTEGER} + and sort = #{sort,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlan.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlan.java index bceb73e33c..4c530eb0f4 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlan.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlan.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,80 +11,80 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划") +@Schema(title = "测试计划") @Table("test_plan") @Data public class TestPlan implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{test_plan.project_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划所属项目", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划所属项目", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String projectId; @Size(min = 1, max = 50, message = "{test_plan.parent_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan.parent_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划父ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划父ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String parentId; @Size(min = 1, max = 255, message = "{test_plan.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划名称", required = true, allowableValues = "range[1, 255]") + @Schema(title = "测试计划名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") private String name; @Size(min = 1, max = 20, message = "{test_plan.status.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划状态", required = true, allowableValues = "range[1, 20]") + @Schema(title = "测试计划状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") private String status; @Size(min = 1, max = 30, message = "{test_plan.stage.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan.stage.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试阶段", required = true, allowableValues = "range[1, 30]") + @Schema(title = "测试阶段", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 30]") private String stage; - @ApiModelProperty(name = "标签", allowableValues = "range[1, 500]") + @Schema(title = "标签", allowableValues = "range[1, 500]") private String tags; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; @Size(min = 1, max = 50, message = "{test_plan.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "更新时间", dataType = "Long") + @Schema(title = "更新时间") private Long updateTime; - @ApiModelProperty(name = "更新人", allowableValues = "range[1, 50]") + @Schema(title = "更新人", allowableValues = "range[1, 50]") private String updateUser; - @ApiModelProperty(name = "计划开始时间", dataType = "Long") + @Schema(title = "计划开始时间") private Long plannedStartTime; - @ApiModelProperty(name = "计划结束时间", dataType = "Long") + @Schema(title = "计划结束时间") private Long plannedEndTime; - @ApiModelProperty(name = "实际开始时间", dataType = "Long") + @Schema(title = "实际开始时间") private Long actualStartTime; - @ApiModelProperty(name = "实际结束时间", dataType = "Long") + @Schema(title = "实际结束时间") private Long actualEndTime; - @ApiModelProperty(name = "描述", allowableValues = "range[1, 2000]") + @Schema(title = "描述", allowableValues = "range[1, 2000]") private String description; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCase.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCase.java index e86bdca933..185abf998d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCase.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCase.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,49 +11,49 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划关联接口用例") +@Schema(title = "测试计划关联接口用例") @Table("test_plan_api_case") @Data public class TestPlanApiCase implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_api_case.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{test_plan_api_case.test_plan_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_api_case.test_plan_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; @Size(min = 1, max = 50, message = "{test_plan_api_case.api_case_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_api_case.api_case_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接口用例ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "接口用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String apiCaseId; - @ApiModelProperty(name = "环境类型", allowableValues = "range[1, 20]") + @Schema(title = "环境类型", allowableValues = "range[1, 20]") private String environmentType; - @ApiModelProperty(name = "所属环境") + @Schema(title = "所属环境") private String environment; - @ApiModelProperty(name = "环境组ID", allowableValues = "range[1, 50]") + @Schema(title = "环境组ID", allowableValues = "range[1, 50]") private String environmentGroupId; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; @Size(min = 1, max = 40, message = "{test_plan_api_case.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_api_case.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 40]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 40]") private String createUser; - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") + @Schema(title = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenario.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenario.java index eefb94635a..a94078129f 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenario.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenario.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,49 +11,49 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划关联场景用例") +@Schema(title = "测试计划关联场景用例") @Table("test_plan_api_scenario") @Data public class TestPlanApiScenario implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_api_scenario.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{test_plan_api_scenario.test_plan_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_api_scenario.test_plan_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; @Size(min = 1, max = 255, message = "{test_plan_api_scenario.api_scenario_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_api_scenario.api_scenario_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景ID", required = true, allowableValues = "range[1, 255]") + @Schema(title = "场景ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") private String apiScenarioId; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; @Size(min = 1, max = 100, message = "{test_plan_api_scenario.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_api_scenario.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") private String createUser; - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") + @Schema(title = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; - @ApiModelProperty(name = "环境类型", required = false, allowableValues = "range[1, 20]") + @Schema(title = "环境类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 20]") private String environmentType; - @ApiModelProperty(name = "所属环境", required = false, allowableValues = "range[1, ]") + @Schema(title = "所属环境", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, ]") private String environment; - @ApiModelProperty(name = "环境组ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "环境组ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 50]") private String environmentGroupId; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfig.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfig.java index a3c1392eed..0102f62e6e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfig.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfig.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,33 +11,33 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划配置") +@Schema(title = "测试计划配置") @Table("test_plan_config") @Data public class TestPlanConfig implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_config.test_plan_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; - @ApiModelProperty(name = "运行模式", required = true) + @Schema(title = "运行模式", requiredMode = Schema.RequiredMode.REQUIRED) private String runModeConfig; @Size(min = 1, max = 1, message = "{test_plan_config.automatic_status_update.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_config.automatic_status_update.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否自定更新功能用例状态", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否自定更新功能用例状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean automaticStatusUpdate; @Size(min = 1, max = 1, message = "{test_plan_config.repeat_case.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_config.repeat_case.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否允许重复添加用例", required = true, allowableValues = "range[1, 1]") + @Schema(title = "是否允许重复添加用例", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") private Boolean repeatCase; @Size(min = 1, max = 3, message = "{test_plan_config.pass_threshold.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_config.pass_threshold.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划通过阈值", required = true, dataType = "Integer") + @Schema(title = "测试计划通过阈值", requiredMode = Schema.RequiredMode.REQUIRED) private Integer passThreshold; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanExecuteRecord.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanExecuteRecord.java index da8f9257b0..178ba8722e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanExecuteRecord.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanExecuteRecord.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,57 +11,57 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划执行记录") +@Schema(title = "测试计划执行记录") @Table("test_plan_execute_record") @Data public class TestPlanExecuteRecord implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_execute_record.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "测试计划执行记录ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划执行记录ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{test_plan_execute_record.test_plan_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_execute_record.test_plan_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; @Size(min = 1, max = 255, message = "{test_plan_execute_record.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_execute_record.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "执行记录名称", required = true, allowableValues = "range[1, 255]") + @Schema(title = "执行记录名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") private String name; @Size(min = 1, max = 50, message = "{test_plan_execute_record.status.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_execute_record.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "执行状态", required = true, allowableValues = "range[1, 50]") + @Schema(title = "执行状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String status; - @ApiModelProperty(name = "触发类型", allowableValues = "range[1, 50]") + @Schema(title = "触发类型", allowableValues = "range[1, 50]") private String triggerMode; - @ApiModelProperty(name = "创建人(执行人/触发人)", allowableValues = "range[1, 50]") + @Schema(title = "创建人(执行人/触发人)", allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "创建时间(开始时间)", dataType = "Long") + @Schema(title = "创建时间(开始时间)") private Long createTime; - @ApiModelProperty(name = "结束时间", dataType = "Long") + @Schema(title = "结束时间") private Long endTime; - @ApiModelProperty(name = "用例总数量", dataType = "Integer") + @Schema(title = "用例总数量") private Integer caseCount; - @ApiModelProperty(name = "执行率", allowableValues = "range[1, 22]") + @Schema(title = "执行率", allowableValues = "range[1, 22]") private Double executeRate; - @ApiModelProperty(name = "通过率", allowableValues = "range[1, 22]") + @Schema(title = "通过率", allowableValues = "range[1, 22]") private Double passRate; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanExecuteRecordBlob.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanExecuteRecordBlob.java index db7e6d6fda..9ef0896427 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanExecuteRecordBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanExecuteRecordBlob.java @@ -1,8 +1,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import org.springframework.data.annotation.Id; @@ -10,34 +9,34 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划执行记录详细内容(拆分成下面4张表)") +@Schema(title = "测试计划执行记录详细内容(拆分成下面4张表)") @Table("test_plan_execute_record_blob") @Data public class TestPlanExecuteRecordBlob implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_execute_record_blob.test_plan_execute_record.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "测试计划执行记录ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划执行记录ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanExecuteRecord; - @ApiModelProperty(name = "执行配置") + @Schema(title = "执行配置") private String runConfig; - @ApiModelProperty(name = "接口用例执行信息") + @Schema(title = "接口用例执行信息") private String apiCases; - @ApiModelProperty(name = "场景执行信息") + @Schema(title = "场景执行信息") private String scenarios; - @ApiModelProperty(name = "性能用例执行信息") + @Schema(title = "性能用例执行信息") private String loadCases; - @ApiModelProperty(name = "UI用例执行信息") + @Schema(title = "UI用例执行信息") private String uiCases; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanFollow.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanFollow.java index 5c2e5d26d4..e137ff985d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanFollow.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanFollow.java @@ -1,25 +1,24 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划关注人") +@Schema(title = "测试计划关注人") @Table("test_plan_follow") @Data public class TestPlanFollow implements Serializable { private static final long serialVersionUID = 1L; @NotBlank(message = "{test_plan_follow.test_plan_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; @NotBlank(message = "{test_plan_follow.user_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String userId; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanFunctionCase.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanFunctionCase.java index b6d01efa17..866ce4f2f5 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanFunctionCase.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanFunctionCase.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,37 +11,37 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划关联功能用例") +@Schema(title = "测试计划关联功能用例") @Table("test_plan_function_case") @Data public class TestPlanFunctionCase implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_function_case.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{test_plan_function_case.test_plan_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_function_case.test_plan_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; @Size(min = 1, max = 50, message = "{test_plan_function_case.function_case_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_function_case.function_case_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "功能用例ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String functionCaseId; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; @Size(min = 1, max = 50, message = "{test_plan_function_case.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_function_case.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") + @Schema(title = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanLoadCase.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanLoadCase.java index 7bbd753b9b..2626a0a221 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanLoadCase.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanLoadCase.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,49 +11,49 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划关联性能测试用例") +@Schema(title = "测试计划关联性能测试用例") @Table("test_plan_load_case") @Data public class TestPlanLoadCase implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_load_case.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{test_plan_load_case.test_plan_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_load_case.test_plan_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; @Size(min = 1, max = 50, message = "{test_plan_load_case.load_case_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_load_case.load_case_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "性能用例ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "性能用例ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String loadCaseId; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; @Size(min = 1, max = 50, message = "{test_plan_load_case.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_load_case.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "所用测试资源池ID", allowableValues = "range[1, 50]") + @Schema(title = "所用测试资源池ID", allowableValues = "range[1, 50]") private String testResourcePoolId; - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") + @Schema(title = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; - @ApiModelProperty(name = "压力配置") + @Schema(title = "压力配置") private String loadConfiguration; - @ApiModelProperty(name = "高级配置") + @Schema(title = "高级配置") private String advancedConfiguration; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanPrincipal.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanPrincipal.java index 24c33ee1b7..97fbafde53 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanPrincipal.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanPrincipal.java @@ -1,25 +1,24 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import lombok.Data; import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划责任人") +@Schema(title = "测试计划责任人") @Table("test_plan_principal") @Data public class TestPlanPrincipal implements Serializable { private static final long serialVersionUID = 1L; @NotBlank(message = "{test_plan_principal.test_plan_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; @NotBlank(message = "{test_plan_principal.user_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String userId; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReport.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReport.java index 33281d836c..2d1180152a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReport.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReport.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,61 +11,61 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划报告") +@Schema(title = "测试计划报告") @Table("test_plan_report") @Data public class TestPlanReport implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_report.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{test_plan_report.test_plan_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_report.test_plan_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; @Size(min = 1, max = 128, message = "{test_plan_report.name.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_report.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告名称", required = true, allowableValues = "range[1, 128]") + @Schema(title = "报告名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 128]") private String name; @Size(min = 1, max = 50, message = "{test_plan_report.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_report.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "修改人", allowableValues = "range[1, 50]") + @Schema(title = "修改人", allowableValues = "range[1, 50]") private String updateUser; - @ApiModelProperty(name = "更新时间", dataType = "Long") + @Schema(title = "更新时间") private Long updateTime; - @ApiModelProperty(name = "开始时间", dataType = "Long") + @Schema(title = "开始时间") private Long startTime; - @ApiModelProperty(name = "结束时间", dataType = "Long") + @Schema(title = "结束时间") private Long endTime; - @ApiModelProperty(name = "用例数量", dataType = "Long") + @Schema(title = "用例数量") private Long caseCount; - @ApiModelProperty(name = "执行率", allowableValues = "range[1, 22]") + @Schema(title = "执行率", allowableValues = "range[1, 22]") private Double executeRate; - @ApiModelProperty(name = "通过率", allowableValues = "range[1, 22]") + @Schema(title = "通过率", allowableValues = "range[1, 22]") private Double passRate; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportContent.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportContent.java index a3ba459d3a..ce609024a7 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportContent.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportContent.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,27 +11,27 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划报告内容") +@Schema(title = "测试计划报告内容") @Table("test_plan_report_content") @Data public class TestPlanReportContent implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_report_content.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{test_plan_report_content.test_plan_report_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_report_content.test_plan_report_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划报告ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划报告ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanReportId; - @ApiModelProperty(name = "总结", allowableValues = "range[1, 2000]") + @Schema(title = "总结", allowableValues = "range[1, 2000]") private String summary; - @ApiModelProperty(name = "报告内容", dataType = "byte[]") + @Schema(title = "报告内容") private byte[] content; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanUiScenario.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanUiScenario.java index e64c5cdfe3..9f536da69d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanUiScenario.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanUiScenario.java @@ -2,8 +2,7 @@ package io.metersphere.plan.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -12,49 +11,49 @@ import org.springframework.data.relational.core.mapping.Table; import java.io.Serializable; -@ApiModel(value = "测试计划关联UI场景") +@Schema(title = "测试计划关联UI场景") @Table("test_plan_ui_scenario") @Data public class TestPlanUiScenario implements Serializable { private static final long serialVersionUID = 1L; @Id @NotBlank(message = "{test_plan_ui_scenario.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String id; @Size(min = 1, max = 50, message = "{test_plan_ui_scenario.test_plan_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_ui_scenario.test_plan_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "测试计划ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String testPlanId; @Size(min = 1, max = 50, message = "{test_plan_ui_scenario.ui_scenario_id.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_ui_scenario.ui_scenario_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "UI场景ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "UI场景ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String uiScenarioId; @Size(min = 1, max = 50, message = "{test_plan_ui_scenario.create_user.length_range}", groups = {Created.class, Updated.class}) @NotBlank(message = "{test_plan_ui_scenario.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") private String createUser; - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") + @Schema(title = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private Long createTime; - @ApiModelProperty(name = "排序,默认值5000", required = true, dataType = "Long") + @Schema(title = "排序,默认值5000", requiredMode = Schema.RequiredMode.REQUIRED) private Long pos; - @ApiModelProperty(name = "环境类型", allowableValues = "range[1, 20]") + @Schema(title = "环境类型", allowableValues = "range[1, 20]") private String environmentType; - @ApiModelProperty(name = "所属环境") + @Schema(title = "所属环境") private String environment; - @ApiModelProperty(name = "环境组ID", allowableValues = "range[1, 50]") + @Schema(title = "环境组ID", allowableValues = "range[1, 50]") private String environmentGroupId; 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 e460f7fe86..401a1813b8 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,62 +1,45 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "API模版表") -@Table("api_template") @Data public class ApiTemplate implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{api_template.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "模版ID", required = true, allowableValues = "range[1, 100]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{api_template.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{api_template.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{api_template.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{api_template.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{api_template.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模版名称", required = true, allowableValues = "range[1, 64]") private String name; - - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]") + @Schema(title = "描述") private String description; + @Schema(title = "是否是系统模板", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") + @NotBlank(message = "{api_template.system.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 1, message = "{api_template.system.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{api_template.system.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否是系统模版", required = true, allowableValues = "range[1, 1]") private Boolean system; - @Size(min = 1, max = 1, message = "{api_template.global.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{api_template.global.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否是全局模版", required = true, allowableValues = "range[1, 1]") - private Boolean global; - - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") - private Long updateTime; - - - @ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]") + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{api_template.create_user.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{api_template.create_user.length_range}", groups = {Created.class, Updated.class}) private String createUser; - - @ApiModelProperty(name = "项目ID", required = false, allowableValues = "range[1, 64]") + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{api_template.project_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{api_template.project_id.length_range}", groups = {Created.class, Updated.class}) private String projectId; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplateExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplateExample.java new file mode 100644 index 0000000000..b6343356f4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ApiTemplateExample.java @@ -0,0 +1,670 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ApiTemplateExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApiTemplateExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andSystemIsNull() { + addCriterion("`system` is null"); + return (Criteria) this; + } + + public Criteria andSystemIsNotNull() { + addCriterion("`system` is not null"); + return (Criteria) this; + } + + public Criteria andSystemEqualTo(Boolean value) { + addCriterion("`system` =", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotEqualTo(Boolean value) { + addCriterion("`system` <>", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThan(Boolean value) { + addCriterion("`system` >", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThanOrEqualTo(Boolean value) { + addCriterion("`system` >=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThan(Boolean value) { + addCriterion("`system` <", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThanOrEqualTo(Boolean value) { + addCriterion("`system` <=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemIn(List values) { + addCriterion("`system` in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotIn(List values) { + addCriterion("`system` not in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemBetween(Boolean value1, Boolean value2) { + addCriterion("`system` between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotBetween(Boolean value1, Boolean value2) { + addCriterion("`system` not between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 ac5b56e02c..6ce572a985 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,86 +1,63 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "自定义字段") -@Table("custom_field") @Data public class CustomField implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{custom_field.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "自定义字段ID", required = true, allowableValues="range[1, 100]") + @Schema(title = "自定义字段ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{custom_field.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 100, message = "{custom_field.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @Size(min = 1, max = 64, message = "{custom_field.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_field.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "自定义字段名称", required = true, allowableValues="range[1, 64]") - private String name; - - @Size(min = 1, max = 30, message = "{custom_field.scene.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_field.scene.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "使用场景", required = true, allowableValues="range[1, 30]") - private String scene; - - @Size(min = 1, max = 30, message = "{custom_field.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_field.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "自定义字段类型", required = true, allowableValues="range[1, 30]") - private String type; - - - - @ApiModelProperty(name = "自定义字段备注", required = false, allowableValues="range[1, 255]") - private String remark; - - - - @ApiModelProperty(name = "自定义字段选项", required = false, allowableValues="range[1, ]") - private String options; - - - - @ApiModelProperty(name = "是否是系统字段", required = false, allowableValues="range[1, ]") - private Boolean system; - - - - @ApiModelProperty(name = "是否是全局字段", required = false, allowableValues="range[1, ]") - private Boolean global; - - - - @ApiModelProperty(name = "创建时间", required = true, allowableValues="range[1, ]") - private Long createTime; - - - - @ApiModelProperty(name = "更新时间", required = true, allowableValues="range[1, ]") - private Long updateTime; - - - - @ApiModelProperty(name = "创建人", required = false, allowableValues="range[1, 100]") - private String createUser; - - - - @ApiModelProperty(name = "项目ID", required = false, allowableValues="range[1, 64]") - private String projectId; - - - - @ApiModelProperty(name = "是否关联第三方", required = true, allowableValues="range[1, ]") - private Boolean thirdPart; - + @Schema(title = "自定义字段名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{custom_field.name.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 64, message = "{custom_field.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(title = "使用场景", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 30]") + @NotBlank(message = "{custom_field.scene.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 30, message = "{custom_field.scene.length_range}", groups = {Created.class, Updated.class}) + private String scene; + + @Schema(title = "自定义字段类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 30]") + @NotBlank(message = "{custom_field.type.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 30, message = "{custom_field.type.length_range}", groups = {Created.class, Updated.class}) + private String type; + + @Schema(title = "自定义字段备注") + private String remark; + + @Schema(title = "是否是系统字段") + private Boolean system; + + @Schema(title = "是否是全局字段") + private Boolean global; + + @Schema(title = "创建时间") + private Long createTime; + + @Schema(title = "更新时间") + private Long updateTime; + + @Schema(title = "创建人") + private String createUser; + + @Schema(title = "项目ID") + private String projectId; + + @Schema(title = "是否关联第三方", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") + @NotBlank(message = "{custom_field.third_part.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 1, message = "{custom_field.third_part.length_range}", groups = {Created.class, Updated.class}) + private Boolean thirdPart; + + @Schema(title = "自定义字段选项") + private String options; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldExample.java new file mode 100644 index 0000000000..b63f2f3074 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldExample.java @@ -0,0 +1,990 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class CustomFieldExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CustomFieldExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andSceneIsNull() { + addCriterion("scene is null"); + return (Criteria) this; + } + + public Criteria andSceneIsNotNull() { + addCriterion("scene is not null"); + return (Criteria) this; + } + + public Criteria andSceneEqualTo(String value) { + addCriterion("scene =", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotEqualTo(String value) { + addCriterion("scene <>", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneGreaterThan(String value) { + addCriterion("scene >", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneGreaterThanOrEqualTo(String value) { + addCriterion("scene >=", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLessThan(String value) { + addCriterion("scene <", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLessThanOrEqualTo(String value) { + addCriterion("scene <=", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLike(String value) { + addCriterion("scene like", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotLike(String value) { + addCriterion("scene not like", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneIn(List values) { + addCriterion("scene in", values, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotIn(List values) { + addCriterion("scene not in", values, "scene"); + return (Criteria) this; + } + + public Criteria andSceneBetween(String value1, String value2) { + addCriterion("scene between", value1, value2, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotBetween(String value1, String value2) { + addCriterion("scene not between", value1, value2, "scene"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andSystemIsNull() { + addCriterion("`system` is null"); + return (Criteria) this; + } + + public Criteria andSystemIsNotNull() { + addCriterion("`system` is not null"); + return (Criteria) this; + } + + public Criteria andSystemEqualTo(Boolean value) { + addCriterion("`system` =", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotEqualTo(Boolean value) { + addCriterion("`system` <>", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThan(Boolean value) { + addCriterion("`system` >", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThanOrEqualTo(Boolean value) { + addCriterion("`system` >=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThan(Boolean value) { + addCriterion("`system` <", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThanOrEqualTo(Boolean value) { + addCriterion("`system` <=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemIn(List values) { + addCriterion("`system` in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotIn(List values) { + addCriterion("`system` not in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemBetween(Boolean value1, Boolean value2) { + addCriterion("`system` between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotBetween(Boolean value1, Boolean value2) { + addCriterion("`system` not between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andGlobalIsNull() { + addCriterion("`global` is null"); + return (Criteria) this; + } + + public Criteria andGlobalIsNotNull() { + addCriterion("`global` is not null"); + return (Criteria) this; + } + + public Criteria andGlobalEqualTo(Boolean value) { + addCriterion("`global` =", value, "global"); + return (Criteria) this; + } + + public Criteria andGlobalNotEqualTo(Boolean value) { + addCriterion("`global` <>", value, "global"); + return (Criteria) this; + } + + public Criteria andGlobalGreaterThan(Boolean value) { + addCriterion("`global` >", value, "global"); + return (Criteria) this; + } + + public Criteria andGlobalGreaterThanOrEqualTo(Boolean value) { + addCriterion("`global` >=", value, "global"); + return (Criteria) this; + } + + public Criteria andGlobalLessThan(Boolean value) { + addCriterion("`global` <", value, "global"); + return (Criteria) this; + } + + public Criteria andGlobalLessThanOrEqualTo(Boolean value) { + addCriterion("`global` <=", value, "global"); + return (Criteria) this; + } + + public Criteria andGlobalIn(List values) { + addCriterion("`global` in", values, "global"); + return (Criteria) this; + } + + public Criteria andGlobalNotIn(List values) { + addCriterion("`global` not in", values, "global"); + return (Criteria) this; + } + + public Criteria andGlobalBetween(Boolean value1, Boolean value2) { + addCriterion("`global` between", value1, value2, "global"); + return (Criteria) this; + } + + public Criteria andGlobalNotBetween(Boolean value1, Boolean value2) { + addCriterion("`global` not between", value1, value2, "global"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andThirdPartIsNull() { + addCriterion("third_part is null"); + return (Criteria) this; + } + + public Criteria andThirdPartIsNotNull() { + addCriterion("third_part is not null"); + return (Criteria) this; + } + + public Criteria andThirdPartEqualTo(Boolean value) { + addCriterion("third_part =", value, "thirdPart"); + return (Criteria) this; + } + + public Criteria andThirdPartNotEqualTo(Boolean value) { + addCriterion("third_part <>", value, "thirdPart"); + return (Criteria) this; + } + + public Criteria andThirdPartGreaterThan(Boolean value) { + addCriterion("third_part >", value, "thirdPart"); + return (Criteria) this; + } + + public Criteria andThirdPartGreaterThanOrEqualTo(Boolean value) { + addCriterion("third_part >=", value, "thirdPart"); + return (Criteria) this; + } + + public Criteria andThirdPartLessThan(Boolean value) { + addCriterion("third_part <", value, "thirdPart"); + return (Criteria) this; + } + + public Criteria andThirdPartLessThanOrEqualTo(Boolean value) { + addCriterion("third_part <=", value, "thirdPart"); + return (Criteria) this; + } + + public Criteria andThirdPartIn(List values) { + addCriterion("third_part in", values, "thirdPart"); + return (Criteria) this; + } + + public Criteria andThirdPartNotIn(List values) { + addCriterion("third_part not in", values, "thirdPart"); + return (Criteria) this; + } + + public Criteria andThirdPartBetween(Boolean value1, Boolean value2) { + addCriterion("third_part between", value1, value2, "thirdPart"); + return (Criteria) this; + } + + public Criteria andThirdPartNotBetween(Boolean value1, Boolean value2) { + addCriterion("third_part not between", value1, value2, "thirdPart"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 378bc93311..3cd4371530 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,66 +1,49 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "自定义模版") -@Table("custom_field_template") @Data public class CustomFieldTemplate implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{custom_field_template.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "自定义模版ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "自定义模版ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{custom_field_template.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{custom_field_template.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @Size(min = 1, max = 50, message = "{custom_field_template.field_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_field_template.field_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "自定义字段ID", required = true, allowableValues="range[1, 50]") - private String fieldId; - - @Size(min = 1, max = 50, message = "{custom_field_template.template_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_field_template.template_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模版ID", required = true, allowableValues="range[1, 50]") - private String templateId; - - @Size(min = 1, max = 30, message = "{custom_field_template.scene.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_field_template.scene.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "使用场景", required = true, allowableValues="range[1, 30]") - private String scene; - - - - @ApiModelProperty(name = "是否必填", required = false, allowableValues="range[1, ]") - private Boolean required; - - - - @ApiModelProperty(name = "排序字段", required = false, allowableValues="range[1, ]") - private Integer pos; - - - - @ApiModelProperty(name = "默认值", required = false, allowableValues="range[1, ]") - private byte[] defaultValue; - - - - @ApiModelProperty(name = "自定义数据", required = false, allowableValues="range[1, 255]") - private String customData; - - - - @ApiModelProperty(name = "自定义表头", required = false, allowableValues="range[1, 1]") - private String key; - + @Schema(title = "自定义字段ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{custom_field_template.field_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{custom_field_template.field_id.length_range}", groups = {Created.class, Updated.class}) + private String fieldId; + + @Schema(title = "模版ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{custom_field_template.template_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{custom_field_template.template_id.length_range}", groups = {Created.class, Updated.class}) + private String templateId; + + @Schema(title = "使用场景", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 30]") + @NotBlank(message = "{custom_field_template.scene.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 30, message = "{custom_field_template.scene.length_range}", groups = {Created.class, Updated.class}) + private String scene; + + @Schema(title = "是否必填") + private Boolean required; + + @Schema(title = "排序字段") + private Integer pos; + + @Schema(title = "自定义数据") + private String customData; + + @Schema(title = "自定义表头") + private String key; + + @Schema(title = "默认值") + private byte[] defaultValue; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplateExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplateExample.java new file mode 100644 index 0000000000..8f7817a3e6 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFieldTemplateExample.java @@ -0,0 +1,740 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class CustomFieldTemplateExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CustomFieldTemplateExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andFieldIdIsNull() { + addCriterion("field_id is null"); + return (Criteria) this; + } + + public Criteria andFieldIdIsNotNull() { + addCriterion("field_id is not null"); + return (Criteria) this; + } + + public Criteria andFieldIdEqualTo(String value) { + addCriterion("field_id =", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdNotEqualTo(String value) { + addCriterion("field_id <>", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdGreaterThan(String value) { + addCriterion("field_id >", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdGreaterThanOrEqualTo(String value) { + addCriterion("field_id >=", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdLessThan(String value) { + addCriterion("field_id <", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdLessThanOrEqualTo(String value) { + addCriterion("field_id <=", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdLike(String value) { + addCriterion("field_id like", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdNotLike(String value) { + addCriterion("field_id not like", value, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdIn(List values) { + addCriterion("field_id in", values, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdNotIn(List values) { + addCriterion("field_id not in", values, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdBetween(String value1, String value2) { + addCriterion("field_id between", value1, value2, "fieldId"); + return (Criteria) this; + } + + public Criteria andFieldIdNotBetween(String value1, String value2) { + addCriterion("field_id not between", value1, value2, "fieldId"); + return (Criteria) this; + } + + public Criteria andTemplateIdIsNull() { + addCriterion("template_id is null"); + return (Criteria) this; + } + + public Criteria andTemplateIdIsNotNull() { + addCriterion("template_id is not null"); + return (Criteria) this; + } + + public Criteria andTemplateIdEqualTo(String value) { + addCriterion("template_id =", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotEqualTo(String value) { + addCriterion("template_id <>", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThan(String value) { + addCriterion("template_id >", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThanOrEqualTo(String value) { + addCriterion("template_id >=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThan(String value) { + addCriterion("template_id <", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThanOrEqualTo(String value) { + addCriterion("template_id <=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLike(String value) { + addCriterion("template_id like", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotLike(String value) { + addCriterion("template_id not like", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdIn(List values) { + addCriterion("template_id in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotIn(List values) { + addCriterion("template_id not in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdBetween(String value1, String value2) { + addCriterion("template_id between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotBetween(String value1, String value2) { + addCriterion("template_id not between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andSceneIsNull() { + addCriterion("scene is null"); + return (Criteria) this; + } + + public Criteria andSceneIsNotNull() { + addCriterion("scene is not null"); + return (Criteria) this; + } + + public Criteria andSceneEqualTo(String value) { + addCriterion("scene =", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotEqualTo(String value) { + addCriterion("scene <>", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneGreaterThan(String value) { + addCriterion("scene >", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneGreaterThanOrEqualTo(String value) { + addCriterion("scene >=", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLessThan(String value) { + addCriterion("scene <", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLessThanOrEqualTo(String value) { + addCriterion("scene <=", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneLike(String value) { + addCriterion("scene like", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotLike(String value) { + addCriterion("scene not like", value, "scene"); + return (Criteria) this; + } + + public Criteria andSceneIn(List values) { + addCriterion("scene in", values, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotIn(List values) { + addCriterion("scene not in", values, "scene"); + return (Criteria) this; + } + + public Criteria andSceneBetween(String value1, String value2) { + addCriterion("scene between", value1, value2, "scene"); + return (Criteria) this; + } + + public Criteria andSceneNotBetween(String value1, String value2) { + addCriterion("scene not between", value1, value2, "scene"); + return (Criteria) this; + } + + public Criteria andRequiredIsNull() { + addCriterion("required is null"); + return (Criteria) this; + } + + public Criteria andRequiredIsNotNull() { + addCriterion("required is not null"); + return (Criteria) this; + } + + public Criteria andRequiredEqualTo(Boolean value) { + addCriterion("required =", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredNotEqualTo(Boolean value) { + addCriterion("required <>", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredGreaterThan(Boolean value) { + addCriterion("required >", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredGreaterThanOrEqualTo(Boolean value) { + addCriterion("required >=", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredLessThan(Boolean value) { + addCriterion("required <", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredLessThanOrEqualTo(Boolean value) { + addCriterion("required <=", value, "required"); + return (Criteria) this; + } + + public Criteria andRequiredIn(List values) { + addCriterion("required in", values, "required"); + return (Criteria) this; + } + + public Criteria andRequiredNotIn(List values) { + addCriterion("required not in", values, "required"); + return (Criteria) this; + } + + public Criteria andRequiredBetween(Boolean value1, Boolean value2) { + addCriterion("required between", value1, value2, "required"); + return (Criteria) this; + } + + public Criteria andRequiredNotBetween(Boolean value1, Boolean value2) { + addCriterion("required not between", value1, value2, "required"); + return (Criteria) this; + } + + public Criteria andPosIsNull() { + addCriterion("pos is null"); + return (Criteria) this; + } + + public Criteria andPosIsNotNull() { + addCriterion("pos is not null"); + return (Criteria) this; + } + + public Criteria andPosEqualTo(Integer value) { + addCriterion("pos =", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotEqualTo(Integer value) { + addCriterion("pos <>", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThan(Integer value) { + addCriterion("pos >", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThanOrEqualTo(Integer value) { + addCriterion("pos >=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThan(Integer value) { + addCriterion("pos <", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThanOrEqualTo(Integer value) { + addCriterion("pos <=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosIn(List values) { + addCriterion("pos in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotIn(List values) { + addCriterion("pos not in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosBetween(Integer value1, Integer value2) { + addCriterion("pos between", value1, value2, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotBetween(Integer value1, Integer value2) { + addCriterion("pos not between", value1, value2, "pos"); + return (Criteria) this; + } + + public Criteria andCustomDataIsNull() { + addCriterion("custom_data is null"); + return (Criteria) this; + } + + public Criteria andCustomDataIsNotNull() { + addCriterion("custom_data is not null"); + return (Criteria) this; + } + + public Criteria andCustomDataEqualTo(String value) { + addCriterion("custom_data =", value, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataNotEqualTo(String value) { + addCriterion("custom_data <>", value, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataGreaterThan(String value) { + addCriterion("custom_data >", value, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataGreaterThanOrEqualTo(String value) { + addCriterion("custom_data >=", value, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataLessThan(String value) { + addCriterion("custom_data <", value, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataLessThanOrEqualTo(String value) { + addCriterion("custom_data <=", value, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataLike(String value) { + addCriterion("custom_data like", value, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataNotLike(String value) { + addCriterion("custom_data not like", value, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataIn(List values) { + addCriterion("custom_data in", values, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataNotIn(List values) { + addCriterion("custom_data not in", values, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataBetween(String value1, String value2) { + addCriterion("custom_data between", value1, value2, "customData"); + return (Criteria) this; + } + + public Criteria andCustomDataNotBetween(String value1, String value2) { + addCriterion("custom_data not between", value1, value2, "customData"); + return (Criteria) this; + } + + public Criteria andKeyIsNull() { + addCriterion("`key` is null"); + return (Criteria) this; + } + + public Criteria andKeyIsNotNull() { + addCriterion("`key` is not null"); + return (Criteria) this; + } + + public Criteria andKeyEqualTo(String value) { + addCriterion("`key` =", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotEqualTo(String value) { + addCriterion("`key` <>", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyGreaterThan(String value) { + addCriterion("`key` >", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyGreaterThanOrEqualTo(String value) { + addCriterion("`key` >=", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyLessThan(String value) { + addCriterion("`key` <", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyLessThanOrEqualTo(String value) { + addCriterion("`key` <=", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyLike(String value) { + addCriterion("`key` like", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotLike(String value) { + addCriterion("`key` not like", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyIn(List values) { + addCriterion("`key` in", values, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotIn(List values) { + addCriterion("`key` not in", values, "key"); + return (Criteria) this; + } + + public Criteria andKeyBetween(String value1, String value2) { + addCriterion("`key` between", value1, value2, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotBetween(String value1, String value2) { + addCriterion("`key` not between", value1, value2, "key"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 5fe6a5b1f5..2649faae0c 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,63 +1,30 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "自定义函数-代码片段") -@Table("custom_function") @Data public class CustomFunction implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{custom_function.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{custom_function.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{custom_function.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "函数名", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{custom_function.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 255, message = "{custom_function.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_function.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "函数名", required = true, allowableValues = "range[1, 255]") private String name; - - @ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "标签") private String tags; - - @ApiModelProperty(name = "函数描述", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "函数描述") private String description; - @Size(min = 1, max = 255, message = "{custom_function.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_function.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "脚本语言类型", required = true, allowableValues = "range[1, 255]") - private String type; - - @Size(min = 1, max = 100, message = "{custom_function.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_function.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]") - private String createUser; - - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") - private Long createTime; - - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") - private Long updateTime; - - @Size(min = 1, max = 50, message = "{custom_function.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{custom_function.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "所属项目ID", required = true, allowableValues = "range[1, 50]") - private String projectId; - - + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 e2d01d24a2..7fc78e37b0 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,39 +1,28 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import lombok.EqualsAndHashCode; - +import jakarta.validation.constraints.Size; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "自定义函数-代码片段大字段") -@Table("custom_function_blob") @Data -@EqualsAndHashCode(callSuper=false) public class CustomFunctionBlob implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{custom_function_blob.function_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{custom_function_blob.function_id.length_range}", groups = {Created.class, Updated.class}) + private String functionId; - @Id - @NotBlank(message = "{custom_function_blob.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") - private String id; - - - @ApiModelProperty(name = "参数列表", required = false, allowableValues = "range[1, ]") + @Schema(title = "参数列表") private byte[] params; - - @ApiModelProperty(name = "函数体", required = false, allowableValues = "range[1, ]") + @Schema(title = "函数体") private byte[] script; - - @ApiModelProperty(name = "执行结果", required = false, allowableValues = "range[1, ]") + @Schema(title = "执行结果") private byte[] result; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionBlobExample.java new file mode 100644 index 0000000000..c2466b8216 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionBlobExample.java @@ -0,0 +1,270 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class CustomFunctionBlobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CustomFunctionBlobExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andFunctionIdIsNull() { + addCriterion("function_id is null"); + return (Criteria) this; + } + + public Criteria andFunctionIdIsNotNull() { + addCriterion("function_id is not null"); + return (Criteria) this; + } + + public Criteria andFunctionIdEqualTo(String value) { + addCriterion("function_id =", value, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdNotEqualTo(String value) { + addCriterion("function_id <>", value, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdGreaterThan(String value) { + addCriterion("function_id >", value, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdGreaterThanOrEqualTo(String value) { + addCriterion("function_id >=", value, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdLessThan(String value) { + addCriterion("function_id <", value, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdLessThanOrEqualTo(String value) { + addCriterion("function_id <=", value, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdLike(String value) { + addCriterion("function_id like", value, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdNotLike(String value) { + addCriterion("function_id not like", value, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdIn(List values) { + addCriterion("function_id in", values, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdNotIn(List values) { + addCriterion("function_id not in", values, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdBetween(String value1, String value2) { + addCriterion("function_id between", value1, value2, "functionId"); + return (Criteria) this; + } + + public Criteria andFunctionIdNotBetween(String value1, String value2) { + addCriterion("function_id not between", value1, value2, "functionId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionExample.java new file mode 100644 index 0000000000..a775ec10bf --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/CustomFunctionExample.java @@ -0,0 +1,480 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class CustomFunctionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CustomFunctionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTagsIsNull() { + addCriterion("tags is null"); + return (Criteria) this; + } + + public Criteria andTagsIsNotNull() { + addCriterion("tags is not null"); + return (Criteria) this; + } + + public Criteria andTagsEqualTo(String value) { + addCriterion("tags =", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsNotEqualTo(String value) { + addCriterion("tags <>", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsGreaterThan(String value) { + addCriterion("tags >", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsGreaterThanOrEqualTo(String value) { + addCriterion("tags >=", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsLessThan(String value) { + addCriterion("tags <", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsLessThanOrEqualTo(String value) { + addCriterion("tags <=", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsLike(String value) { + addCriterion("tags like", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsNotLike(String value) { + addCriterion("tags not like", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsIn(List values) { + addCriterion("tags in", values, "tags"); + return (Criteria) this; + } + + public Criteria andTagsNotIn(List values) { + addCriterion("tags not in", values, "tags"); + return (Criteria) this; + } + + public Criteria andTagsBetween(String value1, String value2) { + addCriterion("tags between", value1, value2, "tags"); + return (Criteria) this; + } + + public Criteria andTagsNotBetween(String value1, String value2) { + addCriterion("tags not between", value1, value2, "tags"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 55c0b42ea2..c894ed82d9 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,64 +1,53 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "误报库") -@Table("fake_error") @Data public class FakeError implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{fake_error.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "误报ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "误报ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{fake_error.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{fake_error.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{fake_error.project_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{fake_error.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{fake_error.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") private String projectId; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{fake_error.create_user.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{fake_error.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{fake_error.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 64]") private String createUser; + @Schema(title = "更新人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{fake_error.update_user.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{fake_error.update_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{fake_error.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "更新人", required = true, allowableValues = "range[1, 64]") private String updateUser; + @Schema(title = "错误码", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{fake_error.error_code.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 255, message = "{fake_error.error_code.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{fake_error.error_code.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "错误码", required = true, allowableValues = "range[1, 255]") private String errorCode; + @Schema(title = "匹配类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{fake_error.match_type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 255, message = "{fake_error.match_type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{fake_error.match_type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "匹配类型", required = true, allowableValues = "range[1, 255]") private String matchType; - - @ApiModelProperty(name = "状态", required = false, allowableValues = "range[1, 1]") + @Schema(title = "状态") private Boolean status; - + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 235eae1a73..f3c85c6b9a 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,37 +1,25 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "误报库大字段") -@Table("fake_error_blob") @Data -@EqualsAndHashCode(callSuper=false) public class FakeErrorBlob implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "Test ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{fake_error_blob.fake_error_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{fake_error_blob.fake_error_id.length_range}", groups = {Created.class, Updated.class}) + private String fakeErrorId; - @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; - - - @ApiModelProperty(name = "内容", required = false, allowableValues = "range[1, ]") + @Schema(title = "内容") private byte[] content; - - @ApiModelProperty(name = "报告内容", required = false, allowableValues = "range[1, ]") + @Schema(title = "报告内容") private byte[] description; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorBlobExample.java new file mode 100644 index 0000000000..c10689ac49 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorBlobExample.java @@ -0,0 +1,270 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FakeErrorBlobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FakeErrorBlobExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andFakeErrorIdIsNull() { + addCriterion("fake_error_id is null"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdIsNotNull() { + addCriterion("fake_error_id is not null"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdEqualTo(String value) { + addCriterion("fake_error_id =", value, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdNotEqualTo(String value) { + addCriterion("fake_error_id <>", value, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdGreaterThan(String value) { + addCriterion("fake_error_id >", value, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdGreaterThanOrEqualTo(String value) { + addCriterion("fake_error_id >=", value, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdLessThan(String value) { + addCriterion("fake_error_id <", value, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdLessThanOrEqualTo(String value) { + addCriterion("fake_error_id <=", value, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdLike(String value) { + addCriterion("fake_error_id like", value, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdNotLike(String value) { + addCriterion("fake_error_id not like", value, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdIn(List values) { + addCriterion("fake_error_id in", values, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdNotIn(List values) { + addCriterion("fake_error_id not in", values, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdBetween(String value1, String value2) { + addCriterion("fake_error_id between", value1, value2, "fakeErrorId"); + return (Criteria) this; + } + + public Criteria andFakeErrorIdNotBetween(String value1, String value2) { + addCriterion("fake_error_id not between", value1, value2, "fakeErrorId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorExample.java new file mode 100644 index 0000000000..deacade00f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FakeErrorExample.java @@ -0,0 +1,800 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FakeErrorExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FakeErrorExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNull() { + addCriterion("update_user is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNotNull() { + addCriterion("update_user is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserEqualTo(String value) { + addCriterion("update_user =", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotEqualTo(String value) { + addCriterion("update_user <>", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThan(String value) { + addCriterion("update_user >", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThanOrEqualTo(String value) { + addCriterion("update_user >=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThan(String value) { + addCriterion("update_user <", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThanOrEqualTo(String value) { + addCriterion("update_user <=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLike(String value) { + addCriterion("update_user like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotLike(String value) { + addCriterion("update_user not like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserIn(List values) { + addCriterion("update_user in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotIn(List values) { + addCriterion("update_user not in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserBetween(String value1, String value2) { + addCriterion("update_user between", value1, value2, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotBetween(String value1, String value2) { + addCriterion("update_user not between", value1, value2, "updateUser"); + return (Criteria) this; + } + + public Criteria andErrorCodeIsNull() { + addCriterion("error_code is null"); + return (Criteria) this; + } + + public Criteria andErrorCodeIsNotNull() { + addCriterion("error_code is not null"); + return (Criteria) this; + } + + public Criteria andErrorCodeEqualTo(String value) { + addCriterion("error_code =", value, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeNotEqualTo(String value) { + addCriterion("error_code <>", value, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeGreaterThan(String value) { + addCriterion("error_code >", value, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeGreaterThanOrEqualTo(String value) { + addCriterion("error_code >=", value, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeLessThan(String value) { + addCriterion("error_code <", value, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeLessThanOrEqualTo(String value) { + addCriterion("error_code <=", value, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeLike(String value) { + addCriterion("error_code like", value, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeNotLike(String value) { + addCriterion("error_code not like", value, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeIn(List values) { + addCriterion("error_code in", values, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeNotIn(List values) { + addCriterion("error_code not in", values, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeBetween(String value1, String value2) { + addCriterion("error_code between", value1, value2, "errorCode"); + return (Criteria) this; + } + + public Criteria andErrorCodeNotBetween(String value1, String value2) { + addCriterion("error_code not between", value1, value2, "errorCode"); + return (Criteria) this; + } + + public Criteria andMatchTypeIsNull() { + addCriterion("match_type is null"); + return (Criteria) this; + } + + public Criteria andMatchTypeIsNotNull() { + addCriterion("match_type is not null"); + return (Criteria) this; + } + + public Criteria andMatchTypeEqualTo(String value) { + addCriterion("match_type =", value, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeNotEqualTo(String value) { + addCriterion("match_type <>", value, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeGreaterThan(String value) { + addCriterion("match_type >", value, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeGreaterThanOrEqualTo(String value) { + addCriterion("match_type >=", value, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeLessThan(String value) { + addCriterion("match_type <", value, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeLessThanOrEqualTo(String value) { + addCriterion("match_type <=", value, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeLike(String value) { + addCriterion("match_type like", value, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeNotLike(String value) { + addCriterion("match_type not like", value, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeIn(List values) { + addCriterion("match_type in", values, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeNotIn(List values) { + addCriterion("match_type not in", values, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeBetween(String value1, String value2) { + addCriterion("match_type between", value1, value2, "matchType"); + return (Criteria) this; + } + + public Criteria andMatchTypeNotBetween(String value1, String value2) { + addCriterion("match_type not between", value1, value2, "matchType"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Boolean value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Boolean value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Boolean value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Boolean value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Boolean value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Boolean value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Boolean value1, Boolean value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Boolean value1, Boolean value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 74a4f57578..414726f404 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,97 +1,76 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "文件基础信息") -@Table("file_metadata") @Data public class FileMetadata implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{file_metadata.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "文件ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "文件ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{file_metadata.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{file_metadata.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "文件名", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 250]") + @NotBlank(message = "{file_metadata.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 250, message = "{file_metadata.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{file_metadata.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "文件名", required = true, allowableValues = "range[1, 250]") private String name; - - @ApiModelProperty(name = "文件类型", required = false, allowableValues = "range[1, 64]") + @Schema(title = "文件类型") private String type; - - @ApiModelProperty(name = "文件大小", required = true, allowableValues = "range[1, ]") + @Schema(title = "文件大小", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 19]") + @NotBlank(message = "{file_metadata.size.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 19, message = "{file_metadata.size.length_range}", groups = {Created.class, Updated.class}) private Long size; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - - @ApiModelProperty(name = "项目ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "项目ID") private String projectId; + @Schema(title = "文件存储方式", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{file_metadata.storage.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{file_metadata.storage.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{file_metadata.storage.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "文件存储方式", required = true, allowableValues = "range[1, 50]") private String storage; - - @ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]") + @Schema(title = "创建人") private String createUser; - - @ApiModelProperty(name = "修改人", required = false, allowableValues = "range[1, 100]") + @Schema(title = "修改人") private String updateUser; - - @ApiModelProperty(name = "标签", required = false, allowableValues = "range[1, 2000]") + @Schema(title = "标签") private String tags; - - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]") + @Schema(title = "描述") private String description; - - @ApiModelProperty(name = "文件所属模块", required = false, allowableValues = "range[1, 50]") + @Schema(title = "文件所属模块") private String moduleId; - - @ApiModelProperty(name = "是否加载jar(开启后用于接口测试执行时使用)", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否加载jar(开启后用于接口测试执行时使用)") private Boolean loadJar; - - @ApiModelProperty(name = "文件存储路径", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "文件存储路径") private String path; - - @ApiModelProperty(name = "资源作用范围,主要兼容2.1版本前的历史数据,后续版本不再产生数据", required = false, allowableValues = "range[1, 50]") + @Schema(title = "资源作用范围,主要兼容2.1版本前的历史数据,后续版本不再产生数据") private String resourceType; - - @ApiModelProperty(name = "是否是最新版", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否是最新版") private Boolean latest; - - @ApiModelProperty(name = "同版本数据关联的ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "同版本数据关联的ID") private String refId; - + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 7bc455e9ef..ea1a3bf043 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,33 +1,22 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "文件基础信息大字段") -@Table("file_metadata_blob") @Data -@EqualsAndHashCode(callSuper=false) public class FileMetadataBlob implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "文件ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{file_metadata_blob.file_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 255, message = "{file_metadata_blob.file_id.length_range}", groups = {Created.class, Updated.class}) + private String fileId; - @Id - @NotBlank(message = "{file_metadata_blob.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "文件ID", required = true, allowableValues = "range[1, 255]") - private String id; - - - @ApiModelProperty(name = "储存库", required = false, allowableValues = "range[1, ]") + @Schema(title = "储存库") private byte[] gitInfo; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataBlobExample.java new file mode 100644 index 0000000000..4864ab3371 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataBlobExample.java @@ -0,0 +1,270 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FileMetadataBlobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FileMetadataBlobExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andFileIdIsNull() { + addCriterion("file_id is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("file_id is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(String value) { + addCriterion("file_id =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(String value) { + addCriterion("file_id <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(String value) { + addCriterion("file_id >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(String value) { + addCriterion("file_id >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(String value) { + addCriterion("file_id <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(String value) { + addCriterion("file_id <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLike(String value) { + addCriterion("file_id like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotLike(String value) { + addCriterion("file_id not like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("file_id in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("file_id not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(String value1, String value2) { + addCriterion("file_id between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(String value1, String value2) { + addCriterion("file_id not between", value1, value2, "fileId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataExample.java new file mode 100644 index 0000000000..e509af215a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileMetadataExample.java @@ -0,0 +1,1410 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FileMetadataExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FileMetadataExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andSizeIsNull() { + addCriterion("`size` is null"); + return (Criteria) this; + } + + public Criteria andSizeIsNotNull() { + addCriterion("`size` is not null"); + return (Criteria) this; + } + + public Criteria andSizeEqualTo(Long value) { + addCriterion("`size` =", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotEqualTo(Long value) { + addCriterion("`size` <>", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThan(Long value) { + addCriterion("`size` >", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThanOrEqualTo(Long value) { + addCriterion("`size` >=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThan(Long value) { + addCriterion("`size` <", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThanOrEqualTo(Long value) { + addCriterion("`size` <=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeIn(List values) { + addCriterion("`size` in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotIn(List values) { + addCriterion("`size` not in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeBetween(Long value1, Long value2) { + addCriterion("`size` between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotBetween(Long value1, Long value2) { + addCriterion("`size` not between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andStorageIsNull() { + addCriterion("`storage` is null"); + return (Criteria) this; + } + + public Criteria andStorageIsNotNull() { + addCriterion("`storage` is not null"); + return (Criteria) this; + } + + public Criteria andStorageEqualTo(String value) { + addCriterion("`storage` =", value, "storage"); + return (Criteria) this; + } + + public Criteria andStorageNotEqualTo(String value) { + addCriterion("`storage` <>", value, "storage"); + return (Criteria) this; + } + + public Criteria andStorageGreaterThan(String value) { + addCriterion("`storage` >", value, "storage"); + return (Criteria) this; + } + + public Criteria andStorageGreaterThanOrEqualTo(String value) { + addCriterion("`storage` >=", value, "storage"); + return (Criteria) this; + } + + public Criteria andStorageLessThan(String value) { + addCriterion("`storage` <", value, "storage"); + return (Criteria) this; + } + + public Criteria andStorageLessThanOrEqualTo(String value) { + addCriterion("`storage` <=", value, "storage"); + return (Criteria) this; + } + + public Criteria andStorageLike(String value) { + addCriterion("`storage` like", value, "storage"); + return (Criteria) this; + } + + public Criteria andStorageNotLike(String value) { + addCriterion("`storage` not like", value, "storage"); + return (Criteria) this; + } + + public Criteria andStorageIn(List values) { + addCriterion("`storage` in", values, "storage"); + return (Criteria) this; + } + + public Criteria andStorageNotIn(List values) { + addCriterion("`storage` not in", values, "storage"); + return (Criteria) this; + } + + public Criteria andStorageBetween(String value1, String value2) { + addCriterion("`storage` between", value1, value2, "storage"); + return (Criteria) this; + } + + public Criteria andStorageNotBetween(String value1, String value2) { + addCriterion("`storage` not between", value1, value2, "storage"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNull() { + addCriterion("update_user is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNotNull() { + addCriterion("update_user is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserEqualTo(String value) { + addCriterion("update_user =", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotEqualTo(String value) { + addCriterion("update_user <>", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThan(String value) { + addCriterion("update_user >", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThanOrEqualTo(String value) { + addCriterion("update_user >=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThan(String value) { + addCriterion("update_user <", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThanOrEqualTo(String value) { + addCriterion("update_user <=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLike(String value) { + addCriterion("update_user like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotLike(String value) { + addCriterion("update_user not like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserIn(List values) { + addCriterion("update_user in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotIn(List values) { + addCriterion("update_user not in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserBetween(String value1, String value2) { + addCriterion("update_user between", value1, value2, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotBetween(String value1, String value2) { + addCriterion("update_user not between", value1, value2, "updateUser"); + return (Criteria) this; + } + + public Criteria andTagsIsNull() { + addCriterion("tags is null"); + return (Criteria) this; + } + + public Criteria andTagsIsNotNull() { + addCriterion("tags is not null"); + return (Criteria) this; + } + + public Criteria andTagsEqualTo(String value) { + addCriterion("tags =", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsNotEqualTo(String value) { + addCriterion("tags <>", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsGreaterThan(String value) { + addCriterion("tags >", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsGreaterThanOrEqualTo(String value) { + addCriterion("tags >=", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsLessThan(String value) { + addCriterion("tags <", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsLessThanOrEqualTo(String value) { + addCriterion("tags <=", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsLike(String value) { + addCriterion("tags like", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsNotLike(String value) { + addCriterion("tags not like", value, "tags"); + return (Criteria) this; + } + + public Criteria andTagsIn(List values) { + addCriterion("tags in", values, "tags"); + return (Criteria) this; + } + + public Criteria andTagsNotIn(List values) { + addCriterion("tags not in", values, "tags"); + return (Criteria) this; + } + + public Criteria andTagsBetween(String value1, String value2) { + addCriterion("tags between", value1, value2, "tags"); + return (Criteria) this; + } + + public Criteria andTagsNotBetween(String value1, String value2) { + addCriterion("tags not between", value1, value2, "tags"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andModuleIdIsNull() { + addCriterion("module_id is null"); + return (Criteria) this; + } + + public Criteria andModuleIdIsNotNull() { + addCriterion("module_id is not null"); + return (Criteria) this; + } + + public Criteria andModuleIdEqualTo(String value) { + addCriterion("module_id =", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotEqualTo(String value) { + addCriterion("module_id <>", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThan(String value) { + addCriterion("module_id >", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThanOrEqualTo(String value) { + addCriterion("module_id >=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThan(String value) { + addCriterion("module_id <", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThanOrEqualTo(String value) { + addCriterion("module_id <=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLike(String value) { + addCriterion("module_id like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotLike(String value) { + addCriterion("module_id not like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdIn(List values) { + addCriterion("module_id in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotIn(List values) { + addCriterion("module_id not in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdBetween(String value1, String value2) { + addCriterion("module_id between", value1, value2, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotBetween(String value1, String value2) { + addCriterion("module_id not between", value1, value2, "moduleId"); + return (Criteria) this; + } + + public Criteria andLoadJarIsNull() { + addCriterion("load_jar is null"); + return (Criteria) this; + } + + public Criteria andLoadJarIsNotNull() { + addCriterion("load_jar is not null"); + return (Criteria) this; + } + + public Criteria andLoadJarEqualTo(Boolean value) { + addCriterion("load_jar =", value, "loadJar"); + return (Criteria) this; + } + + public Criteria andLoadJarNotEqualTo(Boolean value) { + addCriterion("load_jar <>", value, "loadJar"); + return (Criteria) this; + } + + public Criteria andLoadJarGreaterThan(Boolean value) { + addCriterion("load_jar >", value, "loadJar"); + return (Criteria) this; + } + + public Criteria andLoadJarGreaterThanOrEqualTo(Boolean value) { + addCriterion("load_jar >=", value, "loadJar"); + return (Criteria) this; + } + + public Criteria andLoadJarLessThan(Boolean value) { + addCriterion("load_jar <", value, "loadJar"); + return (Criteria) this; + } + + public Criteria andLoadJarLessThanOrEqualTo(Boolean value) { + addCriterion("load_jar <=", value, "loadJar"); + return (Criteria) this; + } + + public Criteria andLoadJarIn(List values) { + addCriterion("load_jar in", values, "loadJar"); + return (Criteria) this; + } + + public Criteria andLoadJarNotIn(List values) { + addCriterion("load_jar not in", values, "loadJar"); + return (Criteria) this; + } + + public Criteria andLoadJarBetween(Boolean value1, Boolean value2) { + addCriterion("load_jar between", value1, value2, "loadJar"); + return (Criteria) this; + } + + public Criteria andLoadJarNotBetween(Boolean value1, Boolean value2) { + addCriterion("load_jar not between", value1, value2, "loadJar"); + return (Criteria) this; + } + + public Criteria andPathIsNull() { + addCriterion("`path` is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("`path` is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("`path` =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("`path` <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("`path` >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("`path` >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("`path` <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("`path` <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("`path` like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("`path` not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("`path` in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("`path` not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("`path` between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("`path` not between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andResourceTypeIsNull() { + addCriterion("resource_type is null"); + return (Criteria) this; + } + + public Criteria andResourceTypeIsNotNull() { + addCriterion("resource_type is not null"); + return (Criteria) this; + } + + public Criteria andResourceTypeEqualTo(String value) { + addCriterion("resource_type =", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotEqualTo(String value) { + addCriterion("resource_type <>", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeGreaterThan(String value) { + addCriterion("resource_type >", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeGreaterThanOrEqualTo(String value) { + addCriterion("resource_type >=", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLessThan(String value) { + addCriterion("resource_type <", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLessThanOrEqualTo(String value) { + addCriterion("resource_type <=", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLike(String value) { + addCriterion("resource_type like", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotLike(String value) { + addCriterion("resource_type not like", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeIn(List values) { + addCriterion("resource_type in", values, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotIn(List values) { + addCriterion("resource_type not in", values, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeBetween(String value1, String value2) { + addCriterion("resource_type between", value1, value2, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotBetween(String value1, String value2) { + addCriterion("resource_type not between", value1, value2, "resourceType"); + return (Criteria) this; + } + + public Criteria andLatestIsNull() { + addCriterion("latest is null"); + return (Criteria) this; + } + + public Criteria andLatestIsNotNull() { + addCriterion("latest is not null"); + return (Criteria) this; + } + + public Criteria andLatestEqualTo(Boolean value) { + addCriterion("latest =", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestNotEqualTo(Boolean value) { + addCriterion("latest <>", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestGreaterThan(Boolean value) { + addCriterion("latest >", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestGreaterThanOrEqualTo(Boolean value) { + addCriterion("latest >=", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestLessThan(Boolean value) { + addCriterion("latest <", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestLessThanOrEqualTo(Boolean value) { + addCriterion("latest <=", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestIn(List values) { + addCriterion("latest in", values, "latest"); + return (Criteria) this; + } + + public Criteria andLatestNotIn(List values) { + addCriterion("latest not in", values, "latest"); + return (Criteria) this; + } + + public Criteria andLatestBetween(Boolean value1, Boolean value2) { + addCriterion("latest between", value1, value2, "latest"); + return (Criteria) this; + } + + public Criteria andLatestNotBetween(Boolean value1, Boolean value2) { + addCriterion("latest not between", value1, value2, "latest"); + return (Criteria) this; + } + + public Criteria andRefIdIsNull() { + addCriterion("ref_id is null"); + return (Criteria) this; + } + + public Criteria andRefIdIsNotNull() { + addCriterion("ref_id is not null"); + return (Criteria) this; + } + + public Criteria andRefIdEqualTo(String value) { + addCriterion("ref_id =", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotEqualTo(String value) { + addCriterion("ref_id <>", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThan(String value) { + addCriterion("ref_id >", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThanOrEqualTo(String value) { + addCriterion("ref_id >=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThan(String value) { + addCriterion("ref_id <", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThanOrEqualTo(String value) { + addCriterion("ref_id <=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLike(String value) { + addCriterion("ref_id like", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotLike(String value) { + addCriterion("ref_id not like", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdIn(List values) { + addCriterion("ref_id in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotIn(List values) { + addCriterion("ref_id not in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdBetween(String value1, String value2) { + addCriterion("ref_id between", value1, value2, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotBetween(String value1, String value2) { + addCriterion("ref_id not between", value1, value2, "refId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 abdb25d5e0..4c8730c85e 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,65 +1,50 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "文件管理模块") -@Table("file_module") @Data public class FileModule implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{file_module.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{file_module.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{file_module.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{file_module.project_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{file_module.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{file_module.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") private String projectId; + @Schema(title = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{file_module.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{file_module.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{file_module.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块名称", required = true, allowableValues = "range[1, 64]") private String name; - - @ApiModelProperty(name = "父级ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "父级ID") private String parentId; - - @ApiModelProperty(name = "层数", required = false, allowableValues = "range[1, ]") + @Schema(title = "层数") private Integer level; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - - @ApiModelProperty(name = "排序用的标识", required = false, allowableValues = "range[1, 22]") + @Schema(title = "排序用的标识") private Double pos; - - @ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]") + @Schema(title = "创建人") private String createUser; - - @ApiModelProperty(name = "模块类型: module/repository", required = false, allowableValues = "range[1, 20]") + @Schema(title = "模块类型: module/repository") private String moduleType; - + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 9354ff0f0d..b296c4a9c4 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,45 +1,31 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "文件管理模块大字段") -@Table("file_module_blob") @Data -@EqualsAndHashCode(callSuper=false) public class FileModuleBlob implements Serializable { - private static final long serialVersionUID = 1L; - - @Id + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") @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; + @Size(min = 1, max = 50, message = "{file_module_blob.file_module_id.length_range}", groups = {Created.class, Updated.class}) + private String fileModuleId; - - @ApiModelProperty(name = "存储库描述", required = false, allowableValues = "range[1, ]") - private byte[] repositoryDesc; - - - @ApiModelProperty(name = "存储库路径", required = false, allowableValues = "range[1, 255]") + @Schema(title = "存储库路径") private String repositoryPath; - - @ApiModelProperty(name = "存储库Token", required = false, allowableValues = "range[1, 255]") + @Schema(title = "存储库Token") private String repositoryUserName; - - @ApiModelProperty(name = "存储库Token", required = false, allowableValues = "range[1, 255]") + @Schema(title = "存储库Token") private String repositoryToken; + @Schema(title = "存储库描述") + private byte[] repositoryDesc; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleBlobExample.java new file mode 100644 index 0000000000..17062f61ee --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleBlobExample.java @@ -0,0 +1,480 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FileModuleBlobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FileModuleBlobExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andFileModuleIdIsNull() { + addCriterion("file_module_id is null"); + return (Criteria) this; + } + + public Criteria andFileModuleIdIsNotNull() { + addCriterion("file_module_id is not null"); + return (Criteria) this; + } + + public Criteria andFileModuleIdEqualTo(String value) { + addCriterion("file_module_id =", value, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdNotEqualTo(String value) { + addCriterion("file_module_id <>", value, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdGreaterThan(String value) { + addCriterion("file_module_id >", value, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdGreaterThanOrEqualTo(String value) { + addCriterion("file_module_id >=", value, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdLessThan(String value) { + addCriterion("file_module_id <", value, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdLessThanOrEqualTo(String value) { + addCriterion("file_module_id <=", value, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdLike(String value) { + addCriterion("file_module_id like", value, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdNotLike(String value) { + addCriterion("file_module_id not like", value, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdIn(List values) { + addCriterion("file_module_id in", values, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdNotIn(List values) { + addCriterion("file_module_id not in", values, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdBetween(String value1, String value2) { + addCriterion("file_module_id between", value1, value2, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andFileModuleIdNotBetween(String value1, String value2) { + addCriterion("file_module_id not between", value1, value2, "fileModuleId"); + return (Criteria) this; + } + + public Criteria andRepositoryPathIsNull() { + addCriterion("repository_path is null"); + return (Criteria) this; + } + + public Criteria andRepositoryPathIsNotNull() { + addCriterion("repository_path is not null"); + return (Criteria) this; + } + + public Criteria andRepositoryPathEqualTo(String value) { + addCriterion("repository_path =", value, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathNotEqualTo(String value) { + addCriterion("repository_path <>", value, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathGreaterThan(String value) { + addCriterion("repository_path >", value, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathGreaterThanOrEqualTo(String value) { + addCriterion("repository_path >=", value, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathLessThan(String value) { + addCriterion("repository_path <", value, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathLessThanOrEqualTo(String value) { + addCriterion("repository_path <=", value, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathLike(String value) { + addCriterion("repository_path like", value, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathNotLike(String value) { + addCriterion("repository_path not like", value, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathIn(List values) { + addCriterion("repository_path in", values, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathNotIn(List values) { + addCriterion("repository_path not in", values, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathBetween(String value1, String value2) { + addCriterion("repository_path between", value1, value2, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryPathNotBetween(String value1, String value2) { + addCriterion("repository_path not between", value1, value2, "repositoryPath"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameIsNull() { + addCriterion("repository_user_name is null"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameIsNotNull() { + addCriterion("repository_user_name is not null"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameEqualTo(String value) { + addCriterion("repository_user_name =", value, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameNotEqualTo(String value) { + addCriterion("repository_user_name <>", value, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameGreaterThan(String value) { + addCriterion("repository_user_name >", value, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameGreaterThanOrEqualTo(String value) { + addCriterion("repository_user_name >=", value, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameLessThan(String value) { + addCriterion("repository_user_name <", value, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameLessThanOrEqualTo(String value) { + addCriterion("repository_user_name <=", value, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameLike(String value) { + addCriterion("repository_user_name like", value, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameNotLike(String value) { + addCriterion("repository_user_name not like", value, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameIn(List values) { + addCriterion("repository_user_name in", values, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameNotIn(List values) { + addCriterion("repository_user_name not in", values, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameBetween(String value1, String value2) { + addCriterion("repository_user_name between", value1, value2, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryUserNameNotBetween(String value1, String value2) { + addCriterion("repository_user_name not between", value1, value2, "repositoryUserName"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenIsNull() { + addCriterion("repository_token is null"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenIsNotNull() { + addCriterion("repository_token is not null"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenEqualTo(String value) { + addCriterion("repository_token =", value, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenNotEqualTo(String value) { + addCriterion("repository_token <>", value, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenGreaterThan(String value) { + addCriterion("repository_token >", value, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenGreaterThanOrEqualTo(String value) { + addCriterion("repository_token >=", value, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenLessThan(String value) { + addCriterion("repository_token <", value, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenLessThanOrEqualTo(String value) { + addCriterion("repository_token <=", value, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenLike(String value) { + addCriterion("repository_token like", value, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenNotLike(String value) { + addCriterion("repository_token not like", value, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenIn(List values) { + addCriterion("repository_token in", values, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenNotIn(List values) { + addCriterion("repository_token not in", values, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenBetween(String value1, String value2) { + addCriterion("repository_token between", value1, value2, "repositoryToken"); + return (Criteria) this; + } + + public Criteria andRepositoryTokenNotBetween(String value1, String value2) { + addCriterion("repository_token not between", value1, value2, "repositoryToken"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleExample.java new file mode 100644 index 0000000000..6b04e089cb --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FileModuleExample.java @@ -0,0 +1,860 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FileModuleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FileModuleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(String value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(String value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(String value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(String value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(String value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(String value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLike(String value) { + addCriterion("parent_id like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotLike(String value) { + addCriterion("parent_id not like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(String value1, String value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(String value1, String value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andLevelIsNull() { + addCriterion("`level` is null"); + return (Criteria) this; + } + + public Criteria andLevelIsNotNull() { + addCriterion("`level` is not null"); + return (Criteria) this; + } + + public Criteria andLevelEqualTo(Integer value) { + addCriterion("`level` =", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotEqualTo(Integer value) { + addCriterion("`level` <>", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThan(Integer value) { + addCriterion("`level` >", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThanOrEqualTo(Integer value) { + addCriterion("`level` >=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThan(Integer value) { + addCriterion("`level` <", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThanOrEqualTo(Integer value) { + addCriterion("`level` <=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelIn(List values) { + addCriterion("`level` in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotIn(List values) { + addCriterion("`level` not in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelBetween(Integer value1, Integer value2) { + addCriterion("`level` between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotBetween(Integer value1, Integer value2) { + addCriterion("`level` not between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andPosIsNull() { + addCriterion("pos is null"); + return (Criteria) this; + } + + public Criteria andPosIsNotNull() { + addCriterion("pos is not null"); + return (Criteria) this; + } + + public Criteria andPosEqualTo(Double value) { + addCriterion("pos =", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotEqualTo(Double value) { + addCriterion("pos <>", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThan(Double value) { + addCriterion("pos >", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThanOrEqualTo(Double value) { + addCriterion("pos >=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThan(Double value) { + addCriterion("pos <", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThanOrEqualTo(Double value) { + addCriterion("pos <=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosIn(List values) { + addCriterion("pos in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotIn(List values) { + addCriterion("pos not in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosBetween(Double value1, Double value2) { + addCriterion("pos between", value1, value2, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotBetween(Double value1, Double value2) { + addCriterion("pos not between", value1, value2, "pos"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andModuleTypeIsNull() { + addCriterion("module_type is null"); + return (Criteria) this; + } + + public Criteria andModuleTypeIsNotNull() { + addCriterion("module_type is not null"); + return (Criteria) this; + } + + public Criteria andModuleTypeEqualTo(String value) { + addCriterion("module_type =", value, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeNotEqualTo(String value) { + addCriterion("module_type <>", value, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeGreaterThan(String value) { + addCriterion("module_type >", value, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeGreaterThanOrEqualTo(String value) { + addCriterion("module_type >=", value, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeLessThan(String value) { + addCriterion("module_type <", value, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeLessThanOrEqualTo(String value) { + addCriterion("module_type <=", value, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeLike(String value) { + addCriterion("module_type like", value, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeNotLike(String value) { + addCriterion("module_type not like", value, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeIn(List values) { + addCriterion("module_type in", values, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeNotIn(List values) { + addCriterion("module_type not in", values, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeBetween(String value1, String value2) { + addCriterion("module_type between", value1, value2, "moduleType"); + return (Criteria) this; + } + + public Criteria andModuleTypeNotBetween(String value1, String value2) { + addCriterion("module_type not between", value1, value2, "moduleType"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 3bca0e54e7..ad57b96f3a 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,56 +1,45 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "功能用例模版") -@Table("functional_case_template") @Data public class FunctionalCaseTemplate implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{functional_case_template.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{functional_case_template.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{functional_case_template.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @Size(min = 1, max = 64, message = "{functional_case_template.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{functional_case_template.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "名称", required = true, allowableValues="range[1, 64]") - private String name; - - - - @ApiModelProperty(name = "描述", required = false, allowableValues="range[1, 255]") - private String description; - - - - @ApiModelProperty(name = "是否是系统模板", required = true, allowableValues="range[1, ]") - private Boolean system; - - - - @ApiModelProperty(name = "创建时间", required = true, allowableValues="range[1, ]") - private Long createTime; - - @Size(min = 1, max = 50, message = "{functional_case_template.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{functional_case_template.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 50]") - private String createUser; - - @Size(min = 1, max = 50, message = "{functional_case_template.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{functional_case_template.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - + @Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{functional_case_template.name.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 64, message = "{functional_case_template.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(title = "描述") + private String description; + + @Schema(title = "是否是系统模板", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") + @NotBlank(message = "{functional_case_template.system.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 1, message = "{functional_case_template.system.length_range}", groups = {Created.class, Updated.class}) + private Boolean system; + + @Schema(title = "创建时间") + private Long createTime; + + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{functional_case_template.create_user.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{functional_case_template.create_user.length_range}", groups = {Created.class, Updated.class}) + private String createUser; + + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{functional_case_template.project_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{functional_case_template.project_id.length_range}", groups = {Created.class, Updated.class}) + private String projectId; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExample.java new file mode 100644 index 0000000000..2d28dbe974 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExample.java @@ -0,0 +1,670 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FunctionalCaseTemplateExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FunctionalCaseTemplateExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andSystemIsNull() { + addCriterion("`system` is null"); + return (Criteria) this; + } + + public Criteria andSystemIsNotNull() { + addCriterion("`system` is not null"); + return (Criteria) this; + } + + public Criteria andSystemEqualTo(Boolean value) { + addCriterion("`system` =", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotEqualTo(Boolean value) { + addCriterion("`system` <>", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThan(Boolean value) { + addCriterion("`system` >", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThanOrEqualTo(Boolean value) { + addCriterion("`system` >=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThan(Boolean value) { + addCriterion("`system` <", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThanOrEqualTo(Boolean value) { + addCriterion("`system` <=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemIn(List values) { + addCriterion("`system` in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotIn(List values) { + addCriterion("`system` not in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemBetween(Boolean value1, Boolean value2) { + addCriterion("`system` between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotBetween(Boolean value1, Boolean value2) { + addCriterion("`system` not between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 04d3622b4d..58aaed4bd0 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,58 +1,42 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "功能用例模版扩展") -@Table("functional_case_template_extend") @Data -@EqualsAndHashCode(callSuper = false) public class FunctionalCaseTemplateExtend implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{functional_case_template_extend.template_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{functional_case_template_extend.template_id.length_range}", groups = {Created.class, Updated.class}) + private String templateId; - @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; - - - @ApiModelProperty(name = "用例名称模板", required = false, allowableValues = "range[1, 255]") + @Schema(title = "用例名称模板") private String caseName; - - @ApiModelProperty(name = "前置条件模板", required = false, allowableValues = "range[1, ]") - private String prerequisite; - - - @ApiModelProperty(name = "步骤描述模板", required = false, allowableValues = "range[1, ]") - private String stepDescription; - - - @ApiModelProperty(name = "预期结果模板", required = false, allowableValues = "range[1, ]") - private String expectedResult; - - - @ApiModelProperty(name = "实际结果模板", required = false, allowableValues = "range[1, ]") - private String actualResult; - + @Schema(title = "编辑模式模板:步骤模式/文本模式", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{functional_case_template_extend.step_model.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{functional_case_template_extend.step_model.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{functional_case_template_extend.step_model.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "编辑模式模板:步骤模式/文本模式", required = true, allowableValues = "range[1, 64]") private String stepModel; + @Schema(title = "前置条件模板") + private String prerequisite; - @ApiModelProperty(name = "用例步骤", required = false, allowableValues = "range[1, ]") + @Schema(title = "步骤描述模板") + private String stepDescription; + + @Schema(title = "预期结果模板") + private String expectedResult; + + @Schema(title = "实际结果模板") + private String actualResult; + + @Schema(title = "用例步骤") private String steps; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtendExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtendExample.java new file mode 100644 index 0000000000..afcc746dad --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/FunctionalCaseTemplateExtendExample.java @@ -0,0 +1,410 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FunctionalCaseTemplateExtendExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FunctionalCaseTemplateExtendExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTemplateIdIsNull() { + addCriterion("template_id is null"); + return (Criteria) this; + } + + public Criteria andTemplateIdIsNotNull() { + addCriterion("template_id is not null"); + return (Criteria) this; + } + + public Criteria andTemplateIdEqualTo(String value) { + addCriterion("template_id =", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotEqualTo(String value) { + addCriterion("template_id <>", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThan(String value) { + addCriterion("template_id >", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThanOrEqualTo(String value) { + addCriterion("template_id >=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThan(String value) { + addCriterion("template_id <", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThanOrEqualTo(String value) { + addCriterion("template_id <=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLike(String value) { + addCriterion("template_id like", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotLike(String value) { + addCriterion("template_id not like", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdIn(List values) { + addCriterion("template_id in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotIn(List values) { + addCriterion("template_id not in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdBetween(String value1, String value2) { + addCriterion("template_id between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotBetween(String value1, String value2) { + addCriterion("template_id not between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andCaseNameIsNull() { + addCriterion("case_name is null"); + return (Criteria) this; + } + + public Criteria andCaseNameIsNotNull() { + addCriterion("case_name is not null"); + return (Criteria) this; + } + + public Criteria andCaseNameEqualTo(String value) { + addCriterion("case_name =", value, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameNotEqualTo(String value) { + addCriterion("case_name <>", value, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameGreaterThan(String value) { + addCriterion("case_name >", value, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameGreaterThanOrEqualTo(String value) { + addCriterion("case_name >=", value, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameLessThan(String value) { + addCriterion("case_name <", value, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameLessThanOrEqualTo(String value) { + addCriterion("case_name <=", value, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameLike(String value) { + addCriterion("case_name like", value, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameNotLike(String value) { + addCriterion("case_name not like", value, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameIn(List values) { + addCriterion("case_name in", values, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameNotIn(List values) { + addCriterion("case_name not in", values, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameBetween(String value1, String value2) { + addCriterion("case_name between", value1, value2, "caseName"); + return (Criteria) this; + } + + public Criteria andCaseNameNotBetween(String value1, String value2) { + addCriterion("case_name not between", value1, value2, "caseName"); + return (Criteria) this; + } + + public Criteria andStepModelIsNull() { + addCriterion("step_model is null"); + return (Criteria) this; + } + + public Criteria andStepModelIsNotNull() { + addCriterion("step_model is not null"); + return (Criteria) this; + } + + public Criteria andStepModelEqualTo(String value) { + addCriterion("step_model =", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelNotEqualTo(String value) { + addCriterion("step_model <>", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelGreaterThan(String value) { + addCriterion("step_model >", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelGreaterThanOrEqualTo(String value) { + addCriterion("step_model >=", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelLessThan(String value) { + addCriterion("step_model <", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelLessThanOrEqualTo(String value) { + addCriterion("step_model <=", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelLike(String value) { + addCriterion("step_model like", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelNotLike(String value) { + addCriterion("step_model not like", value, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelIn(List values) { + addCriterion("step_model in", values, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelNotIn(List values) { + addCriterion("step_model not in", values, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelBetween(String value1, String value2) { + addCriterion("step_model between", value1, value2, "stepModel"); + return (Criteria) this; + } + + public Criteria andStepModelNotBetween(String value1, String value2) { + addCriterion("step_model not between", value1, value2, "stepModel"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 5283b3aa73..6b431c1cd1 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,56 +1,45 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "缺陷模版") -@Table("issue_template") @Data public class IssueTemplate implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{issue_template.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{issue_template.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{issue_template.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @Size(min = 1, max = 64, message = "{issue_template.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{issue_template.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "名称", required = true, allowableValues="range[1, 64]") - private String name; - - - - @ApiModelProperty(name = "描述", required = false, allowableValues="range[1, 255]") - private String description; - - - - @ApiModelProperty(name = "是否是系统模板", required = true, allowableValues="range[1, ]") - private Boolean system; - - - - @ApiModelProperty(name = "创建时间", required = true, allowableValues="range[1, ]") - private Long createTime; - - @Size(min = 1, max = 50, message = "{issue_template.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{issue_template.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 50]") - private String createUser; - - @Size(min = 1, max = 50, message = "{issue_template.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{issue_template.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - + @Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{issue_template.name.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 64, message = "{issue_template.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(title = "描述") + private String description; + + @Schema(title = "是否是系统模板", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") + @NotBlank(message = "{issue_template.system.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 1, message = "{issue_template.system.length_range}", groups = {Created.class, Updated.class}) + private Boolean system; + + @Schema(title = "创建时间") + private Long createTime; + + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{issue_template.create_user.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{issue_template.create_user.length_range}", groups = {Created.class, Updated.class}) + private String createUser; + + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{issue_template.project_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{issue_template.project_id.length_range}", groups = {Created.class, Updated.class}) + private String projectId; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExample.java new file mode 100644 index 0000000000..95dbb8281e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExample.java @@ -0,0 +1,670 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class IssueTemplateExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public IssueTemplateExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andSystemIsNull() { + addCriterion("`system` is null"); + return (Criteria) this; + } + + public Criteria andSystemIsNotNull() { + addCriterion("`system` is not null"); + return (Criteria) this; + } + + public Criteria andSystemEqualTo(Boolean value) { + addCriterion("`system` =", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotEqualTo(Boolean value) { + addCriterion("`system` <>", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThan(Boolean value) { + addCriterion("`system` >", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThanOrEqualTo(Boolean value) { + addCriterion("`system` >=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThan(Boolean value) { + addCriterion("`system` <", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThanOrEqualTo(Boolean value) { + addCriterion("`system` <=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemIn(List values) { + addCriterion("`system` in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotIn(List values) { + addCriterion("`system` not in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemBetween(Boolean value1, Boolean value2) { + addCriterion("`system` between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotBetween(Boolean value1, Boolean value2) { + addCriterion("`system` not between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 fb665c907d..5d2d4f30bc 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,37 +1,25 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "缺陷模板扩展") -@Table("issue_template_extend") @Data -@EqualsAndHashCode(callSuper = false) public class IssueTemplateExtend implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "缺陷模板ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{issue_template_extend.template_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 100, message = "{issue_template_extend.template_id.length_range}", groups = {Created.class, Updated.class}) + private String templateId; - @Id - @NotBlank(message = "{issue_template_extend.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "缺陷模板ID", required = true, allowableValues = "range[1, 100]") - private String id; - - - @ApiModelProperty(name = "缺陷标题模板", required = false, allowableValues = "range[1, 64]") + @Schema(title = "缺陷标题模板") private String title; - - @ApiModelProperty(name = "缺陷内容模板", required = false, allowableValues = "range[1, ]") + @Schema(title = "缺陷内容模板") private String content; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtendExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtendExample.java new file mode 100644 index 0000000000..202934635e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtendExample.java @@ -0,0 +1,340 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class IssueTemplateExtendExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public IssueTemplateExtendExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andTemplateIdIsNull() { + addCriterion("template_id is null"); + return (Criteria) this; + } + + public Criteria andTemplateIdIsNotNull() { + addCriterion("template_id is not null"); + return (Criteria) this; + } + + public Criteria andTemplateIdEqualTo(String value) { + addCriterion("template_id =", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotEqualTo(String value) { + addCriterion("template_id <>", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThan(String value) { + addCriterion("template_id >", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThanOrEqualTo(String value) { + addCriterion("template_id >=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThan(String value) { + addCriterion("template_id <", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThanOrEqualTo(String value) { + addCriterion("template_id <=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLike(String value) { + addCriterion("template_id like", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotLike(String value) { + addCriterion("template_id not like", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdIn(List values) { + addCriterion("template_id in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotIn(List values) { + addCriterion("template_id not in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdBetween(String value1, String value2) { + addCriterion("template_id between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotBetween(String value1, String value2) { + addCriterion("template_id not between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andTitleIsNull() { + addCriterion("title is null"); + return (Criteria) this; + } + + public Criteria andTitleIsNotNull() { + addCriterion("title is not null"); + return (Criteria) this; + } + + public Criteria andTitleEqualTo(String value) { + addCriterion("title =", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotEqualTo(String value) { + addCriterion("title <>", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThan(String value) { + addCriterion("title >", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThanOrEqualTo(String value) { + addCriterion("title >=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThan(String value) { + addCriterion("title <", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThanOrEqualTo(String value) { + addCriterion("title <=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List values) { + addCriterion("title not in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleBetween(String value1, String value2) { + addCriterion("title between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotBetween(String value1, String value2) { + addCriterion("title not between", value1, value2, "title"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 6d87a0401e..01cf2df685 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,57 +1,44 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "项目") -@Table("project") @Data public class Project implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{project.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{project.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{project.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "工作空间ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{project.workspace_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{project.workspace_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{project.workspace_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "工作空间ID", required = true, allowableValues = "range[1, 50]") private String workspaceId; + @Schema(title = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{project.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{project.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{project.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目名称", required = true, allowableValues = "range[1, 64]") private String name; - - @ApiModelProperty(name = "项目描述", required = false, allowableValues = "range[1, 255]") + @Schema(title = "项目描述") private String description; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - - @ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]") + @Schema(title = "创建人") private String createUser; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]") + @Schema(title = "") private String systemId; - + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 27577692cc..2355743b6f 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 @@ -2,29 +2,26 @@ package io.metersphere.project.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import org.springframework.data.relational.core.mapping.Table; - +import jakarta.validation.constraints.Size; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "项目应用") -@Table("project_application") @Data public class ProjectApplication implements Serializable { - private static final long serialVersionUID = 1L; - - @NotBlank(message = "{project_application.project_id.not_blank}", groups = {Created.class, Updated.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{project_application.project_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{project_application.project_id.length_range}", groups = {Created.class, Updated.class}) private String projectId; - @NotBlank(message = "{project_application.type.not_blank}", groups = {Created.class, Updated.class}) - @ApiModelProperty(name = "配置项", required = true, allowableValues = "range[1, 50]") + @Schema(title = "配置项", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{project_application.type.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{project_application.type.length_range}", groups = {Created.class, Updated.class}) private String type; - - @ApiModelProperty(name = "配置值", required = false, allowableValues = "range[1, 255]") + @Schema(title = "配置值") private String typeValue; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectApplicationExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectApplicationExample.java new file mode 100644 index 0000000000..26b0a3075f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectApplicationExample.java @@ -0,0 +1,410 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ProjectApplicationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProjectApplicationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeValueIsNull() { + addCriterion("type_value is null"); + return (Criteria) this; + } + + public Criteria andTypeValueIsNotNull() { + addCriterion("type_value is not null"); + return (Criteria) this; + } + + public Criteria andTypeValueEqualTo(String value) { + addCriterion("type_value =", value, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueNotEqualTo(String value) { + addCriterion("type_value <>", value, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueGreaterThan(String value) { + addCriterion("type_value >", value, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueGreaterThanOrEqualTo(String value) { + addCriterion("type_value >=", value, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueLessThan(String value) { + addCriterion("type_value <", value, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueLessThanOrEqualTo(String value) { + addCriterion("type_value <=", value, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueLike(String value) { + addCriterion("type_value like", value, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueNotLike(String value) { + addCriterion("type_value not like", value, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueIn(List values) { + addCriterion("type_value in", values, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueNotIn(List values) { + addCriterion("type_value not in", values, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueBetween(String value1, String value2) { + addCriterion("type_value between", value1, value2, "typeValue"); + return (Criteria) this; + } + + public Criteria andTypeValueNotBetween(String value1, String value2) { + addCriterion("type_value not between", value1, value2, "typeValue"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExample.java new file mode 100644 index 0000000000..30d59e4926 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExample.java @@ -0,0 +1,740 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ProjectExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProjectExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNull() { + addCriterion("workspace_id is null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNotNull() { + addCriterion("workspace_id is not null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdEqualTo(String value) { + addCriterion("workspace_id =", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotEqualTo(String value) { + addCriterion("workspace_id <>", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThan(String value) { + addCriterion("workspace_id >", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { + addCriterion("workspace_id >=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThan(String value) { + addCriterion("workspace_id <", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { + addCriterion("workspace_id <=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLike(String value) { + addCriterion("workspace_id like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotLike(String value) { + addCriterion("workspace_id not like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIn(List values) { + addCriterion("workspace_id in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotIn(List values) { + addCriterion("workspace_id not in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdBetween(String value1, String value2) { + addCriterion("workspace_id between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotBetween(String value1, String value2) { + addCriterion("workspace_id not between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andSystemIdIsNull() { + addCriterion("system_id is null"); + return (Criteria) this; + } + + public Criteria andSystemIdIsNotNull() { + addCriterion("system_id is not null"); + return (Criteria) this; + } + + public Criteria andSystemIdEqualTo(String value) { + addCriterion("system_id =", value, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdNotEqualTo(String value) { + addCriterion("system_id <>", value, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdGreaterThan(String value) { + addCriterion("system_id >", value, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdGreaterThanOrEqualTo(String value) { + addCriterion("system_id >=", value, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdLessThan(String value) { + addCriterion("system_id <", value, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdLessThanOrEqualTo(String value) { + addCriterion("system_id <=", value, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdLike(String value) { + addCriterion("system_id like", value, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdNotLike(String value) { + addCriterion("system_id not like", value, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdIn(List values) { + addCriterion("system_id in", values, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdNotIn(List values) { + addCriterion("system_id not in", values, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdBetween(String value1, String value2) { + addCriterion("system_id between", value1, value2, "systemId"); + return (Criteria) this; + } + + public Criteria andSystemIdNotBetween(String value1, String value2) { + addCriterion("system_id not between", value1, value2, "systemId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ 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 2125a32bd8..fdfda344fc 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,74 +1,54 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "项目扩展") -@Table("project_extend") @Data -@EqualsAndHashCode(callSuper = false) public class ProjectExtend implements Serializable { - private static final long serialVersionUID = 1L; - - @Id + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") @NotBlank(message = "{project_extend.project_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") - private String id; + @Size(min = 1, max = 50, message = "{project_extend.project_id.length_range}", groups = {Created.class, Updated.class}) + private String projectId; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]") + @Schema(title = "") private String tapdId; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]") + @Schema(title = "") private String jiraKey; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]") + @Schema(title = "") private String zentaoId; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]") + @Schema(title = "") private String azureDevopsId; - - @ApiModelProperty(name = "用例模版ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "用例模版ID") private String caseTemplateId; - - @ApiModelProperty(name = "azure 过滤需求的 parent workItem ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "azure 过滤需求的 parent workItem ID") private String azureFilterId; + @Schema(title = "项目使用哪个平台的模板", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") + @NotBlank(message = "{project_extend.platform.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 20, message = "{project_extend.platform.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{project_extend.platform.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目使用哪个平台的模板", required = true, allowableValues = "range[1, 20]") private String platform; - - @ApiModelProperty(name = "是否使用第三方平台缺陷模板", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否使用第三方平台缺陷模板") private Boolean thirdPartTemplate; - - @ApiModelProperty(name = "是否开启版本管理", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否开启版本管理") private Boolean versionEnable; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]") - private byte[] issueConfig; - - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 64]") + @Schema(title = "") private String apiTemplateId; + @Schema(title = "") + private byte[] issueConfig; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExtendExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExtendExample.java new file mode 100644 index 0000000000..34d5bce1a4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExtendExample.java @@ -0,0 +1,950 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ProjectExtendExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProjectExtendExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andTapdIdIsNull() { + addCriterion("tapd_id is null"); + return (Criteria) this; + } + + public Criteria andTapdIdIsNotNull() { + addCriterion("tapd_id is not null"); + return (Criteria) this; + } + + public Criteria andTapdIdEqualTo(String value) { + addCriterion("tapd_id =", value, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdNotEqualTo(String value) { + addCriterion("tapd_id <>", value, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdGreaterThan(String value) { + addCriterion("tapd_id >", value, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdGreaterThanOrEqualTo(String value) { + addCriterion("tapd_id >=", value, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdLessThan(String value) { + addCriterion("tapd_id <", value, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdLessThanOrEqualTo(String value) { + addCriterion("tapd_id <=", value, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdLike(String value) { + addCriterion("tapd_id like", value, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdNotLike(String value) { + addCriterion("tapd_id not like", value, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdIn(List values) { + addCriterion("tapd_id in", values, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdNotIn(List values) { + addCriterion("tapd_id not in", values, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdBetween(String value1, String value2) { + addCriterion("tapd_id between", value1, value2, "tapdId"); + return (Criteria) this; + } + + public Criteria andTapdIdNotBetween(String value1, String value2) { + addCriterion("tapd_id not between", value1, value2, "tapdId"); + return (Criteria) this; + } + + public Criteria andJiraKeyIsNull() { + addCriterion("jira_key is null"); + return (Criteria) this; + } + + public Criteria andJiraKeyIsNotNull() { + addCriterion("jira_key is not null"); + return (Criteria) this; + } + + public Criteria andJiraKeyEqualTo(String value) { + addCriterion("jira_key =", value, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyNotEqualTo(String value) { + addCriterion("jira_key <>", value, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyGreaterThan(String value) { + addCriterion("jira_key >", value, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyGreaterThanOrEqualTo(String value) { + addCriterion("jira_key >=", value, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyLessThan(String value) { + addCriterion("jira_key <", value, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyLessThanOrEqualTo(String value) { + addCriterion("jira_key <=", value, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyLike(String value) { + addCriterion("jira_key like", value, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyNotLike(String value) { + addCriterion("jira_key not like", value, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyIn(List values) { + addCriterion("jira_key in", values, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyNotIn(List values) { + addCriterion("jira_key not in", values, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyBetween(String value1, String value2) { + addCriterion("jira_key between", value1, value2, "jiraKey"); + return (Criteria) this; + } + + public Criteria andJiraKeyNotBetween(String value1, String value2) { + addCriterion("jira_key not between", value1, value2, "jiraKey"); + return (Criteria) this; + } + + public Criteria andZentaoIdIsNull() { + addCriterion("zentao_id is null"); + return (Criteria) this; + } + + public Criteria andZentaoIdIsNotNull() { + addCriterion("zentao_id is not null"); + return (Criteria) this; + } + + public Criteria andZentaoIdEqualTo(String value) { + addCriterion("zentao_id =", value, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdNotEqualTo(String value) { + addCriterion("zentao_id <>", value, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdGreaterThan(String value) { + addCriterion("zentao_id >", value, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdGreaterThanOrEqualTo(String value) { + addCriterion("zentao_id >=", value, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdLessThan(String value) { + addCriterion("zentao_id <", value, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdLessThanOrEqualTo(String value) { + addCriterion("zentao_id <=", value, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdLike(String value) { + addCriterion("zentao_id like", value, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdNotLike(String value) { + addCriterion("zentao_id not like", value, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdIn(List values) { + addCriterion("zentao_id in", values, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdNotIn(List values) { + addCriterion("zentao_id not in", values, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdBetween(String value1, String value2) { + addCriterion("zentao_id between", value1, value2, "zentaoId"); + return (Criteria) this; + } + + public Criteria andZentaoIdNotBetween(String value1, String value2) { + addCriterion("zentao_id not between", value1, value2, "zentaoId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdIsNull() { + addCriterion("azure_devops_id is null"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdIsNotNull() { + addCriterion("azure_devops_id is not null"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdEqualTo(String value) { + addCriterion("azure_devops_id =", value, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdNotEqualTo(String value) { + addCriterion("azure_devops_id <>", value, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdGreaterThan(String value) { + addCriterion("azure_devops_id >", value, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdGreaterThanOrEqualTo(String value) { + addCriterion("azure_devops_id >=", value, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdLessThan(String value) { + addCriterion("azure_devops_id <", value, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdLessThanOrEqualTo(String value) { + addCriterion("azure_devops_id <=", value, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdLike(String value) { + addCriterion("azure_devops_id like", value, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdNotLike(String value) { + addCriterion("azure_devops_id not like", value, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdIn(List values) { + addCriterion("azure_devops_id in", values, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdNotIn(List values) { + addCriterion("azure_devops_id not in", values, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdBetween(String value1, String value2) { + addCriterion("azure_devops_id between", value1, value2, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andAzureDevopsIdNotBetween(String value1, String value2) { + addCriterion("azure_devops_id not between", value1, value2, "azureDevopsId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdIsNull() { + addCriterion("case_template_id is null"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdIsNotNull() { + addCriterion("case_template_id is not null"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdEqualTo(String value) { + addCriterion("case_template_id =", value, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdNotEqualTo(String value) { + addCriterion("case_template_id <>", value, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdGreaterThan(String value) { + addCriterion("case_template_id >", value, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdGreaterThanOrEqualTo(String value) { + addCriterion("case_template_id >=", value, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdLessThan(String value) { + addCriterion("case_template_id <", value, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdLessThanOrEqualTo(String value) { + addCriterion("case_template_id <=", value, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdLike(String value) { + addCriterion("case_template_id like", value, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdNotLike(String value) { + addCriterion("case_template_id not like", value, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdIn(List values) { + addCriterion("case_template_id in", values, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdNotIn(List values) { + addCriterion("case_template_id not in", values, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdBetween(String value1, String value2) { + addCriterion("case_template_id between", value1, value2, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andCaseTemplateIdNotBetween(String value1, String value2) { + addCriterion("case_template_id not between", value1, value2, "caseTemplateId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdIsNull() { + addCriterion("azure_filter_id is null"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdIsNotNull() { + addCriterion("azure_filter_id is not null"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdEqualTo(String value) { + addCriterion("azure_filter_id =", value, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdNotEqualTo(String value) { + addCriterion("azure_filter_id <>", value, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdGreaterThan(String value) { + addCriterion("azure_filter_id >", value, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdGreaterThanOrEqualTo(String value) { + addCriterion("azure_filter_id >=", value, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdLessThan(String value) { + addCriterion("azure_filter_id <", value, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdLessThanOrEqualTo(String value) { + addCriterion("azure_filter_id <=", value, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdLike(String value) { + addCriterion("azure_filter_id like", value, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdNotLike(String value) { + addCriterion("azure_filter_id not like", value, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdIn(List values) { + addCriterion("azure_filter_id in", values, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdNotIn(List values) { + addCriterion("azure_filter_id not in", values, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdBetween(String value1, String value2) { + addCriterion("azure_filter_id between", value1, value2, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andAzureFilterIdNotBetween(String value1, String value2) { + addCriterion("azure_filter_id not between", value1, value2, "azureFilterId"); + return (Criteria) this; + } + + public Criteria andPlatformIsNull() { + addCriterion("platform is null"); + return (Criteria) this; + } + + public Criteria andPlatformIsNotNull() { + addCriterion("platform is not null"); + return (Criteria) this; + } + + public Criteria andPlatformEqualTo(String value) { + addCriterion("platform =", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotEqualTo(String value) { + addCriterion("platform <>", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThan(String value) { + addCriterion("platform >", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThanOrEqualTo(String value) { + addCriterion("platform >=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThan(String value) { + addCriterion("platform <", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThanOrEqualTo(String value) { + addCriterion("platform <=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLike(String value) { + addCriterion("platform like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotLike(String value) { + addCriterion("platform not like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformIn(List values) { + addCriterion("platform in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotIn(List values) { + addCriterion("platform not in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformBetween(String value1, String value2) { + addCriterion("platform between", value1, value2, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotBetween(String value1, String value2) { + addCriterion("platform not between", value1, value2, "platform"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateIsNull() { + addCriterion("third_part_template is null"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateIsNotNull() { + addCriterion("third_part_template is not null"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateEqualTo(Boolean value) { + addCriterion("third_part_template =", value, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateNotEqualTo(Boolean value) { + addCriterion("third_part_template <>", value, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateGreaterThan(Boolean value) { + addCriterion("third_part_template >", value, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateGreaterThanOrEqualTo(Boolean value) { + addCriterion("third_part_template >=", value, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateLessThan(Boolean value) { + addCriterion("third_part_template <", value, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateLessThanOrEqualTo(Boolean value) { + addCriterion("third_part_template <=", value, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateIn(List values) { + addCriterion("third_part_template in", values, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateNotIn(List values) { + addCriterion("third_part_template not in", values, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateBetween(Boolean value1, Boolean value2) { + addCriterion("third_part_template between", value1, value2, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andThirdPartTemplateNotBetween(Boolean value1, Boolean value2) { + addCriterion("third_part_template not between", value1, value2, "thirdPartTemplate"); + return (Criteria) this; + } + + public Criteria andVersionEnableIsNull() { + addCriterion("version_enable is null"); + return (Criteria) this; + } + + public Criteria andVersionEnableIsNotNull() { + addCriterion("version_enable is not null"); + return (Criteria) this; + } + + public Criteria andVersionEnableEqualTo(Boolean value) { + addCriterion("version_enable =", value, "versionEnable"); + return (Criteria) this; + } + + public Criteria andVersionEnableNotEqualTo(Boolean value) { + addCriterion("version_enable <>", value, "versionEnable"); + return (Criteria) this; + } + + public Criteria andVersionEnableGreaterThan(Boolean value) { + addCriterion("version_enable >", value, "versionEnable"); + return (Criteria) this; + } + + public Criteria andVersionEnableGreaterThanOrEqualTo(Boolean value) { + addCriterion("version_enable >=", value, "versionEnable"); + return (Criteria) this; + } + + public Criteria andVersionEnableLessThan(Boolean value) { + addCriterion("version_enable <", value, "versionEnable"); + return (Criteria) this; + } + + public Criteria andVersionEnableLessThanOrEqualTo(Boolean value) { + addCriterion("version_enable <=", value, "versionEnable"); + return (Criteria) this; + } + + public Criteria andVersionEnableIn(List values) { + addCriterion("version_enable in", values, "versionEnable"); + return (Criteria) this; + } + + public Criteria andVersionEnableNotIn(List values) { + addCriterion("version_enable not in", values, "versionEnable"); + return (Criteria) this; + } + + public Criteria andVersionEnableBetween(Boolean value1, Boolean value2) { + addCriterion("version_enable between", value1, value2, "versionEnable"); + return (Criteria) this; + } + + public Criteria andVersionEnableNotBetween(Boolean value1, Boolean value2) { + addCriterion("version_enable not between", value1, value2, "versionEnable"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdIsNull() { + addCriterion("api_template_id is null"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdIsNotNull() { + addCriterion("api_template_id is not null"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdEqualTo(String value) { + addCriterion("api_template_id =", value, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdNotEqualTo(String value) { + addCriterion("api_template_id <>", value, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdGreaterThan(String value) { + addCriterion("api_template_id >", value, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdGreaterThanOrEqualTo(String value) { + addCriterion("api_template_id >=", value, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdLessThan(String value) { + addCriterion("api_template_id <", value, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdLessThanOrEqualTo(String value) { + addCriterion("api_template_id <=", value, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdLike(String value) { + addCriterion("api_template_id like", value, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdNotLike(String value) { + addCriterion("api_template_id not like", value, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdIn(List values) { + addCriterion("api_template_id in", values, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdNotIn(List values) { + addCriterion("api_template_id not in", values, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdBetween(String value1, String value2) { + addCriterion("api_template_id between", value1, value2, "apiTemplateId"); + return (Criteria) this; + } + + public Criteria andApiTemplateIdNotBetween(String value1, String value2) { + addCriterion("api_template_id not between", value1, value2, "apiTemplateId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 6c525b4124..5a265378b0 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,71 +1,57 @@ package io.metersphere.project.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "版本管理") -@Table("project_version") @Data public class ProjectVersion implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{project_version.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "版本ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{project_version.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{project_version.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{project_version.project_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{project_version.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{project_version.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") private String projectId; + @Schema(title = "版本名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{project_version.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 100, message = "{project_version.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{project_version.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "版本名称", required = true, allowableValues = "range[1, 100]") private String name; - - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 200]") + @Schema(title = "描述") private String description; - - @ApiModelProperty(name = "状态", required = false, allowableValues = "range[1, 20]") + @Schema(title = "状态") private String status; + @Schema(title = "是否是最新版", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") + @NotBlank(message = "{project_version.latest.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 1, message = "{project_version.latest.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{project_version.latest.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否是最新版", required = true, allowableValues = "range[1, 1]") private Boolean latest; - - @ApiModelProperty(name = "发布时间", required = false, allowableValues = "range[1, ]") + @Schema(title = "发布时间") private Long publishTime; - - @ApiModelProperty(name = "开始时间", required = false, allowableValues = "range[1, ]") + @Schema(title = "开始时间") private Long startTime; - - @ApiModelProperty(name = "结束时间", required = false, allowableValues = "range[1, ]") + @Schema(title = "结束时间") private Long endTime; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{project_version.create_user.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 100, message = "{project_version.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{project_version.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]") private String createUser; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectVersionExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectVersionExample.java new file mode 100644 index 0000000000..5dbfbdd126 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectVersionExample.java @@ -0,0 +1,920 @@ +package io.metersphere.project.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ProjectVersionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProjectVersionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andLatestIsNull() { + addCriterion("latest is null"); + return (Criteria) this; + } + + public Criteria andLatestIsNotNull() { + addCriterion("latest is not null"); + return (Criteria) this; + } + + public Criteria andLatestEqualTo(Boolean value) { + addCriterion("latest =", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestNotEqualTo(Boolean value) { + addCriterion("latest <>", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestGreaterThan(Boolean value) { + addCriterion("latest >", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestGreaterThanOrEqualTo(Boolean value) { + addCriterion("latest >=", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestLessThan(Boolean value) { + addCriterion("latest <", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestLessThanOrEqualTo(Boolean value) { + addCriterion("latest <=", value, "latest"); + return (Criteria) this; + } + + public Criteria andLatestIn(List values) { + addCriterion("latest in", values, "latest"); + return (Criteria) this; + } + + public Criteria andLatestNotIn(List values) { + addCriterion("latest not in", values, "latest"); + return (Criteria) this; + } + + public Criteria andLatestBetween(Boolean value1, Boolean value2) { + addCriterion("latest between", value1, value2, "latest"); + return (Criteria) this; + } + + public Criteria andLatestNotBetween(Boolean value1, Boolean value2) { + addCriterion("latest not between", value1, value2, "latest"); + return (Criteria) this; + } + + public Criteria andPublishTimeIsNull() { + addCriterion("publish_time is null"); + return (Criteria) this; + } + + public Criteria andPublishTimeIsNotNull() { + addCriterion("publish_time is not null"); + return (Criteria) this; + } + + public Criteria andPublishTimeEqualTo(Long value) { + addCriterion("publish_time =", value, "publishTime"); + return (Criteria) this; + } + + public Criteria andPublishTimeNotEqualTo(Long value) { + addCriterion("publish_time <>", value, "publishTime"); + return (Criteria) this; + } + + public Criteria andPublishTimeGreaterThan(Long value) { + addCriterion("publish_time >", value, "publishTime"); + return (Criteria) this; + } + + public Criteria andPublishTimeGreaterThanOrEqualTo(Long value) { + addCriterion("publish_time >=", value, "publishTime"); + return (Criteria) this; + } + + public Criteria andPublishTimeLessThan(Long value) { + addCriterion("publish_time <", value, "publishTime"); + return (Criteria) this; + } + + public Criteria andPublishTimeLessThanOrEqualTo(Long value) { + addCriterion("publish_time <=", value, "publishTime"); + return (Criteria) this; + } + + public Criteria andPublishTimeIn(List values) { + addCriterion("publish_time in", values, "publishTime"); + return (Criteria) this; + } + + public Criteria andPublishTimeNotIn(List values) { + addCriterion("publish_time not in", values, "publishTime"); + return (Criteria) this; + } + + public Criteria andPublishTimeBetween(Long value1, Long value2) { + addCriterion("publish_time between", value1, value2, "publishTime"); + return (Criteria) this; + } + + public Criteria andPublishTimeNotBetween(Long value1, Long value2) { + addCriterion("publish_time not between", value1, value2, "publishTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Long value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Long value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Long value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Long value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Long value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Long value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Long value1, Long value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Long value1, Long value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(Long value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(Long value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(Long value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(Long value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(Long value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(Long value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(Long value1, Long value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(Long value1, Long value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.java new file mode 100644 index 0000000000..ca976fb07a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.ApiTemplate; +import io.metersphere.project.domain.ApiTemplateExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ApiTemplateMapper { + long countByExample(ApiTemplateExample example); + + int deleteByExample(ApiTemplateExample example); + + int deleteByPrimaryKey(String id); + + int insert(ApiTemplate record); + + int insertSelective(ApiTemplate record); + + List selectByExample(ApiTemplateExample example); + + ApiTemplate selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ApiTemplate record, @Param("example") ApiTemplateExample example); + + int updateByExample(@Param("record") ApiTemplate record, @Param("example") ApiTemplateExample example); + + int updateByPrimaryKeySelective(ApiTemplate record); + + int updateByPrimaryKey(ApiTemplate record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.xml new file mode 100644 index 0000000000..bd769097ba --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ApiTemplateMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, description, `system`, create_time, create_user, project_id + + + + + delete from api_template + where id = #{id,jdbcType=VARCHAR} + + + delete from api_template + + + + + + insert into api_template (id, `name`, description, + `system`, create_time, create_user, + project_id) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{system,jdbcType=BIT}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{projectId,jdbcType=VARCHAR}) + + + insert into api_template + + + id, + + + `name`, + + + description, + + + `system`, + + + create_time, + + + create_user, + + + project_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{system,jdbcType=BIT}, + + + #{createTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + + + + update api_template + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + `system` = #{record.system,jdbcType=BIT}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + + + + + + update api_template + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + `system` = #{record.system,jdbcType=BIT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR} + + + + + + update api_template + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + `system` = #{system,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update api_template + set `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + `system` = #{system,jdbcType=BIT}, + create_time = #{createTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.java new file mode 100644 index 0000000000..0b51b5bb30 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.CustomField; +import io.metersphere.project.domain.CustomFieldExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CustomFieldMapper { + long countByExample(CustomFieldExample example); + + int deleteByExample(CustomFieldExample example); + + int deleteByPrimaryKey(String id); + + int insert(CustomField record); + + int insertSelective(CustomField record); + + List selectByExampleWithBLOBs(CustomFieldExample example); + + List selectByExample(CustomFieldExample example); + + CustomField selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") CustomField record, @Param("example") CustomFieldExample example); + + int updateByExampleWithBLOBs(@Param("record") CustomField record, @Param("example") CustomFieldExample example); + + int updateByExample(@Param("record") CustomField record, @Param("example") CustomFieldExample example); + + int updateByPrimaryKeySelective(CustomField record); + + int updateByPrimaryKeyWithBLOBs(CustomField record); + + int updateByPrimaryKey(CustomField record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.xml new file mode 100644 index 0000000000..f0f52c6c49 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldMapper.xml @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, scene, `type`, remark, `system`, `global`, create_time, update_time, + create_user, project_id, third_part + + + `options` + + + + + + delete from custom_field + where id = #{id,jdbcType=VARCHAR} + + + delete from custom_field + + + + + + insert into custom_field (id, `name`, scene, + `type`, remark, `system`, `global`, + create_time, update_time, create_user, + project_id, third_part, `options` + ) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{scene,jdbcType=VARCHAR}, + #{type,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{system,jdbcType=BIT}, #{global,jdbcType=BIT}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{projectId,jdbcType=VARCHAR}, #{thirdPart,jdbcType=BIT}, #{options,jdbcType=LONGVARCHAR} + ) + + + insert into custom_field + + + id, + + + `name`, + + + scene, + + + `type`, + + + remark, + + + `system`, + + + `global`, + + + create_time, + + + update_time, + + + create_user, + + + project_id, + + + third_part, + + + `options`, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{scene,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{system,jdbcType=BIT}, + + + #{global,jdbcType=BIT}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{thirdPart,jdbcType=BIT}, + + + #{options,jdbcType=LONGVARCHAR}, + + + + + + update custom_field + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + scene = #{record.scene,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + `system` = #{record.system,jdbcType=BIT}, + + + `global` = #{record.global,jdbcType=BIT}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + third_part = #{record.thirdPart,jdbcType=BIT}, + + + `options` = #{record.options,jdbcType=LONGVARCHAR}, + + + + + + + + update custom_field + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + scene = #{record.scene,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + `system` = #{record.system,jdbcType=BIT}, + `global` = #{record.global,jdbcType=BIT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + third_part = #{record.thirdPart,jdbcType=BIT}, + `options` = #{record.options,jdbcType=LONGVARCHAR} + + + + + + update custom_field + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + scene = #{record.scene,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + `system` = #{record.system,jdbcType=BIT}, + `global` = #{record.global,jdbcType=BIT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + third_part = #{record.thirdPart,jdbcType=BIT} + + + + + + update custom_field + + + `name` = #{name,jdbcType=VARCHAR}, + + + scene = #{scene,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + `system` = #{system,jdbcType=BIT}, + + + `global` = #{global,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + third_part = #{thirdPart,jdbcType=BIT}, + + + `options` = #{options,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update custom_field + set `name` = #{name,jdbcType=VARCHAR}, + scene = #{scene,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + `system` = #{system,jdbcType=BIT}, + `global` = #{global,jdbcType=BIT}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + third_part = #{thirdPart,jdbcType=BIT}, + `options` = #{options,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update custom_field + set `name` = #{name,jdbcType=VARCHAR}, + scene = #{scene,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + `system` = #{system,jdbcType=BIT}, + `global` = #{global,jdbcType=BIT}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + third_part = #{thirdPart,jdbcType=BIT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.java new file mode 100644 index 0000000000..0aa6c99ce1 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.CustomFieldTemplate; +import io.metersphere.project.domain.CustomFieldTemplateExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CustomFieldTemplateMapper { + long countByExample(CustomFieldTemplateExample example); + + int deleteByExample(CustomFieldTemplateExample example); + + int deleteByPrimaryKey(String id); + + int insert(CustomFieldTemplate record); + + int insertSelective(CustomFieldTemplate record); + + List selectByExampleWithBLOBs(CustomFieldTemplateExample example); + + List selectByExample(CustomFieldTemplateExample example); + + CustomFieldTemplate selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example); + + int updateByExampleWithBLOBs(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example); + + int updateByExample(@Param("record") CustomFieldTemplate record, @Param("example") CustomFieldTemplateExample example); + + int updateByPrimaryKeySelective(CustomFieldTemplate record); + + int updateByPrimaryKeyWithBLOBs(CustomFieldTemplate record); + + int updateByPrimaryKey(CustomFieldTemplate record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.xml new file mode 100644 index 0000000000..a1b8eea5a8 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFieldTemplateMapper.xml @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, field_id, template_id, scene, required, pos, custom_data, `key` + + + default_value + + + + + + delete from custom_field_template + where id = #{id,jdbcType=VARCHAR} + + + delete from custom_field_template + + + + + + insert into custom_field_template (id, field_id, template_id, + scene, required, pos, custom_data, + `key`, default_value) + values (#{id,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{templateId,jdbcType=VARCHAR}, + #{scene,jdbcType=VARCHAR}, #{required,jdbcType=BIT}, #{pos,jdbcType=INTEGER}, #{customData,jdbcType=VARCHAR}, + #{key,jdbcType=VARCHAR}, #{defaultValue,jdbcType=LONGVARBINARY}) + + + insert into custom_field_template + + + id, + + + field_id, + + + template_id, + + + scene, + + + required, + + + pos, + + + custom_data, + + + `key`, + + + default_value, + + + + + #{id,jdbcType=VARCHAR}, + + + #{fieldId,jdbcType=VARCHAR}, + + + #{templateId,jdbcType=VARCHAR}, + + + #{scene,jdbcType=VARCHAR}, + + + #{required,jdbcType=BIT}, + + + #{pos,jdbcType=INTEGER}, + + + #{customData,jdbcType=VARCHAR}, + + + #{key,jdbcType=VARCHAR}, + + + #{defaultValue,jdbcType=LONGVARBINARY}, + + + + + + update custom_field_template + + + id = #{record.id,jdbcType=VARCHAR}, + + + field_id = #{record.fieldId,jdbcType=VARCHAR}, + + + template_id = #{record.templateId,jdbcType=VARCHAR}, + + + scene = #{record.scene,jdbcType=VARCHAR}, + + + required = #{record.required,jdbcType=BIT}, + + + pos = #{record.pos,jdbcType=INTEGER}, + + + custom_data = #{record.customData,jdbcType=VARCHAR}, + + + `key` = #{record.key,jdbcType=VARCHAR}, + + + default_value = #{record.defaultValue,jdbcType=LONGVARBINARY}, + + + + + + + + update custom_field_template + set id = #{record.id,jdbcType=VARCHAR}, + field_id = #{record.fieldId,jdbcType=VARCHAR}, + template_id = #{record.templateId,jdbcType=VARCHAR}, + scene = #{record.scene,jdbcType=VARCHAR}, + required = #{record.required,jdbcType=BIT}, + pos = #{record.pos,jdbcType=INTEGER}, + custom_data = #{record.customData,jdbcType=VARCHAR}, + `key` = #{record.key,jdbcType=VARCHAR}, + default_value = #{record.defaultValue,jdbcType=LONGVARBINARY} + + + + + + update custom_field_template + set id = #{record.id,jdbcType=VARCHAR}, + field_id = #{record.fieldId,jdbcType=VARCHAR}, + template_id = #{record.templateId,jdbcType=VARCHAR}, + scene = #{record.scene,jdbcType=VARCHAR}, + required = #{record.required,jdbcType=BIT}, + pos = #{record.pos,jdbcType=INTEGER}, + custom_data = #{record.customData,jdbcType=VARCHAR}, + `key` = #{record.key,jdbcType=VARCHAR} + + + + + + update custom_field_template + + + field_id = #{fieldId,jdbcType=VARCHAR}, + + + template_id = #{templateId,jdbcType=VARCHAR}, + + + scene = #{scene,jdbcType=VARCHAR}, + + + required = #{required,jdbcType=BIT}, + + + pos = #{pos,jdbcType=INTEGER}, + + + custom_data = #{customData,jdbcType=VARCHAR}, + + + `key` = #{key,jdbcType=VARCHAR}, + + + default_value = #{defaultValue,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update custom_field_template + set field_id = #{fieldId,jdbcType=VARCHAR}, + template_id = #{templateId,jdbcType=VARCHAR}, + scene = #{scene,jdbcType=VARCHAR}, + required = #{required,jdbcType=BIT}, + pos = #{pos,jdbcType=INTEGER}, + custom_data = #{customData,jdbcType=VARCHAR}, + `key` = #{key,jdbcType=VARCHAR}, + default_value = #{defaultValue,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update custom_field_template + set field_id = #{fieldId,jdbcType=VARCHAR}, + template_id = #{templateId,jdbcType=VARCHAR}, + scene = #{scene,jdbcType=VARCHAR}, + required = #{required,jdbcType=BIT}, + pos = #{pos,jdbcType=INTEGER}, + custom_data = #{customData,jdbcType=VARCHAR}, + `key` = #{key,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionBlobMapper.java new file mode 100644 index 0000000000..9424a1a1ef --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionBlobMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.CustomFunctionBlob; +import io.metersphere.project.domain.CustomFunctionBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CustomFunctionBlobMapper { + long countByExample(CustomFunctionBlobExample example); + + int deleteByExample(CustomFunctionBlobExample example); + + int deleteByPrimaryKey(String functionId); + + int insert(CustomFunctionBlob record); + + int insertSelective(CustomFunctionBlob record); + + List selectByExampleWithBLOBs(CustomFunctionBlobExample example); + + List selectByExample(CustomFunctionBlobExample example); + + CustomFunctionBlob selectByPrimaryKey(String functionId); + + int updateByExampleSelective(@Param("record") CustomFunctionBlob record, @Param("example") CustomFunctionBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") CustomFunctionBlob record, @Param("example") CustomFunctionBlobExample example); + + int updateByExample(@Param("record") CustomFunctionBlob record, @Param("example") CustomFunctionBlobExample example); + + int updateByPrimaryKeySelective(CustomFunctionBlob record); + + int updateByPrimaryKeyWithBLOBs(CustomFunctionBlob record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionBlobMapper.xml new file mode 100644 index 0000000000..32b281f1d7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionBlobMapper.xml @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + function_id + + + params, script, `result` + + + + + + delete from custom_function_blob + where function_id = #{functionId,jdbcType=VARCHAR} + + + delete from custom_function_blob + + + + + + insert into custom_function_blob (function_id, params, script, + `result`) + values (#{functionId,jdbcType=VARCHAR}, #{params,jdbcType=LONGVARBINARY}, #{script,jdbcType=LONGVARBINARY}, + #{result,jdbcType=LONGVARBINARY}) + + + insert into custom_function_blob + + + function_id, + + + params, + + + script, + + + `result`, + + + + + #{functionId,jdbcType=VARCHAR}, + + + #{params,jdbcType=LONGVARBINARY}, + + + #{script,jdbcType=LONGVARBINARY}, + + + #{result,jdbcType=LONGVARBINARY}, + + + + + + update custom_function_blob + + + function_id = #{record.functionId,jdbcType=VARCHAR}, + + + params = #{record.params,jdbcType=LONGVARBINARY}, + + + script = #{record.script,jdbcType=LONGVARBINARY}, + + + `result` = #{record.result,jdbcType=LONGVARBINARY}, + + + + + + + + update custom_function_blob + set function_id = #{record.functionId,jdbcType=VARCHAR}, + params = #{record.params,jdbcType=LONGVARBINARY}, + script = #{record.script,jdbcType=LONGVARBINARY}, + `result` = #{record.result,jdbcType=LONGVARBINARY} + + + + + + update custom_function_blob + set function_id = #{record.functionId,jdbcType=VARCHAR} + + + + + + update custom_function_blob + + + params = #{params,jdbcType=LONGVARBINARY}, + + + script = #{script,jdbcType=LONGVARBINARY}, + + + `result` = #{result,jdbcType=LONGVARBINARY}, + + + where function_id = #{functionId,jdbcType=VARCHAR} + + + update custom_function_blob + set params = #{params,jdbcType=LONGVARBINARY}, + script = #{script,jdbcType=LONGVARBINARY}, + `result` = #{result,jdbcType=LONGVARBINARY} + where function_id = #{functionId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionMapper.java new file mode 100644 index 0000000000..502d4ffa3d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.CustomFunction; +import io.metersphere.project.domain.CustomFunctionExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CustomFunctionMapper { + long countByExample(CustomFunctionExample example); + + int deleteByExample(CustomFunctionExample example); + + int deleteByPrimaryKey(String id); + + int insert(CustomFunction record); + + int insertSelective(CustomFunction record); + + List selectByExample(CustomFunctionExample example); + + CustomFunction selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") CustomFunction record, @Param("example") CustomFunctionExample example); + + int updateByExample(@Param("record") CustomFunction record, @Param("example") CustomFunctionExample example); + + int updateByPrimaryKeySelective(CustomFunction record); + + int updateByPrimaryKey(CustomFunction record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionMapper.xml new file mode 100644 index 0000000000..448a585435 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/CustomFunctionMapper.xml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, tags, description + + + + + delete from custom_function + where id = #{id,jdbcType=VARCHAR} + + + delete from custom_function + + + + + + insert into custom_function (id, `name`, tags, + description) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}) + + + insert into custom_function + + + id, + + + `name`, + + + tags, + + + description, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{tags,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + + + + update custom_function + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + tags = #{record.tags,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + + + + + + update custom_function + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + tags = #{record.tags,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR} + + + + + + update custom_function + + + `name` = #{name,jdbcType=VARCHAR}, + + + tags = #{tags,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update custom_function + set `name` = #{name,jdbcType=VARCHAR}, + tags = #{tags,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorBlobMapper.java new file mode 100644 index 0000000000..97181784eb --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorBlobMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.FakeErrorBlob; +import io.metersphere.project.domain.FakeErrorBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FakeErrorBlobMapper { + long countByExample(FakeErrorBlobExample example); + + int deleteByExample(FakeErrorBlobExample example); + + int deleteByPrimaryKey(String fakeErrorId); + + int insert(FakeErrorBlob record); + + int insertSelective(FakeErrorBlob record); + + List selectByExampleWithBLOBs(FakeErrorBlobExample example); + + List selectByExample(FakeErrorBlobExample example); + + FakeErrorBlob selectByPrimaryKey(String fakeErrorId); + + int updateByExampleSelective(@Param("record") FakeErrorBlob record, @Param("example") FakeErrorBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") FakeErrorBlob record, @Param("example") FakeErrorBlobExample example); + + int updateByExample(@Param("record") FakeErrorBlob record, @Param("example") FakeErrorBlobExample example); + + int updateByPrimaryKeySelective(FakeErrorBlob record); + + int updateByPrimaryKeyWithBLOBs(FakeErrorBlob record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorBlobMapper.xml new file mode 100644 index 0000000000..5c2fa4f75d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorBlobMapper.xml @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + fake_error_id + + + content, description + + + + + + delete from fake_error_blob + where fake_error_id = #{fakeErrorId,jdbcType=VARCHAR} + + + delete from fake_error_blob + + + + + + insert into fake_error_blob (fake_error_id, content, description + ) + values (#{fakeErrorId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARBINARY}, #{description,jdbcType=LONGVARBINARY} + ) + + + insert into fake_error_blob + + + fake_error_id, + + + content, + + + description, + + + + + #{fakeErrorId,jdbcType=VARCHAR}, + + + #{content,jdbcType=LONGVARBINARY}, + + + #{description,jdbcType=LONGVARBINARY}, + + + + + + update fake_error_blob + + + fake_error_id = #{record.fakeErrorId,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=LONGVARBINARY}, + + + description = #{record.description,jdbcType=LONGVARBINARY}, + + + + + + + + update fake_error_blob + set fake_error_id = #{record.fakeErrorId,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=LONGVARBINARY}, + description = #{record.description,jdbcType=LONGVARBINARY} + + + + + + update fake_error_blob + set fake_error_id = #{record.fakeErrorId,jdbcType=VARCHAR} + + + + + + update fake_error_blob + + + content = #{content,jdbcType=LONGVARBINARY}, + + + description = #{description,jdbcType=LONGVARBINARY}, + + + where fake_error_id = #{fakeErrorId,jdbcType=VARCHAR} + + + update fake_error_blob + set content = #{content,jdbcType=LONGVARBINARY}, + description = #{description,jdbcType=LONGVARBINARY} + where fake_error_id = #{fakeErrorId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorMapper.java new file mode 100644 index 0000000000..b5c429be4d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.FakeError; +import io.metersphere.project.domain.FakeErrorExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FakeErrorMapper { + long countByExample(FakeErrorExample example); + + int deleteByExample(FakeErrorExample example); + + int deleteByPrimaryKey(String id); + + int insert(FakeError record); + + int insertSelective(FakeError record); + + List selectByExample(FakeErrorExample example); + + FakeError selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") FakeError record, @Param("example") FakeErrorExample example); + + int updateByExample(@Param("record") FakeError record, @Param("example") FakeErrorExample example); + + int updateByPrimaryKeySelective(FakeError record); + + int updateByPrimaryKey(FakeError record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorMapper.xml new file mode 100644 index 0000000000..c86b5c6c68 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FakeErrorMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, create_time, update_time, create_user, update_user, error_code, match_type, + `status` + + + + + delete from fake_error + where id = #{id,jdbcType=VARCHAR} + + + delete from fake_error + + + + + + insert into fake_error (id, project_id, create_time, + update_time, create_user, update_user, + error_code, match_type, `status` + ) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR}, + #{errorCode,jdbcType=VARCHAR}, #{matchType,jdbcType=VARCHAR}, #{status,jdbcType=BIT} + ) + + + insert into fake_error + + + id, + + + project_id, + + + create_time, + + + update_time, + + + create_user, + + + update_user, + + + error_code, + + + match_type, + + + `status`, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{updateUser,jdbcType=VARCHAR}, + + + #{errorCode,jdbcType=VARCHAR}, + + + #{matchType,jdbcType=VARCHAR}, + + + #{status,jdbcType=BIT}, + + + + + + update fake_error + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + update_user = #{record.updateUser,jdbcType=VARCHAR}, + + + error_code = #{record.errorCode,jdbcType=VARCHAR}, + + + match_type = #{record.matchType,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=BIT}, + + + + + + + + update fake_error + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + update_user = #{record.updateUser,jdbcType=VARCHAR}, + error_code = #{record.errorCode,jdbcType=VARCHAR}, + match_type = #{record.matchType,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=BIT} + + + + + + update fake_error + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + update_user = #{updateUser,jdbcType=VARCHAR}, + + + error_code = #{errorCode,jdbcType=VARCHAR}, + + + match_type = #{matchType,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=BIT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update fake_error + set project_id = #{projectId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + update_user = #{updateUser,jdbcType=VARCHAR}, + error_code = #{errorCode,jdbcType=VARCHAR}, + match_type = #{matchType,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=BIT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataBlobMapper.java new file mode 100644 index 0000000000..ce83c930a8 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataBlobMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.FileMetadataBlob; +import io.metersphere.project.domain.FileMetadataBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FileMetadataBlobMapper { + long countByExample(FileMetadataBlobExample example); + + int deleteByExample(FileMetadataBlobExample example); + + int deleteByPrimaryKey(String fileId); + + int insert(FileMetadataBlob record); + + int insertSelective(FileMetadataBlob record); + + List selectByExampleWithBLOBs(FileMetadataBlobExample example); + + List selectByExample(FileMetadataBlobExample example); + + FileMetadataBlob selectByPrimaryKey(String fileId); + + int updateByExampleSelective(@Param("record") FileMetadataBlob record, @Param("example") FileMetadataBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") FileMetadataBlob record, @Param("example") FileMetadataBlobExample example); + + int updateByExample(@Param("record") FileMetadataBlob record, @Param("example") FileMetadataBlobExample example); + + int updateByPrimaryKeySelective(FileMetadataBlob record); + + int updateByPrimaryKeyWithBLOBs(FileMetadataBlob record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataBlobMapper.xml new file mode 100644 index 0000000000..6768253255 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataBlobMapper.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + file_id + + + git_info + + + + + + delete from file_metadata_blob + where file_id = #{fileId,jdbcType=VARCHAR} + + + delete from file_metadata_blob + + + + + + insert into file_metadata_blob (file_id, git_info) + values (#{fileId,jdbcType=VARCHAR}, #{gitInfo,jdbcType=LONGVARBINARY}) + + + insert into file_metadata_blob + + + file_id, + + + git_info, + + + + + #{fileId,jdbcType=VARCHAR}, + + + #{gitInfo,jdbcType=LONGVARBINARY}, + + + + + + update file_metadata_blob + + + file_id = #{record.fileId,jdbcType=VARCHAR}, + + + git_info = #{record.gitInfo,jdbcType=LONGVARBINARY}, + + + + + + + + update file_metadata_blob + set file_id = #{record.fileId,jdbcType=VARCHAR}, + git_info = #{record.gitInfo,jdbcType=LONGVARBINARY} + + + + + + update file_metadata_blob + set file_id = #{record.fileId,jdbcType=VARCHAR} + + + + + + update file_metadata_blob + + + git_info = #{gitInfo,jdbcType=LONGVARBINARY}, + + + where file_id = #{fileId,jdbcType=VARCHAR} + + + update file_metadata_blob + set git_info = #{gitInfo,jdbcType=LONGVARBINARY} + where file_id = #{fileId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataMapper.java new file mode 100644 index 0000000000..85f5f56982 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.FileMetadata; +import io.metersphere.project.domain.FileMetadataExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FileMetadataMapper { + long countByExample(FileMetadataExample example); + + int deleteByExample(FileMetadataExample example); + + int deleteByPrimaryKey(String id); + + int insert(FileMetadata record); + + int insertSelective(FileMetadata record); + + List selectByExample(FileMetadataExample example); + + FileMetadata selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") FileMetadata record, @Param("example") FileMetadataExample example); + + int updateByExample(@Param("record") FileMetadata record, @Param("example") FileMetadataExample example); + + int updateByPrimaryKeySelective(FileMetadata record); + + int updateByPrimaryKey(FileMetadata record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataMapper.xml new file mode 100644 index 0000000000..5eab066ad4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileMetadataMapper.xml @@ -0,0 +1,418 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, `type`, `size`, create_time, update_time, project_id, `storage`, create_user, + update_user, tags, description, module_id, load_jar, `path`, resource_type, latest, + ref_id + + + + + delete from file_metadata + where id = #{id,jdbcType=VARCHAR} + + + delete from file_metadata + + + + + + insert into file_metadata (id, `name`, `type`, + `size`, create_time, update_time, + project_id, `storage`, create_user, + update_user, tags, description, + module_id, load_jar, `path`, + resource_type, latest, ref_id + ) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{size,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{projectId,jdbcType=VARCHAR}, #{storage,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, + #{updateUser,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{moduleId,jdbcType=VARCHAR}, #{loadJar,jdbcType=BIT}, #{path,jdbcType=VARCHAR}, + #{resourceType,jdbcType=VARCHAR}, #{latest,jdbcType=BIT}, #{refId,jdbcType=VARCHAR} + ) + + + insert into file_metadata + + + id, + + + `name`, + + + `type`, + + + `size`, + + + create_time, + + + update_time, + + + project_id, + + + `storage`, + + + create_user, + + + update_user, + + + tags, + + + description, + + + module_id, + + + load_jar, + + + `path`, + + + resource_type, + + + latest, + + + ref_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{size,jdbcType=BIGINT}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{storage,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{updateUser,jdbcType=VARCHAR}, + + + #{tags,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{moduleId,jdbcType=VARCHAR}, + + + #{loadJar,jdbcType=BIT}, + + + #{path,jdbcType=VARCHAR}, + + + #{resourceType,jdbcType=VARCHAR}, + + + #{latest,jdbcType=BIT}, + + + #{refId,jdbcType=VARCHAR}, + + + + + + update file_metadata + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + `size` = #{record.size,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `storage` = #{record.storage,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + update_user = #{record.updateUser,jdbcType=VARCHAR}, + + + tags = #{record.tags,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + module_id = #{record.moduleId,jdbcType=VARCHAR}, + + + load_jar = #{record.loadJar,jdbcType=BIT}, + + + `path` = #{record.path,jdbcType=VARCHAR}, + + + resource_type = #{record.resourceType,jdbcType=VARCHAR}, + + + latest = #{record.latest,jdbcType=BIT}, + + + ref_id = #{record.refId,jdbcType=VARCHAR}, + + + + + + + + update file_metadata + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + `size` = #{record.size,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `storage` = #{record.storage,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + update_user = #{record.updateUser,jdbcType=VARCHAR}, + tags = #{record.tags,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + module_id = #{record.moduleId,jdbcType=VARCHAR}, + load_jar = #{record.loadJar,jdbcType=BIT}, + `path` = #{record.path,jdbcType=VARCHAR}, + resource_type = #{record.resourceType,jdbcType=VARCHAR}, + latest = #{record.latest,jdbcType=BIT}, + ref_id = #{record.refId,jdbcType=VARCHAR} + + + + + + update file_metadata + + + `name` = #{name,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + `size` = #{size,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `storage` = #{storage,jdbcType=VARCHAR}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + update_user = #{updateUser,jdbcType=VARCHAR}, + + + tags = #{tags,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + module_id = #{moduleId,jdbcType=VARCHAR}, + + + load_jar = #{loadJar,jdbcType=BIT}, + + + `path` = #{path,jdbcType=VARCHAR}, + + + resource_type = #{resourceType,jdbcType=VARCHAR}, + + + latest = #{latest,jdbcType=BIT}, + + + ref_id = #{refId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update file_metadata + set `name` = #{name,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + `size` = #{size,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=VARCHAR}, + `storage` = #{storage,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + update_user = #{updateUser,jdbcType=VARCHAR}, + tags = #{tags,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + module_id = #{moduleId,jdbcType=VARCHAR}, + load_jar = #{loadJar,jdbcType=BIT}, + `path` = #{path,jdbcType=VARCHAR}, + resource_type = #{resourceType,jdbcType=VARCHAR}, + latest = #{latest,jdbcType=BIT}, + ref_id = #{refId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleBlobMapper.java new file mode 100644 index 0000000000..9e9a45a7c1 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleBlobMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.FileModuleBlob; +import io.metersphere.project.domain.FileModuleBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FileModuleBlobMapper { + long countByExample(FileModuleBlobExample example); + + int deleteByExample(FileModuleBlobExample example); + + int deleteByPrimaryKey(String fileModuleId); + + int insert(FileModuleBlob record); + + int insertSelective(FileModuleBlob record); + + List selectByExampleWithBLOBs(FileModuleBlobExample example); + + List selectByExample(FileModuleBlobExample example); + + FileModuleBlob selectByPrimaryKey(String fileModuleId); + + int updateByExampleSelective(@Param("record") FileModuleBlob record, @Param("example") FileModuleBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") FileModuleBlob record, @Param("example") FileModuleBlobExample example); + + int updateByExample(@Param("record") FileModuleBlob record, @Param("example") FileModuleBlobExample example); + + int updateByPrimaryKeySelective(FileModuleBlob record); + + int updateByPrimaryKeyWithBLOBs(FileModuleBlob record); + + int updateByPrimaryKey(FileModuleBlob record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleBlobMapper.xml new file mode 100644 index 0000000000..3a2388980d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleBlobMapper.xml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + file_module_id, repository_path, repository_user_name, repository_token + + + repository_desc + + + + + + delete from file_module_blob + where file_module_id = #{fileModuleId,jdbcType=VARCHAR} + + + delete from file_module_blob + + + + + + insert into file_module_blob (file_module_id, repository_path, repository_user_name, + repository_token, repository_desc) + values (#{fileModuleId,jdbcType=VARCHAR}, #{repositoryPath,jdbcType=VARCHAR}, #{repositoryUserName,jdbcType=VARCHAR}, + #{repositoryToken,jdbcType=VARCHAR}, #{repositoryDesc,jdbcType=LONGVARBINARY}) + + + insert into file_module_blob + + + file_module_id, + + + repository_path, + + + repository_user_name, + + + repository_token, + + + repository_desc, + + + + + #{fileModuleId,jdbcType=VARCHAR}, + + + #{repositoryPath,jdbcType=VARCHAR}, + + + #{repositoryUserName,jdbcType=VARCHAR}, + + + #{repositoryToken,jdbcType=VARCHAR}, + + + #{repositoryDesc,jdbcType=LONGVARBINARY}, + + + + + + update file_module_blob + + + file_module_id = #{record.fileModuleId,jdbcType=VARCHAR}, + + + repository_path = #{record.repositoryPath,jdbcType=VARCHAR}, + + + repository_user_name = #{record.repositoryUserName,jdbcType=VARCHAR}, + + + repository_token = #{record.repositoryToken,jdbcType=VARCHAR}, + + + repository_desc = #{record.repositoryDesc,jdbcType=LONGVARBINARY}, + + + + + + + + update file_module_blob + set file_module_id = #{record.fileModuleId,jdbcType=VARCHAR}, + repository_path = #{record.repositoryPath,jdbcType=VARCHAR}, + repository_user_name = #{record.repositoryUserName,jdbcType=VARCHAR}, + repository_token = #{record.repositoryToken,jdbcType=VARCHAR}, + repository_desc = #{record.repositoryDesc,jdbcType=LONGVARBINARY} + + + + + + update file_module_blob + set file_module_id = #{record.fileModuleId,jdbcType=VARCHAR}, + repository_path = #{record.repositoryPath,jdbcType=VARCHAR}, + repository_user_name = #{record.repositoryUserName,jdbcType=VARCHAR}, + repository_token = #{record.repositoryToken,jdbcType=VARCHAR} + + + + + + update file_module_blob + + + repository_path = #{repositoryPath,jdbcType=VARCHAR}, + + + repository_user_name = #{repositoryUserName,jdbcType=VARCHAR}, + + + repository_token = #{repositoryToken,jdbcType=VARCHAR}, + + + repository_desc = #{repositoryDesc,jdbcType=LONGVARBINARY}, + + + where file_module_id = #{fileModuleId,jdbcType=VARCHAR} + + + update file_module_blob + set repository_path = #{repositoryPath,jdbcType=VARCHAR}, + repository_user_name = #{repositoryUserName,jdbcType=VARCHAR}, + repository_token = #{repositoryToken,jdbcType=VARCHAR}, + repository_desc = #{repositoryDesc,jdbcType=LONGVARBINARY} + where file_module_id = #{fileModuleId,jdbcType=VARCHAR} + + + update file_module_blob + set repository_path = #{repositoryPath,jdbcType=VARCHAR}, + repository_user_name = #{repositoryUserName,jdbcType=VARCHAR}, + repository_token = #{repositoryToken,jdbcType=VARCHAR} + where file_module_id = #{fileModuleId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleMapper.java new file mode 100644 index 0000000000..1368080cd4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.FileModule; +import io.metersphere.project.domain.FileModuleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FileModuleMapper { + long countByExample(FileModuleExample example); + + int deleteByExample(FileModuleExample example); + + int deleteByPrimaryKey(String id); + + int insert(FileModule record); + + int insertSelective(FileModule record); + + List selectByExample(FileModuleExample example); + + FileModule selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") FileModule record, @Param("example") FileModuleExample example); + + int updateByExample(@Param("record") FileModule record, @Param("example") FileModuleExample example); + + int updateByPrimaryKeySelective(FileModule record); + + int updateByPrimaryKey(FileModule record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleMapper.xml new file mode 100644 index 0000000000..afc7c81434 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FileModuleMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, `name`, parent_id, `level`, create_time, update_time, pos, create_user, + module_type + + + + + delete from file_module + where id = #{id,jdbcType=VARCHAR} + + + delete from file_module + + + + + + insert into file_module (id, project_id, `name`, + parent_id, `level`, create_time, + update_time, pos, create_user, + module_type) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{parentId,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{pos,jdbcType=DOUBLE}, #{createUser,jdbcType=VARCHAR}, + #{moduleType,jdbcType=VARCHAR}) + + + insert into file_module + + + id, + + + project_id, + + + `name`, + + + parent_id, + + + `level`, + + + create_time, + + + update_time, + + + pos, + + + create_user, + + + module_type, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=VARCHAR}, + + + #{level,jdbcType=INTEGER}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{pos,jdbcType=DOUBLE}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{moduleType,jdbcType=VARCHAR}, + + + + + + update file_module + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + parent_id = #{record.parentId,jdbcType=VARCHAR}, + + + `level` = #{record.level,jdbcType=INTEGER}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + pos = #{record.pos,jdbcType=DOUBLE}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + module_type = #{record.moduleType,jdbcType=VARCHAR}, + + + + + + + + update file_module + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=VARCHAR}, + `level` = #{record.level,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + pos = #{record.pos,jdbcType=DOUBLE}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + module_type = #{record.moduleType,jdbcType=VARCHAR} + + + + + + update file_module + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=VARCHAR}, + + + `level` = #{level,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + pos = #{pos,jdbcType=DOUBLE}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + module_type = #{moduleType,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update file_module + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=VARCHAR}, + `level` = #{level,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + pos = #{pos,jdbcType=DOUBLE}, + create_user = #{createUser,jdbcType=VARCHAR}, + module_type = #{moduleType,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.java new file mode 100644 index 0000000000..3a1e57ad3b --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.FunctionalCaseTemplateExtend; +import io.metersphere.project.domain.FunctionalCaseTemplateExtendExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FunctionalCaseTemplateExtendMapper { + long countByExample(FunctionalCaseTemplateExtendExample example); + + int deleteByExample(FunctionalCaseTemplateExtendExample example); + + int deleteByPrimaryKey(String templateId); + + int insert(FunctionalCaseTemplateExtend record); + + int insertSelective(FunctionalCaseTemplateExtend record); + + List selectByExampleWithBLOBs(FunctionalCaseTemplateExtendExample example); + + List selectByExample(FunctionalCaseTemplateExtendExample example); + + FunctionalCaseTemplateExtend selectByPrimaryKey(String templateId); + + int updateByExampleSelective(@Param("record") FunctionalCaseTemplateExtend record, @Param("example") FunctionalCaseTemplateExtendExample example); + + int updateByExampleWithBLOBs(@Param("record") FunctionalCaseTemplateExtend record, @Param("example") FunctionalCaseTemplateExtendExample example); + + int updateByExample(@Param("record") FunctionalCaseTemplateExtend record, @Param("example") FunctionalCaseTemplateExtendExample example); + + int updateByPrimaryKeySelective(FunctionalCaseTemplateExtend record); + + int updateByPrimaryKeyWithBLOBs(FunctionalCaseTemplateExtend record); + + int updateByPrimaryKey(FunctionalCaseTemplateExtend record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.xml new file mode 100644 index 0000000000..69760c9704 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateExtendMapper.xml @@ -0,0 +1,298 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + template_id, case_name, step_model + + + prerequisite, step_description, expected_result, actual_result, steps + + + + + + delete from functional_case_template_extend + where template_id = #{templateId,jdbcType=VARCHAR} + + + delete from functional_case_template_extend + + + + + + insert into functional_case_template_extend (template_id, case_name, step_model, + prerequisite, step_description, + expected_result, actual_result, steps + ) + values (#{templateId,jdbcType=VARCHAR}, #{caseName,jdbcType=VARCHAR}, #{stepModel,jdbcType=VARCHAR}, + #{prerequisite,jdbcType=LONGVARCHAR}, #{stepDescription,jdbcType=LONGVARCHAR}, + #{expectedResult,jdbcType=LONGVARCHAR}, #{actualResult,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR} + ) + + + insert into functional_case_template_extend + + + template_id, + + + case_name, + + + step_model, + + + prerequisite, + + + step_description, + + + expected_result, + + + actual_result, + + + steps, + + + + + #{templateId,jdbcType=VARCHAR}, + + + #{caseName,jdbcType=VARCHAR}, + + + #{stepModel,jdbcType=VARCHAR}, + + + #{prerequisite,jdbcType=LONGVARCHAR}, + + + #{stepDescription,jdbcType=LONGVARCHAR}, + + + #{expectedResult,jdbcType=LONGVARCHAR}, + + + #{actualResult,jdbcType=LONGVARCHAR}, + + + #{steps,jdbcType=LONGVARCHAR}, + + + + + + update functional_case_template_extend + + + template_id = #{record.templateId,jdbcType=VARCHAR}, + + + case_name = #{record.caseName,jdbcType=VARCHAR}, + + + step_model = #{record.stepModel,jdbcType=VARCHAR}, + + + prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR}, + + + step_description = #{record.stepDescription,jdbcType=LONGVARCHAR}, + + + expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR}, + + + actual_result = #{record.actualResult,jdbcType=LONGVARCHAR}, + + + steps = #{record.steps,jdbcType=LONGVARCHAR}, + + + + + + + + update functional_case_template_extend + set template_id = #{record.templateId,jdbcType=VARCHAR}, + case_name = #{record.caseName,jdbcType=VARCHAR}, + step_model = #{record.stepModel,jdbcType=VARCHAR}, + prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR}, + step_description = #{record.stepDescription,jdbcType=LONGVARCHAR}, + expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR}, + actual_result = #{record.actualResult,jdbcType=LONGVARCHAR}, + steps = #{record.steps,jdbcType=LONGVARCHAR} + + + + + + update functional_case_template_extend + set template_id = #{record.templateId,jdbcType=VARCHAR}, + case_name = #{record.caseName,jdbcType=VARCHAR}, + step_model = #{record.stepModel,jdbcType=VARCHAR} + + + + + + update functional_case_template_extend + + + case_name = #{caseName,jdbcType=VARCHAR}, + + + step_model = #{stepModel,jdbcType=VARCHAR}, + + + prerequisite = #{prerequisite,jdbcType=LONGVARCHAR}, + + + step_description = #{stepDescription,jdbcType=LONGVARCHAR}, + + + expected_result = #{expectedResult,jdbcType=LONGVARCHAR}, + + + actual_result = #{actualResult,jdbcType=LONGVARCHAR}, + + + steps = #{steps,jdbcType=LONGVARCHAR}, + + + where template_id = #{templateId,jdbcType=VARCHAR} + + + update functional_case_template_extend + set case_name = #{caseName,jdbcType=VARCHAR}, + step_model = #{stepModel,jdbcType=VARCHAR}, + prerequisite = #{prerequisite,jdbcType=LONGVARCHAR}, + step_description = #{stepDescription,jdbcType=LONGVARCHAR}, + expected_result = #{expectedResult,jdbcType=LONGVARCHAR}, + actual_result = #{actualResult,jdbcType=LONGVARCHAR}, + steps = #{steps,jdbcType=LONGVARCHAR} + where template_id = #{templateId,jdbcType=VARCHAR} + + + update functional_case_template_extend + set case_name = #{caseName,jdbcType=VARCHAR}, + step_model = #{stepModel,jdbcType=VARCHAR} + where template_id = #{templateId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.java new file mode 100644 index 0000000000..b7fa66eeb7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.FunctionalCaseTemplate; +import io.metersphere.project.domain.FunctionalCaseTemplateExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FunctionalCaseTemplateMapper { + long countByExample(FunctionalCaseTemplateExample example); + + int deleteByExample(FunctionalCaseTemplateExample example); + + int deleteByPrimaryKey(String id); + + int insert(FunctionalCaseTemplate record); + + int insertSelective(FunctionalCaseTemplate record); + + List selectByExample(FunctionalCaseTemplateExample example); + + FunctionalCaseTemplate selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") FunctionalCaseTemplate record, @Param("example") FunctionalCaseTemplateExample example); + + int updateByExample(@Param("record") FunctionalCaseTemplate record, @Param("example") FunctionalCaseTemplateExample example); + + int updateByPrimaryKeySelective(FunctionalCaseTemplate record); + + int updateByPrimaryKey(FunctionalCaseTemplate record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.xml new file mode 100644 index 0000000000..8eb2cb9b8d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/FunctionalCaseTemplateMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, description, `system`, create_time, create_user, project_id + + + + + delete from functional_case_template + where id = #{id,jdbcType=VARCHAR} + + + delete from functional_case_template + + + + + + insert into functional_case_template (id, `name`, description, + `system`, create_time, create_user, + project_id) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{system,jdbcType=BIT}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{projectId,jdbcType=VARCHAR}) + + + insert into functional_case_template + + + id, + + + `name`, + + + description, + + + `system`, + + + create_time, + + + create_user, + + + project_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{system,jdbcType=BIT}, + + + #{createTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + + + + update functional_case_template + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + `system` = #{record.system,jdbcType=BIT}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + + + + + + update functional_case_template + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + `system` = #{record.system,jdbcType=BIT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR} + + + + + + update functional_case_template + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + `system` = #{system,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update functional_case_template + set `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + `system` = #{system,jdbcType=BIT}, + create_time = #{createTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.java new file mode 100644 index 0000000000..2f2f6ca68b --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.IssueTemplateExtend; +import io.metersphere.project.domain.IssueTemplateExtendExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface IssueTemplateExtendMapper { + long countByExample(IssueTemplateExtendExample example); + + int deleteByExample(IssueTemplateExtendExample example); + + int deleteByPrimaryKey(String templateId); + + int insert(IssueTemplateExtend record); + + int insertSelective(IssueTemplateExtend record); + + List selectByExampleWithBLOBs(IssueTemplateExtendExample example); + + List selectByExample(IssueTemplateExtendExample example); + + IssueTemplateExtend selectByPrimaryKey(String templateId); + + int updateByExampleSelective(@Param("record") IssueTemplateExtend record, @Param("example") IssueTemplateExtendExample example); + + int updateByExampleWithBLOBs(@Param("record") IssueTemplateExtend record, @Param("example") IssueTemplateExtendExample example); + + int updateByExample(@Param("record") IssueTemplateExtend record, @Param("example") IssueTemplateExtendExample example); + + int updateByPrimaryKeySelective(IssueTemplateExtend record); + + int updateByPrimaryKeyWithBLOBs(IssueTemplateExtend record); + + int updateByPrimaryKey(IssueTemplateExtend record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.xml new file mode 100644 index 0000000000..5adf2f9649 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.xml @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + template_id, title + + + content + + + + + + delete from issue_template_extend + where template_id = #{templateId,jdbcType=VARCHAR} + + + delete from issue_template_extend + + + + + + insert into issue_template_extend (template_id, title, content + ) + values (#{templateId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR} + ) + + + insert into issue_template_extend + + + template_id, + + + title, + + + content, + + + + + #{templateId,jdbcType=VARCHAR}, + + + #{title,jdbcType=VARCHAR}, + + + #{content,jdbcType=LONGVARCHAR}, + + + + + + update issue_template_extend + + + template_id = #{record.templateId,jdbcType=VARCHAR}, + + + title = #{record.title,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=LONGVARCHAR}, + + + + + + + + update issue_template_extend + set template_id = #{record.templateId,jdbcType=VARCHAR}, + title = #{record.title,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=LONGVARCHAR} + + + + + + update issue_template_extend + set template_id = #{record.templateId,jdbcType=VARCHAR}, + title = #{record.title,jdbcType=VARCHAR} + + + + + + update issue_template_extend + + + title = #{title,jdbcType=VARCHAR}, + + + content = #{content,jdbcType=LONGVARCHAR}, + + + where template_id = #{templateId,jdbcType=VARCHAR} + + + update issue_template_extend + set title = #{title,jdbcType=VARCHAR}, + content = #{content,jdbcType=LONGVARCHAR} + where template_id = #{templateId,jdbcType=VARCHAR} + + + update issue_template_extend + set title = #{title,jdbcType=VARCHAR} + where template_id = #{templateId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.java new file mode 100644 index 0000000000..021d5cc881 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.IssueTemplate; +import io.metersphere.project.domain.IssueTemplateExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface IssueTemplateMapper { + long countByExample(IssueTemplateExample example); + + int deleteByExample(IssueTemplateExample example); + + int deleteByPrimaryKey(String id); + + int insert(IssueTemplate record); + + int insertSelective(IssueTemplate record); + + List selectByExample(IssueTemplateExample example); + + IssueTemplate selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") IssueTemplate record, @Param("example") IssueTemplateExample example); + + int updateByExample(@Param("record") IssueTemplate record, @Param("example") IssueTemplateExample example); + + int updateByPrimaryKeySelective(IssueTemplate record); + + int updateByPrimaryKey(IssueTemplate record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.xml new file mode 100644 index 0000000000..2c9065cfc9 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, description, `system`, create_time, create_user, project_id + + + + + delete from issue_template + where id = #{id,jdbcType=VARCHAR} + + + delete from issue_template + + + + + + insert into issue_template (id, `name`, description, + `system`, create_time, create_user, + project_id) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{system,jdbcType=BIT}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{projectId,jdbcType=VARCHAR}) + + + insert into issue_template + + + id, + + + `name`, + + + description, + + + `system`, + + + create_time, + + + create_user, + + + project_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{system,jdbcType=BIT}, + + + #{createTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + + + + update issue_template + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + `system` = #{record.system,jdbcType=BIT}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + + + + + + update issue_template + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + `system` = #{record.system,jdbcType=BIT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR} + + + + + + update issue_template + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + `system` = #{system,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update issue_template + set `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + `system` = #{system,jdbcType=BIT}, + create_time = #{createTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.java new file mode 100644 index 0000000000..2b10e51b77 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.ProjectApplication; +import io.metersphere.project.domain.ProjectApplicationExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProjectApplicationMapper { + long countByExample(ProjectApplicationExample example); + + int deleteByExample(ProjectApplicationExample example); + + int deleteByPrimaryKey(@Param("projectId") String projectId, @Param("type") String type); + + int insert(ProjectApplication record); + + int insertSelective(ProjectApplication record); + + List selectByExample(ProjectApplicationExample example); + + ProjectApplication selectByPrimaryKey(@Param("projectId") String projectId, @Param("type") String type); + + int updateByExampleSelective(@Param("record") ProjectApplication record, @Param("example") ProjectApplicationExample example); + + int updateByExample(@Param("record") ProjectApplication record, @Param("example") ProjectApplicationExample example); + + int updateByPrimaryKeySelective(ProjectApplication record); + + int updateByPrimaryKey(ProjectApplication record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.xml new file mode 100644 index 0000000000..d150498c54 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectApplicationMapper.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + project_id, `type`, type_value + + + + + delete from project_application + where project_id = #{projectId,jdbcType=VARCHAR} + and `type` = #{type,jdbcType=VARCHAR} + + + delete from project_application + + + + + + insert into project_application (project_id, `type`, type_value + ) + values (#{projectId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{typeValue,jdbcType=VARCHAR} + ) + + + insert into project_application + + + project_id, + + + `type`, + + + type_value, + + + + + #{projectId,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{typeValue,jdbcType=VARCHAR}, + + + + + + update project_application + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + type_value = #{record.typeValue,jdbcType=VARCHAR}, + + + + + + + + update project_application + set project_id = #{record.projectId,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + type_value = #{record.typeValue,jdbcType=VARCHAR} + + + + + + update project_application + + + type_value = #{typeValue,jdbcType=VARCHAR}, + + + where project_id = #{projectId,jdbcType=VARCHAR} + and `type` = #{type,jdbcType=VARCHAR} + + + update project_application + set type_value = #{typeValue,jdbcType=VARCHAR} + where project_id = #{projectId,jdbcType=VARCHAR} + and `type` = #{type,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectExtendMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectExtendMapper.java new file mode 100644 index 0000000000..06f0e55143 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectExtendMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.ProjectExtend; +import io.metersphere.project.domain.ProjectExtendExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProjectExtendMapper { + long countByExample(ProjectExtendExample example); + + int deleteByExample(ProjectExtendExample example); + + int deleteByPrimaryKey(String projectId); + + int insert(ProjectExtend record); + + int insertSelective(ProjectExtend record); + + List selectByExampleWithBLOBs(ProjectExtendExample example); + + List selectByExample(ProjectExtendExample example); + + ProjectExtend selectByPrimaryKey(String projectId); + + int updateByExampleSelective(@Param("record") ProjectExtend record, @Param("example") ProjectExtendExample example); + + int updateByExampleWithBLOBs(@Param("record") ProjectExtend record, @Param("example") ProjectExtendExample example); + + int updateByExample(@Param("record") ProjectExtend record, @Param("example") ProjectExtendExample example); + + int updateByPrimaryKeySelective(ProjectExtend record); + + int updateByPrimaryKeyWithBLOBs(ProjectExtend record); + + int updateByPrimaryKey(ProjectExtend record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectExtendMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectExtendMapper.xml new file mode 100644 index 0000000000..579786fd4f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectExtendMapper.xml @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + project_id, tapd_id, jira_key, zentao_id, azure_devops_id, case_template_id, azure_filter_id, + platform, third_part_template, version_enable, api_template_id + + + issue_config + + + + + + delete from project_extend + where project_id = #{projectId,jdbcType=VARCHAR} + + + delete from project_extend + + + + + + insert into project_extend (project_id, tapd_id, jira_key, + zentao_id, azure_devops_id, case_template_id, + azure_filter_id, platform, third_part_template, + version_enable, api_template_id, issue_config + ) + values (#{projectId,jdbcType=VARCHAR}, #{tapdId,jdbcType=VARCHAR}, #{jiraKey,jdbcType=VARCHAR}, + #{zentaoId,jdbcType=VARCHAR}, #{azureDevopsId,jdbcType=VARCHAR}, #{caseTemplateId,jdbcType=VARCHAR}, + #{azureFilterId,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{thirdPartTemplate,jdbcType=BIT}, + #{versionEnable,jdbcType=BIT}, #{apiTemplateId,jdbcType=VARCHAR}, #{issueConfig,jdbcType=LONGVARBINARY} + ) + + + insert into project_extend + + + project_id, + + + tapd_id, + + + jira_key, + + + zentao_id, + + + azure_devops_id, + + + case_template_id, + + + azure_filter_id, + + + platform, + + + third_part_template, + + + version_enable, + + + api_template_id, + + + issue_config, + + + + + #{projectId,jdbcType=VARCHAR}, + + + #{tapdId,jdbcType=VARCHAR}, + + + #{jiraKey,jdbcType=VARCHAR}, + + + #{zentaoId,jdbcType=VARCHAR}, + + + #{azureDevopsId,jdbcType=VARCHAR}, + + + #{caseTemplateId,jdbcType=VARCHAR}, + + + #{azureFilterId,jdbcType=VARCHAR}, + + + #{platform,jdbcType=VARCHAR}, + + + #{thirdPartTemplate,jdbcType=BIT}, + + + #{versionEnable,jdbcType=BIT}, + + + #{apiTemplateId,jdbcType=VARCHAR}, + + + #{issueConfig,jdbcType=LONGVARBINARY}, + + + + + + update project_extend + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + tapd_id = #{record.tapdId,jdbcType=VARCHAR}, + + + jira_key = #{record.jiraKey,jdbcType=VARCHAR}, + + + zentao_id = #{record.zentaoId,jdbcType=VARCHAR}, + + + azure_devops_id = #{record.azureDevopsId,jdbcType=VARCHAR}, + + + case_template_id = #{record.caseTemplateId,jdbcType=VARCHAR}, + + + azure_filter_id = #{record.azureFilterId,jdbcType=VARCHAR}, + + + platform = #{record.platform,jdbcType=VARCHAR}, + + + third_part_template = #{record.thirdPartTemplate,jdbcType=BIT}, + + + version_enable = #{record.versionEnable,jdbcType=BIT}, + + + api_template_id = #{record.apiTemplateId,jdbcType=VARCHAR}, + + + issue_config = #{record.issueConfig,jdbcType=LONGVARBINARY}, + + + + + + + + update project_extend + set project_id = #{record.projectId,jdbcType=VARCHAR}, + tapd_id = #{record.tapdId,jdbcType=VARCHAR}, + jira_key = #{record.jiraKey,jdbcType=VARCHAR}, + zentao_id = #{record.zentaoId,jdbcType=VARCHAR}, + azure_devops_id = #{record.azureDevopsId,jdbcType=VARCHAR}, + case_template_id = #{record.caseTemplateId,jdbcType=VARCHAR}, + azure_filter_id = #{record.azureFilterId,jdbcType=VARCHAR}, + platform = #{record.platform,jdbcType=VARCHAR}, + third_part_template = #{record.thirdPartTemplate,jdbcType=BIT}, + version_enable = #{record.versionEnable,jdbcType=BIT}, + api_template_id = #{record.apiTemplateId,jdbcType=VARCHAR}, + issue_config = #{record.issueConfig,jdbcType=LONGVARBINARY} + + + + + + update project_extend + set project_id = #{record.projectId,jdbcType=VARCHAR}, + tapd_id = #{record.tapdId,jdbcType=VARCHAR}, + jira_key = #{record.jiraKey,jdbcType=VARCHAR}, + zentao_id = #{record.zentaoId,jdbcType=VARCHAR}, + azure_devops_id = #{record.azureDevopsId,jdbcType=VARCHAR}, + case_template_id = #{record.caseTemplateId,jdbcType=VARCHAR}, + azure_filter_id = #{record.azureFilterId,jdbcType=VARCHAR}, + platform = #{record.platform,jdbcType=VARCHAR}, + third_part_template = #{record.thirdPartTemplate,jdbcType=BIT}, + version_enable = #{record.versionEnable,jdbcType=BIT}, + api_template_id = #{record.apiTemplateId,jdbcType=VARCHAR} + + + + + + update project_extend + + + tapd_id = #{tapdId,jdbcType=VARCHAR}, + + + jira_key = #{jiraKey,jdbcType=VARCHAR}, + + + zentao_id = #{zentaoId,jdbcType=VARCHAR}, + + + azure_devops_id = #{azureDevopsId,jdbcType=VARCHAR}, + + + case_template_id = #{caseTemplateId,jdbcType=VARCHAR}, + + + azure_filter_id = #{azureFilterId,jdbcType=VARCHAR}, + + + platform = #{platform,jdbcType=VARCHAR}, + + + third_part_template = #{thirdPartTemplate,jdbcType=BIT}, + + + version_enable = #{versionEnable,jdbcType=BIT}, + + + api_template_id = #{apiTemplateId,jdbcType=VARCHAR}, + + + issue_config = #{issueConfig,jdbcType=LONGVARBINARY}, + + + where project_id = #{projectId,jdbcType=VARCHAR} + + + update project_extend + set tapd_id = #{tapdId,jdbcType=VARCHAR}, + jira_key = #{jiraKey,jdbcType=VARCHAR}, + zentao_id = #{zentaoId,jdbcType=VARCHAR}, + azure_devops_id = #{azureDevopsId,jdbcType=VARCHAR}, + case_template_id = #{caseTemplateId,jdbcType=VARCHAR}, + azure_filter_id = #{azureFilterId,jdbcType=VARCHAR}, + platform = #{platform,jdbcType=VARCHAR}, + third_part_template = #{thirdPartTemplate,jdbcType=BIT}, + version_enable = #{versionEnable,jdbcType=BIT}, + api_template_id = #{apiTemplateId,jdbcType=VARCHAR}, + issue_config = #{issueConfig,jdbcType=LONGVARBINARY} + where project_id = #{projectId,jdbcType=VARCHAR} + + + update project_extend + set tapd_id = #{tapdId,jdbcType=VARCHAR}, + jira_key = #{jiraKey,jdbcType=VARCHAR}, + zentao_id = #{zentaoId,jdbcType=VARCHAR}, + azure_devops_id = #{azureDevopsId,jdbcType=VARCHAR}, + case_template_id = #{caseTemplateId,jdbcType=VARCHAR}, + azure_filter_id = #{azureFilterId,jdbcType=VARCHAR}, + platform = #{platform,jdbcType=VARCHAR}, + third_part_template = #{thirdPartTemplate,jdbcType=BIT}, + version_enable = #{versionEnable,jdbcType=BIT}, + api_template_id = #{apiTemplateId,jdbcType=VARCHAR} + where project_id = #{projectId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.java new file mode 100644 index 0000000000..c067464b49 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.Project; +import io.metersphere.project.domain.ProjectExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProjectMapper { + long countByExample(ProjectExample example); + + int deleteByExample(ProjectExample example); + + int deleteByPrimaryKey(String id); + + int insert(Project record); + + int insertSelective(Project record); + + List selectByExample(ProjectExample example); + + Project selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Project record, @Param("example") ProjectExample example); + + int updateByExample(@Param("record") Project record, @Param("example") ProjectExample example); + + int updateByPrimaryKeySelective(Project record); + + int updateByPrimaryKey(Project record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.xml new file mode 100644 index 0000000000..54ef0068f5 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, workspace_id, `name`, description, create_time, update_time, create_user, system_id + + + + + delete from project + where id = #{id,jdbcType=VARCHAR} + + + delete from project + + + + + + insert into project (id, workspace_id, `name`, + description, create_time, update_time, + create_user, system_id) + values (#{id,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{createUser,jdbcType=VARCHAR}, #{systemId,jdbcType=VARCHAR}) + + + insert into project + + + id, + + + workspace_id, + + + `name`, + + + description, + + + create_time, + + + update_time, + + + create_user, + + + system_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{workspaceId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{systemId,jdbcType=VARCHAR}, + + + + + + update project + + + id = #{record.id,jdbcType=VARCHAR}, + + + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + system_id = #{record.systemId,jdbcType=VARCHAR}, + + + + + + + + update project + set id = #{record.id,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + system_id = #{record.systemId,jdbcType=VARCHAR} + + + + + + update project + + + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + system_id = #{systemId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update project + set workspace_id = #{workspaceId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + system_id = #{systemId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectVersionMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectVersionMapper.java new file mode 100644 index 0000000000..f0f25d2b3d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectVersionMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.ProjectVersion; +import io.metersphere.project.domain.ProjectVersionExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProjectVersionMapper { + long countByExample(ProjectVersionExample example); + + int deleteByExample(ProjectVersionExample example); + + int deleteByPrimaryKey(String id); + + int insert(ProjectVersion record); + + int insertSelective(ProjectVersion record); + + List selectByExample(ProjectVersionExample example); + + ProjectVersion selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ProjectVersion record, @Param("example") ProjectVersionExample example); + + int updateByExample(@Param("record") ProjectVersion record, @Param("example") ProjectVersionExample example); + + int updateByPrimaryKeySelective(ProjectVersion record); + + int updateByPrimaryKey(ProjectVersion record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectVersionMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectVersionMapper.xml new file mode 100644 index 0000000000..20dc92aa8f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectVersionMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, `name`, description, `status`, latest, publish_time, start_time, + end_time, create_time, create_user + + + + + delete from project_version + where id = #{id,jdbcType=VARCHAR} + + + delete from project_version + + + + + + insert into project_version (id, project_id, `name`, + description, `status`, latest, + publish_time, start_time, end_time, + create_time, create_user) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{latest,jdbcType=BIT}, + #{publishTime,jdbcType=BIGINT}, #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, + #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}) + + + insert into project_version + + + id, + + + project_id, + + + `name`, + + + description, + + + `status`, + + + latest, + + + publish_time, + + + start_time, + + + end_time, + + + create_time, + + + create_user, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{latest,jdbcType=BIT}, + + + #{publishTime,jdbcType=BIGINT}, + + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + #{createTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + + + + update project_version + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + latest = #{record.latest,jdbcType=BIT}, + + + publish_time = #{record.publishTime,jdbcType=BIGINT}, + + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + + + + + + update project_version + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + latest = #{record.latest,jdbcType=BIT}, + publish_time = #{record.publishTime,jdbcType=BIGINT}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR} + + + + + + update project_version + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + latest = #{latest,jdbcType=BIT}, + + + publish_time = #{publishTime,jdbcType=BIGINT}, + + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update project_version + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + latest = #{latest,jdbcType=BIT}, + publish_time = #{publishTime,jdbcType=BIGINT}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file 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 1e5c88d37a..0208ed6f5d 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,81 +1,62 @@ package io.metersphere.sdk.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "环境") -@Table("environment") @Data public class Environment implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{environment.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "Api Test Environment ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "Api Test Environment ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{environment.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{environment.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "Api Test Environment Name", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{environment.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{environment.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{environment.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Api Test Environment Name", required = true, allowableValues = "range[1, 64]") private String name; + @Schema(title = "Project ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{environment.project_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{environment.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{environment.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Project ID", required = true, allowableValues = "range[1, 50]") private String projectId; - - @ApiModelProperty(name = "Api Test Protocol", required = false, allowableValues = "range[1, 20]") + @Schema(title = "Api Test Protocol") private String protocol; - - @ApiModelProperty(name = "Api Test Socket", required = false, allowableValues = "range[1, 225]") + @Schema(title = "Api Test Socket") private String socket; - - @ApiModelProperty(name = "Api Test Domain", required = false, allowableValues = "range[1, 225]") + @Schema(title = "Api Test Domain") private String domain; - - @ApiModelProperty(name = "Api Test Port", required = false, allowableValues = "range[1, ]") + @Schema(title = "Api Test Port") private Integer port; - - @ApiModelProperty(name = "Global ariables", required = false, allowableValues = "range[1, ]") - private String variables; - - - @ApiModelProperty(name = "Global Heards", required = false, allowableValues = "range[1, ]") - private String headers; - - - @ApiModelProperty(name = "Config Data (JSON format)", required = false, allowableValues = "range[1, ]") - private String config; - - - @ApiModelProperty(name = "hosts", required = false, allowableValues = "range[1, ]") - private String hosts; - - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 100]") + @Schema(title = "") private String createUser; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]") + @Schema(title = "") private Long createTime; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]") + @Schema(title = "") private Long updateTime; + @Schema(title = "Global ariables") + private String variables; + @Schema(title = "Global Heards") + private String headers; + + @Schema(title = "Config Data (JSON format)") + private String config; + + @Schema(title = "hosts") + private String hosts; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentExample.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentExample.java new file mode 100644 index 0000000000..cdc76bc412 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentExample.java @@ -0,0 +1,870 @@ +package io.metersphere.sdk.domain; + +import java.util.ArrayList; +import java.util.List; + +public class EnvironmentExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public EnvironmentExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProtocolIsNull() { + addCriterion("protocol is null"); + return (Criteria) this; + } + + public Criteria andProtocolIsNotNull() { + addCriterion("protocol is not null"); + return (Criteria) this; + } + + public Criteria andProtocolEqualTo(String value) { + addCriterion("protocol =", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotEqualTo(String value) { + addCriterion("protocol <>", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThan(String value) { + addCriterion("protocol >", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThanOrEqualTo(String value) { + addCriterion("protocol >=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThan(String value) { + addCriterion("protocol <", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThanOrEqualTo(String value) { + addCriterion("protocol <=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLike(String value) { + addCriterion("protocol like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotLike(String value) { + addCriterion("protocol not like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolIn(List values) { + addCriterion("protocol in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotIn(List values) { + addCriterion("protocol not in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolBetween(String value1, String value2) { + addCriterion("protocol between", value1, value2, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotBetween(String value1, String value2) { + addCriterion("protocol not between", value1, value2, "protocol"); + return (Criteria) this; + } + + public Criteria andSocketIsNull() { + addCriterion("socket is null"); + return (Criteria) this; + } + + public Criteria andSocketIsNotNull() { + addCriterion("socket is not null"); + return (Criteria) this; + } + + public Criteria andSocketEqualTo(String value) { + addCriterion("socket =", value, "socket"); + return (Criteria) this; + } + + public Criteria andSocketNotEqualTo(String value) { + addCriterion("socket <>", value, "socket"); + return (Criteria) this; + } + + public Criteria andSocketGreaterThan(String value) { + addCriterion("socket >", value, "socket"); + return (Criteria) this; + } + + public Criteria andSocketGreaterThanOrEqualTo(String value) { + addCriterion("socket >=", value, "socket"); + return (Criteria) this; + } + + public Criteria andSocketLessThan(String value) { + addCriterion("socket <", value, "socket"); + return (Criteria) this; + } + + public Criteria andSocketLessThanOrEqualTo(String value) { + addCriterion("socket <=", value, "socket"); + return (Criteria) this; + } + + public Criteria andSocketLike(String value) { + addCriterion("socket like", value, "socket"); + return (Criteria) this; + } + + public Criteria andSocketNotLike(String value) { + addCriterion("socket not like", value, "socket"); + return (Criteria) this; + } + + public Criteria andSocketIn(List values) { + addCriterion("socket in", values, "socket"); + return (Criteria) this; + } + + public Criteria andSocketNotIn(List values) { + addCriterion("socket not in", values, "socket"); + return (Criteria) this; + } + + public Criteria andSocketBetween(String value1, String value2) { + addCriterion("socket between", value1, value2, "socket"); + return (Criteria) this; + } + + public Criteria andSocketNotBetween(String value1, String value2) { + addCriterion("socket not between", value1, value2, "socket"); + return (Criteria) this; + } + + public Criteria andDomainIsNull() { + addCriterion("`domain` is null"); + return (Criteria) this; + } + + public Criteria andDomainIsNotNull() { + addCriterion("`domain` is not null"); + return (Criteria) this; + } + + public Criteria andDomainEqualTo(String value) { + addCriterion("`domain` =", value, "domain"); + return (Criteria) this; + } + + public Criteria andDomainNotEqualTo(String value) { + addCriterion("`domain` <>", value, "domain"); + return (Criteria) this; + } + + public Criteria andDomainGreaterThan(String value) { + addCriterion("`domain` >", value, "domain"); + return (Criteria) this; + } + + public Criteria andDomainGreaterThanOrEqualTo(String value) { + addCriterion("`domain` >=", value, "domain"); + return (Criteria) this; + } + + public Criteria andDomainLessThan(String value) { + addCriterion("`domain` <", value, "domain"); + return (Criteria) this; + } + + public Criteria andDomainLessThanOrEqualTo(String value) { + addCriterion("`domain` <=", value, "domain"); + return (Criteria) this; + } + + public Criteria andDomainLike(String value) { + addCriterion("`domain` like", value, "domain"); + return (Criteria) this; + } + + public Criteria andDomainNotLike(String value) { + addCriterion("`domain` not like", value, "domain"); + return (Criteria) this; + } + + public Criteria andDomainIn(List values) { + addCriterion("`domain` in", values, "domain"); + return (Criteria) this; + } + + public Criteria andDomainNotIn(List values) { + addCriterion("`domain` not in", values, "domain"); + return (Criteria) this; + } + + public Criteria andDomainBetween(String value1, String value2) { + addCriterion("`domain` between", value1, value2, "domain"); + return (Criteria) this; + } + + public Criteria andDomainNotBetween(String value1, String value2) { + addCriterion("`domain` not between", value1, value2, "domain"); + return (Criteria) this; + } + + public Criteria andPortIsNull() { + addCriterion("port is null"); + return (Criteria) this; + } + + public Criteria andPortIsNotNull() { + addCriterion("port is not null"); + return (Criteria) this; + } + + public Criteria andPortEqualTo(Integer value) { + addCriterion("port =", value, "port"); + return (Criteria) this; + } + + public Criteria andPortNotEqualTo(Integer value) { + addCriterion("port <>", value, "port"); + return (Criteria) this; + } + + public Criteria andPortGreaterThan(Integer value) { + addCriterion("port >", value, "port"); + return (Criteria) this; + } + + public Criteria andPortGreaterThanOrEqualTo(Integer value) { + addCriterion("port >=", value, "port"); + return (Criteria) this; + } + + public Criteria andPortLessThan(Integer value) { + addCriterion("port <", value, "port"); + return (Criteria) this; + } + + public Criteria andPortLessThanOrEqualTo(Integer value) { + addCriterion("port <=", value, "port"); + return (Criteria) this; + } + + public Criteria andPortIn(List values) { + addCriterion("port in", values, "port"); + return (Criteria) this; + } + + public Criteria andPortNotIn(List values) { + addCriterion("port not in", values, "port"); + return (Criteria) this; + } + + public Criteria andPortBetween(Integer value1, Integer value2) { + addCriterion("port between", value1, value2, "port"); + return (Criteria) this; + } + + public Criteria andPortNotBetween(Integer value1, Integer value2) { + addCriterion("port not between", value1, value2, "port"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 0cda5a95d0..8c27fe54ed 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,53 +1,41 @@ package io.metersphere.sdk.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "环境组") -@Table("environment_group") @Data public class EnvironmentGroup implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{environment_group.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "环境组id", required = true, allowableValues = "range[1, 50]") + @Schema(title = "环境组id", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{environment_group.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{environment_group.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "环境组名", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{environment_group.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{environment_group.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{environment_group.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "环境组名", required = true, allowableValues = "range[1, 50]") private String name; + @Schema(title = "所属工作空间", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{environment_group.workspace_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{environment_group.workspace_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{environment_group.workspace_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "所属工作空间", required = true, allowableValues = "range[1, 64]") private String workspaceId; - - @ApiModelProperty(name = "环境组描述", required = false, allowableValues = "range[1, 255]") + @Schema(title = "环境组描述") private String description; - - @ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 50]") + @Schema(title = "创建人") private String createUser; - - @ApiModelProperty(name = "创建时间", required = false, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = false, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupExample.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupExample.java new file mode 100644 index 0000000000..51f6a7abb5 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupExample.java @@ -0,0 +1,670 @@ +package io.metersphere.sdk.domain; + +import java.util.ArrayList; +import java.util.List; + +public class EnvironmentGroupExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public EnvironmentGroupExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNull() { + addCriterion("workspace_id is null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNotNull() { + addCriterion("workspace_id is not null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdEqualTo(String value) { + addCriterion("workspace_id =", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotEqualTo(String value) { + addCriterion("workspace_id <>", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThan(String value) { + addCriterion("workspace_id >", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { + addCriterion("workspace_id >=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThan(String value) { + addCriterion("workspace_id <", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { + addCriterion("workspace_id <=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLike(String value) { + addCriterion("workspace_id like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotLike(String value) { + addCriterion("workspace_id not like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIn(List values) { + addCriterion("workspace_id in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotIn(List values) { + addCriterion("workspace_id not in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdBetween(String value1, String value2) { + addCriterion("workspace_id between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotBetween(String value1, String value2) { + addCriterion("workspace_id not between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 38c3cace15..8f74cf0249 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,37 +1,28 @@ package io.metersphere.sdk.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "环境组配置") -@Table("environment_group_project") @Data public class EnvironmentGroupProject implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{environment_group_project.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{environment_group_project.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{environment_group_project.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "环境组id", required = false, allowableValues = "range[1, 50]") + @Schema(title = "环境组id") private String environmentGroupId; - - @ApiModelProperty(name = "api test environment 环境ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "api test environment 环境ID") private String environmentId; - - @ApiModelProperty(name = "项目id", required = false, allowableValues = "range[1, 50]") + @Schema(title = "项目id") private String projectId; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupProjectExample.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupProjectExample.java new file mode 100644 index 0000000000..aa5d69a771 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/EnvironmentGroupProjectExample.java @@ -0,0 +1,480 @@ +package io.metersphere.sdk.domain; + +import java.util.ArrayList; +import java.util.List; + +public class EnvironmentGroupProjectExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public EnvironmentGroupProjectExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdIsNull() { + addCriterion("environment_group_id is null"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdIsNotNull() { + addCriterion("environment_group_id is not null"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdEqualTo(String value) { + addCriterion("environment_group_id =", value, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdNotEqualTo(String value) { + addCriterion("environment_group_id <>", value, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdGreaterThan(String value) { + addCriterion("environment_group_id >", value, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdGreaterThanOrEqualTo(String value) { + addCriterion("environment_group_id >=", value, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdLessThan(String value) { + addCriterion("environment_group_id <", value, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdLessThanOrEqualTo(String value) { + addCriterion("environment_group_id <=", value, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdLike(String value) { + addCriterion("environment_group_id like", value, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdNotLike(String value) { + addCriterion("environment_group_id not like", value, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdIn(List values) { + addCriterion("environment_group_id in", values, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdNotIn(List values) { + addCriterion("environment_group_id not in", values, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdBetween(String value1, String value2) { + addCriterion("environment_group_id between", value1, value2, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentGroupIdNotBetween(String value1, String value2) { + addCriterion("environment_group_id not between", value1, value2, "environmentGroupId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIsNull() { + addCriterion("environment_id is null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIsNotNull() { + addCriterion("environment_id is not null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdEqualTo(String value) { + addCriterion("environment_id =", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotEqualTo(String value) { + addCriterion("environment_id <>", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThan(String value) { + addCriterion("environment_id >", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) { + addCriterion("environment_id >=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThan(String value) { + addCriterion("environment_id <", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThanOrEqualTo(String value) { + addCriterion("environment_id <=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLike(String value) { + addCriterion("environment_id like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotLike(String value) { + addCriterion("environment_id not like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIn(List values) { + addCriterion("environment_id in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotIn(List values) { + addCriterion("environment_id not in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdBetween(String value1, String value2) { + addCriterion("environment_id between", value1, value2, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotBetween(String value1, String value2) { + addCriterion("environment_id not between", value1, value2, "environmentId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 2f51bd1159..987205b126 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,49 +1,37 @@ package io.metersphere.sdk.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "执行链(接口/场景/UI/性能用例)") -@Table("execution_queue") @Data public class ExecutionQueue implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{execution_queue.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{execution_queue.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{execution_queue.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "集合报告/测试计划报告", required = false, allowableValues = "range[1, 100]") + @Schema(title = "集合报告/测试计划报告") private String reportId; - - @ApiModelProperty(name = "报告类型/计划报告/单独报告", required = false, allowableValues = "range[1, 100]") + @Schema(title = "报告类型/计划报告/单独报告") private String reportType; - - @ApiModelProperty(name = "执行模式/scenario/api/test_paln_api/test_pan_scenario", required = false, allowableValues = "range[1, 100]") + @Schema(title = "执行模式/scenario/api/test_paln_api/test_pan_scenario") private String runMode; - - @ApiModelProperty(name = "执行资源池", required = false, allowableValues = "range[1, 100]") + @Schema(title = "执行资源池") private String poolId; - - @ApiModelProperty(name = "创建时间", required = false, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 1]") + @Schema(title = "") private Boolean failure; - + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 bac60a3cbf..08ab7f79b5 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,65 +1,49 @@ package io.metersphere.sdk.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "执行链条目") -@Table("execution_queue_detail") @Data public class ExecutionQueueDetail implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{execution_queue_detail.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{execution_queue_detail.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{execution_queue_detail.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "队列id", required = false, allowableValues = "range[1, 100]") + @Schema(title = "队列id") private String queueId; - - @ApiModelProperty(name = "排序", required = false, allowableValues = "range[1, ]") + @Schema(title = "排序") private Integer sort; - - @ApiModelProperty(name = "报告id", required = false, allowableValues = "range[1, 100]") + @Schema(title = "报告id") private String reportId; - - @ApiModelProperty(name = "资源id", required = false, allowableValues = "range[1, 100]") + @Schema(title = "资源id") private String testId; - - @ApiModelProperty(name = "环境", required = false, allowableValues = "range[1, ]") - private String evnMap; - - - @ApiModelProperty(name = "资源类型", required = false, allowableValues = "range[1, 100]") + @Schema(title = "资源类型") private String type; - - @ApiModelProperty(name = "创建时间", required = false, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "是否开启失败重试", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否开启失败重试") private Boolean retryEnable; - - @ApiModelProperty(name = "失败重试次数", required = false, allowableValues = "range[1, ]") + @Schema(title = "失败重试次数") private Long retryNumber; - - @ApiModelProperty(name = "项目ID集合", required = false, allowableValues = "range[1, 2000]") + @Schema(title = "项目ID集合") private String projectIds; + @Schema(title = "环境") + private String evnMap; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetailExample.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetailExample.java new file mode 100644 index 0000000000..d0277d442e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetailExample.java @@ -0,0 +1,860 @@ +package io.metersphere.sdk.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ExecutionQueueDetailExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ExecutionQueueDetailExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andQueueIdIsNull() { + addCriterion("queue_id is null"); + return (Criteria) this; + } + + public Criteria andQueueIdIsNotNull() { + addCriterion("queue_id is not null"); + return (Criteria) this; + } + + public Criteria andQueueIdEqualTo(String value) { + addCriterion("queue_id =", value, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdNotEqualTo(String value) { + addCriterion("queue_id <>", value, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdGreaterThan(String value) { + addCriterion("queue_id >", value, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdGreaterThanOrEqualTo(String value) { + addCriterion("queue_id >=", value, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdLessThan(String value) { + addCriterion("queue_id <", value, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdLessThanOrEqualTo(String value) { + addCriterion("queue_id <=", value, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdLike(String value) { + addCriterion("queue_id like", value, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdNotLike(String value) { + addCriterion("queue_id not like", value, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdIn(List values) { + addCriterion("queue_id in", values, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdNotIn(List values) { + addCriterion("queue_id not in", values, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdBetween(String value1, String value2) { + addCriterion("queue_id between", value1, value2, "queueId"); + return (Criteria) this; + } + + public Criteria andQueueIdNotBetween(String value1, String value2) { + addCriterion("queue_id not between", value1, value2, "queueId"); + return (Criteria) this; + } + + public Criteria andSortIsNull() { + addCriterion("sort is null"); + return (Criteria) this; + } + + public Criteria andSortIsNotNull() { + addCriterion("sort is not null"); + return (Criteria) this; + } + + public Criteria andSortEqualTo(Integer value) { + addCriterion("sort =", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotEqualTo(Integer value) { + addCriterion("sort <>", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThan(Integer value) { + addCriterion("sort >", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThanOrEqualTo(Integer value) { + addCriterion("sort >=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThan(Integer value) { + addCriterion("sort <", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThanOrEqualTo(Integer value) { + addCriterion("sort <=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortIn(List values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List values) { + addCriterion("sort not in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortBetween(Integer value1, Integer value2) { + addCriterion("sort between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotBetween(Integer value1, Integer value2) { + addCriterion("sort not between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andTestIdIsNull() { + addCriterion("test_id is null"); + return (Criteria) this; + } + + public Criteria andTestIdIsNotNull() { + addCriterion("test_id is not null"); + return (Criteria) this; + } + + public Criteria andTestIdEqualTo(String value) { + addCriterion("test_id =", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotEqualTo(String value) { + addCriterion("test_id <>", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThan(String value) { + addCriterion("test_id >", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThanOrEqualTo(String value) { + addCriterion("test_id >=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThan(String value) { + addCriterion("test_id <", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThanOrEqualTo(String value) { + addCriterion("test_id <=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLike(String value) { + addCriterion("test_id like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotLike(String value) { + addCriterion("test_id not like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdIn(List values) { + addCriterion("test_id in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotIn(List values) { + addCriterion("test_id not in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdBetween(String value1, String value2) { + addCriterion("test_id between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotBetween(String value1, String value2) { + addCriterion("test_id not between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andRetryEnableIsNull() { + addCriterion("retry_enable is null"); + return (Criteria) this; + } + + public Criteria andRetryEnableIsNotNull() { + addCriterion("retry_enable is not null"); + return (Criteria) this; + } + + public Criteria andRetryEnableEqualTo(Boolean value) { + addCriterion("retry_enable =", value, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryEnableNotEqualTo(Boolean value) { + addCriterion("retry_enable <>", value, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryEnableGreaterThan(Boolean value) { + addCriterion("retry_enable >", value, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryEnableGreaterThanOrEqualTo(Boolean value) { + addCriterion("retry_enable >=", value, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryEnableLessThan(Boolean value) { + addCriterion("retry_enable <", value, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryEnableLessThanOrEqualTo(Boolean value) { + addCriterion("retry_enable <=", value, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryEnableIn(List values) { + addCriterion("retry_enable in", values, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryEnableNotIn(List values) { + addCriterion("retry_enable not in", values, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryEnableBetween(Boolean value1, Boolean value2) { + addCriterion("retry_enable between", value1, value2, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryEnableNotBetween(Boolean value1, Boolean value2) { + addCriterion("retry_enable not between", value1, value2, "retryEnable"); + return (Criteria) this; + } + + public Criteria andRetryNumberIsNull() { + addCriterion("retry_number is null"); + return (Criteria) this; + } + + public Criteria andRetryNumberIsNotNull() { + addCriterion("retry_number is not null"); + return (Criteria) this; + } + + public Criteria andRetryNumberEqualTo(Long value) { + addCriterion("retry_number =", value, "retryNumber"); + return (Criteria) this; + } + + public Criteria andRetryNumberNotEqualTo(Long value) { + addCriterion("retry_number <>", value, "retryNumber"); + return (Criteria) this; + } + + public Criteria andRetryNumberGreaterThan(Long value) { + addCriterion("retry_number >", value, "retryNumber"); + return (Criteria) this; + } + + public Criteria andRetryNumberGreaterThanOrEqualTo(Long value) { + addCriterion("retry_number >=", value, "retryNumber"); + return (Criteria) this; + } + + public Criteria andRetryNumberLessThan(Long value) { + addCriterion("retry_number <", value, "retryNumber"); + return (Criteria) this; + } + + public Criteria andRetryNumberLessThanOrEqualTo(Long value) { + addCriterion("retry_number <=", value, "retryNumber"); + return (Criteria) this; + } + + public Criteria andRetryNumberIn(List values) { + addCriterion("retry_number in", values, "retryNumber"); + return (Criteria) this; + } + + public Criteria andRetryNumberNotIn(List values) { + addCriterion("retry_number not in", values, "retryNumber"); + return (Criteria) this; + } + + public Criteria andRetryNumberBetween(Long value1, Long value2) { + addCriterion("retry_number between", value1, value2, "retryNumber"); + return (Criteria) this; + } + + public Criteria andRetryNumberNotBetween(Long value1, Long value2) { + addCriterion("retry_number not between", value1, value2, "retryNumber"); + return (Criteria) this; + } + + public Criteria andProjectIdsIsNull() { + addCriterion("project_ids is null"); + return (Criteria) this; + } + + public Criteria andProjectIdsIsNotNull() { + addCriterion("project_ids is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdsEqualTo(String value) { + addCriterion("project_ids =", value, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsNotEqualTo(String value) { + addCriterion("project_ids <>", value, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsGreaterThan(String value) { + addCriterion("project_ids >", value, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsGreaterThanOrEqualTo(String value) { + addCriterion("project_ids >=", value, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsLessThan(String value) { + addCriterion("project_ids <", value, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsLessThanOrEqualTo(String value) { + addCriterion("project_ids <=", value, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsLike(String value) { + addCriterion("project_ids like", value, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsNotLike(String value) { + addCriterion("project_ids not like", value, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsIn(List values) { + addCriterion("project_ids in", values, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsNotIn(List values) { + addCriterion("project_ids not in", values, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsBetween(String value1, String value2) { + addCriterion("project_ids between", value1, value2, "projectIds"); + return (Criteria) this; + } + + public Criteria andProjectIdsNotBetween(String value1, String value2) { + addCriterion("project_ids not between", value1, value2, "projectIds"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueExample.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueExample.java new file mode 100644 index 0000000000..927044fc97 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueExample.java @@ -0,0 +1,670 @@ +package io.metersphere.sdk.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ExecutionQueueExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ExecutionQueueExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportTypeIsNull() { + addCriterion("report_type is null"); + return (Criteria) this; + } + + public Criteria andReportTypeIsNotNull() { + addCriterion("report_type is not null"); + return (Criteria) this; + } + + public Criteria andReportTypeEqualTo(String value) { + addCriterion("report_type =", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotEqualTo(String value) { + addCriterion("report_type <>", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeGreaterThan(String value) { + addCriterion("report_type >", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeGreaterThanOrEqualTo(String value) { + addCriterion("report_type >=", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeLessThan(String value) { + addCriterion("report_type <", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeLessThanOrEqualTo(String value) { + addCriterion("report_type <=", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeLike(String value) { + addCriterion("report_type like", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotLike(String value) { + addCriterion("report_type not like", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeIn(List values) { + addCriterion("report_type in", values, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotIn(List values) { + addCriterion("report_type not in", values, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeBetween(String value1, String value2) { + addCriterion("report_type between", value1, value2, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotBetween(String value1, String value2) { + addCriterion("report_type not between", value1, value2, "reportType"); + return (Criteria) this; + } + + public Criteria andRunModeIsNull() { + addCriterion("run_mode is null"); + return (Criteria) this; + } + + public Criteria andRunModeIsNotNull() { + addCriterion("run_mode is not null"); + return (Criteria) this; + } + + public Criteria andRunModeEqualTo(String value) { + addCriterion("run_mode =", value, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeNotEqualTo(String value) { + addCriterion("run_mode <>", value, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeGreaterThan(String value) { + addCriterion("run_mode >", value, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeGreaterThanOrEqualTo(String value) { + addCriterion("run_mode >=", value, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeLessThan(String value) { + addCriterion("run_mode <", value, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeLessThanOrEqualTo(String value) { + addCriterion("run_mode <=", value, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeLike(String value) { + addCriterion("run_mode like", value, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeNotLike(String value) { + addCriterion("run_mode not like", value, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeIn(List values) { + addCriterion("run_mode in", values, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeNotIn(List values) { + addCriterion("run_mode not in", values, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeBetween(String value1, String value2) { + addCriterion("run_mode between", value1, value2, "runMode"); + return (Criteria) this; + } + + public Criteria andRunModeNotBetween(String value1, String value2) { + addCriterion("run_mode not between", value1, value2, "runMode"); + return (Criteria) this; + } + + public Criteria andPoolIdIsNull() { + addCriterion("pool_id is null"); + return (Criteria) this; + } + + public Criteria andPoolIdIsNotNull() { + addCriterion("pool_id is not null"); + return (Criteria) this; + } + + public Criteria andPoolIdEqualTo(String value) { + addCriterion("pool_id =", value, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdNotEqualTo(String value) { + addCriterion("pool_id <>", value, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdGreaterThan(String value) { + addCriterion("pool_id >", value, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdGreaterThanOrEqualTo(String value) { + addCriterion("pool_id >=", value, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdLessThan(String value) { + addCriterion("pool_id <", value, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdLessThanOrEqualTo(String value) { + addCriterion("pool_id <=", value, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdLike(String value) { + addCriterion("pool_id like", value, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdNotLike(String value) { + addCriterion("pool_id not like", value, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdIn(List values) { + addCriterion("pool_id in", values, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdNotIn(List values) { + addCriterion("pool_id not in", values, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdBetween(String value1, String value2) { + addCriterion("pool_id between", value1, value2, "poolId"); + return (Criteria) this; + } + + public Criteria andPoolIdNotBetween(String value1, String value2) { + addCriterion("pool_id not between", value1, value2, "poolId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andFailureIsNull() { + addCriterion("failure is null"); + return (Criteria) this; + } + + public Criteria andFailureIsNotNull() { + addCriterion("failure is not null"); + return (Criteria) this; + } + + public Criteria andFailureEqualTo(Boolean value) { + addCriterion("failure =", value, "failure"); + return (Criteria) this; + } + + public Criteria andFailureNotEqualTo(Boolean value) { + addCriterion("failure <>", value, "failure"); + return (Criteria) this; + } + + public Criteria andFailureGreaterThan(Boolean value) { + addCriterion("failure >", value, "failure"); + return (Criteria) this; + } + + public Criteria andFailureGreaterThanOrEqualTo(Boolean value) { + addCriterion("failure >=", value, "failure"); + return (Criteria) this; + } + + public Criteria andFailureLessThan(Boolean value) { + addCriterion("failure <", value, "failure"); + return (Criteria) this; + } + + public Criteria andFailureLessThanOrEqualTo(Boolean value) { + addCriterion("failure <=", value, "failure"); + return (Criteria) this; + } + + public Criteria andFailureIn(List values) { + addCriterion("failure in", values, "failure"); + return (Criteria) this; + } + + public Criteria andFailureNotIn(List values) { + addCriterion("failure not in", values, "failure"); + return (Criteria) this; + } + + public Criteria andFailureBetween(Boolean value1, Boolean value2) { + addCriterion("failure between", value1, value2, "failure"); + return (Criteria) this; + } + + public Criteria andFailureNotBetween(Boolean value1, Boolean value2) { + addCriterion("failure not between", value1, value2, "failure"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 18775a22e7..d690c7454f 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 @@ -2,47 +2,41 @@ package io.metersphere.sdk.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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; +import lombok.Data; -@ApiModel(value = "关系图") -@Table("relationship_edge") @Data public class RelationshipEdge implements Serializable { - private static final long serialVersionUID = 1L; - + @Schema(title = "源节点的ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") @NotBlank(message = "{relationship_edge.source_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "源节点的ID", required = true, allowableValues = "range[1, 50]") + @Size(min = 1, max = 50, message = "{relationship_edge.source_id.length_range}", groups = {Created.class, Updated.class}) private String sourceId; + @Schema(title = "目标节点的ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") @NotBlank(message = "{relationship_edge.target_id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "目标节点的ID", required = true, allowableValues = "range[1, 50]") + @Size(min = 1, max = 50, message = "{relationship_edge.target_id.length_range}", groups = {Created.class, Updated.class}) private String targetId; + @Schema(title = "边的分类", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") + @NotBlank(message = "{relationship_edge.type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 20, message = "{relationship_edge.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{relationship_edge.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "边的分类", required = true, allowableValues = "range[1, 20]") private String type; + @Schema(title = "所属关系图的ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{relationship_edge.graph_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{relationship_edge.graph_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{relationship_edge.graph_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "所属关系图的ID", required = true, allowableValues = "range[1, 50]") private String graphId; - @Size(min = 1, max = 50, message = "{relationship_edge.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{relationship_edge.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") - private String createUser; + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{relationship_edge.creator.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{relationship_edge.creator.length_range}", groups = {Created.class, Updated.class}) + private String creator; - - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, ]") + @Schema(title = "") private Long createTime; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/RelationshipEdgeExample.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/RelationshipEdgeExample.java new file mode 100644 index 0000000000..becfe2c5eb --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/RelationshipEdgeExample.java @@ -0,0 +1,610 @@ +package io.metersphere.sdk.domain; + +import java.util.ArrayList; +import java.util.List; + +public class RelationshipEdgeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public RelationshipEdgeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andSourceIdIsNull() { + addCriterion("source_id is null"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNotNull() { + addCriterion("source_id is not null"); + return (Criteria) this; + } + + public Criteria andSourceIdEqualTo(String value) { + addCriterion("source_id =", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotEqualTo(String value) { + addCriterion("source_id <>", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThan(String value) { + addCriterion("source_id >", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThanOrEqualTo(String value) { + addCriterion("source_id >=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThan(String value) { + addCriterion("source_id <", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThanOrEqualTo(String value) { + addCriterion("source_id <=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLike(String value) { + addCriterion("source_id like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotLike(String value) { + addCriterion("source_id not like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdIn(List values) { + addCriterion("source_id in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotIn(List values) { + addCriterion("source_id not in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdBetween(String value1, String value2) { + addCriterion("source_id between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotBetween(String value1, String value2) { + addCriterion("source_id not between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andTargetIdIsNull() { + addCriterion("target_id is null"); + return (Criteria) this; + } + + public Criteria andTargetIdIsNotNull() { + addCriterion("target_id is not null"); + return (Criteria) this; + } + + public Criteria andTargetIdEqualTo(String value) { + addCriterion("target_id =", value, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdNotEqualTo(String value) { + addCriterion("target_id <>", value, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdGreaterThan(String value) { + addCriterion("target_id >", value, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdGreaterThanOrEqualTo(String value) { + addCriterion("target_id >=", value, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdLessThan(String value) { + addCriterion("target_id <", value, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdLessThanOrEqualTo(String value) { + addCriterion("target_id <=", value, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdLike(String value) { + addCriterion("target_id like", value, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdNotLike(String value) { + addCriterion("target_id not like", value, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdIn(List values) { + addCriterion("target_id in", values, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdNotIn(List values) { + addCriterion("target_id not in", values, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdBetween(String value1, String value2) { + addCriterion("target_id between", value1, value2, "targetId"); + return (Criteria) this; + } + + public Criteria andTargetIdNotBetween(String value1, String value2) { + addCriterion("target_id not between", value1, value2, "targetId"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andGraphIdIsNull() { + addCriterion("graph_id is null"); + return (Criteria) this; + } + + public Criteria andGraphIdIsNotNull() { + addCriterion("graph_id is not null"); + return (Criteria) this; + } + + public Criteria andGraphIdEqualTo(String value) { + addCriterion("graph_id =", value, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdNotEqualTo(String value) { + addCriterion("graph_id <>", value, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdGreaterThan(String value) { + addCriterion("graph_id >", value, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdGreaterThanOrEqualTo(String value) { + addCriterion("graph_id >=", value, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdLessThan(String value) { + addCriterion("graph_id <", value, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdLessThanOrEqualTo(String value) { + addCriterion("graph_id <=", value, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdLike(String value) { + addCriterion("graph_id like", value, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdNotLike(String value) { + addCriterion("graph_id not like", value, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdIn(List values) { + addCriterion("graph_id in", values, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdNotIn(List values) { + addCriterion("graph_id not in", values, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdBetween(String value1, String value2) { + addCriterion("graph_id between", value1, value2, "graphId"); + return (Criteria) this; + } + + public Criteria andGraphIdNotBetween(String value1, String value2) { + addCriterion("graph_id not between", value1, value2, "graphId"); + return (Criteria) this; + } + + public Criteria andCreatorIsNull() { + addCriterion("creator is null"); + return (Criteria) this; + } + + public Criteria andCreatorIsNotNull() { + addCriterion("creator is not null"); + return (Criteria) this; + } + + public Criteria andCreatorEqualTo(String value) { + addCriterion("creator =", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotEqualTo(String value) { + addCriterion("creator <>", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThan(String value) { + addCriterion("creator >", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThanOrEqualTo(String value) { + addCriterion("creator >=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThan(String value) { + addCriterion("creator <", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThanOrEqualTo(String value) { + addCriterion("creator <=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLike(String value) { + addCriterion("creator like", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotLike(String value) { + addCriterion("creator not like", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorIn(List values) { + addCriterion("creator in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotIn(List values) { + addCriterion("creator not in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorBetween(String value1, String value2) { + addCriterion("creator between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotBetween(String value1, String value2) { + addCriterion("creator not between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 77edb19f77..82765f8a18 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,49 +1,37 @@ package io.metersphere.sdk.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "分享") -@Table("share_info") @Data public class ShareInfo implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{share_info.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "分享ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "分享ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{share_info.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{share_info.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 64]") + @Schema(title = "创建人") private String createUser; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - - @ApiModelProperty(name = "分享类型single batch", required = false, allowableValues = "range[1, 64]") + @Schema(title = "分享类型single batch") private String shareType; - - @ApiModelProperty(name = "分享扩展数据", required = false, allowableValues = "range[1, ]") - private byte[] customData; - - - @ApiModelProperty(name = "语言", required = false, allowableValues = "range[1, 10]") + @Schema(title = "语言") private String lang; + @Schema(title = "分享扩展数据") + private byte[] customData; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ShareInfoExample.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ShareInfoExample.java new file mode 100644 index 0000000000..b7f2cdef09 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ShareInfoExample.java @@ -0,0 +1,600 @@ +package io.metersphere.sdk.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ShareInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ShareInfoExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andShareTypeIsNull() { + addCriterion("share_type is null"); + return (Criteria) this; + } + + public Criteria andShareTypeIsNotNull() { + addCriterion("share_type is not null"); + return (Criteria) this; + } + + public Criteria andShareTypeEqualTo(String value) { + addCriterion("share_type =", value, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeNotEqualTo(String value) { + addCriterion("share_type <>", value, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeGreaterThan(String value) { + addCriterion("share_type >", value, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeGreaterThanOrEqualTo(String value) { + addCriterion("share_type >=", value, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeLessThan(String value) { + addCriterion("share_type <", value, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeLessThanOrEqualTo(String value) { + addCriterion("share_type <=", value, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeLike(String value) { + addCriterion("share_type like", value, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeNotLike(String value) { + addCriterion("share_type not like", value, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeIn(List values) { + addCriterion("share_type in", values, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeNotIn(List values) { + addCriterion("share_type not in", values, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeBetween(String value1, String value2) { + addCriterion("share_type between", value1, value2, "shareType"); + return (Criteria) this; + } + + public Criteria andShareTypeNotBetween(String value1, String value2) { + addCriterion("share_type not between", value1, value2, "shareType"); + return (Criteria) this; + } + + public Criteria andLangIsNull() { + addCriterion("lang is null"); + return (Criteria) this; + } + + public Criteria andLangIsNotNull() { + addCriterion("lang is not null"); + return (Criteria) this; + } + + public Criteria andLangEqualTo(String value) { + addCriterion("lang =", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotEqualTo(String value) { + addCriterion("lang <>", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangGreaterThan(String value) { + addCriterion("lang >", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangGreaterThanOrEqualTo(String value) { + addCriterion("lang >=", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangLessThan(String value) { + addCriterion("lang <", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangLessThanOrEqualTo(String value) { + addCriterion("lang <=", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangLike(String value) { + addCriterion("lang like", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotLike(String value) { + addCriterion("lang not like", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangIn(List values) { + addCriterion("lang in", values, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotIn(List values) { + addCriterion("lang not in", values, "lang"); + return (Criteria) this; + } + + public Criteria andLangBetween(String value1, String value2) { + addCriterion("lang between", value1, value2, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotBetween(String value1, String value2) { + addCriterion("lang not between", value1, value2, "lang"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupMapper.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupMapper.java new file mode 100644 index 0000000000..62bcfcca8f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.sdk.mapper; + +import io.metersphere.sdk.domain.EnvironmentGroup; +import io.metersphere.sdk.domain.EnvironmentGroupExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface EnvironmentGroupMapper { + long countByExample(EnvironmentGroupExample example); + + int deleteByExample(EnvironmentGroupExample example); + + int deleteByPrimaryKey(String id); + + int insert(EnvironmentGroup record); + + int insertSelective(EnvironmentGroup record); + + List selectByExample(EnvironmentGroupExample example); + + EnvironmentGroup selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") EnvironmentGroup record, @Param("example") EnvironmentGroupExample example); + + int updateByExample(@Param("record") EnvironmentGroup record, @Param("example") EnvironmentGroupExample example); + + int updateByPrimaryKeySelective(EnvironmentGroup record); + + int updateByPrimaryKey(EnvironmentGroup record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupMapper.xml new file mode 100644 index 0000000000..2c5e66d7ab --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, workspace_id, description, create_user, create_time, update_time + + + + + delete from environment_group + where id = #{id,jdbcType=VARCHAR} + + + delete from environment_group + + + + + + insert into environment_group (id, `name`, workspace_id, + description, create_user, create_time, + update_time) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}) + + + insert into environment_group + + + id, + + + `name`, + + + workspace_id, + + + description, + + + create_user, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{workspaceId,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update environment_group + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update environment_group + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update environment_group + + + `name` = #{name,jdbcType=VARCHAR}, + + + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update environment_group + set `name` = #{name,jdbcType=VARCHAR}, + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupProjectMapper.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupProjectMapper.java new file mode 100644 index 0000000000..f8b052e77a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupProjectMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.sdk.mapper; + +import io.metersphere.sdk.domain.EnvironmentGroupProject; +import io.metersphere.sdk.domain.EnvironmentGroupProjectExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface EnvironmentGroupProjectMapper { + long countByExample(EnvironmentGroupProjectExample example); + + int deleteByExample(EnvironmentGroupProjectExample example); + + int deleteByPrimaryKey(String id); + + int insert(EnvironmentGroupProject record); + + int insertSelective(EnvironmentGroupProject record); + + List selectByExample(EnvironmentGroupProjectExample example); + + EnvironmentGroupProject selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") EnvironmentGroupProject record, @Param("example") EnvironmentGroupProjectExample example); + + int updateByExample(@Param("record") EnvironmentGroupProject record, @Param("example") EnvironmentGroupProjectExample example); + + int updateByPrimaryKeySelective(EnvironmentGroupProject record); + + int updateByPrimaryKey(EnvironmentGroupProject record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupProjectMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupProjectMapper.xml new file mode 100644 index 0000000000..6d4921ca89 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentGroupProjectMapper.xml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, environment_group_id, environment_id, project_id + + + + + delete from environment_group_project + where id = #{id,jdbcType=VARCHAR} + + + delete from environment_group_project + + + + + + insert into environment_group_project (id, environment_group_id, environment_id, + project_id) + values (#{id,jdbcType=VARCHAR}, #{environmentGroupId,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, + #{projectId,jdbcType=VARCHAR}) + + + insert into environment_group_project + + + id, + + + environment_group_id, + + + environment_id, + + + project_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{environmentGroupId,jdbcType=VARCHAR}, + + + #{environmentId,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + + + + update environment_group_project + + + id = #{record.id,jdbcType=VARCHAR}, + + + environment_group_id = #{record.environmentGroupId,jdbcType=VARCHAR}, + + + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + + + + + + update environment_group_project + set id = #{record.id,jdbcType=VARCHAR}, + environment_group_id = #{record.environmentGroupId,jdbcType=VARCHAR}, + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR} + + + + + + update environment_group_project + + + environment_group_id = #{environmentGroupId,jdbcType=VARCHAR}, + + + environment_id = #{environmentId,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update environment_group_project + set environment_group_id = #{environmentGroupId,jdbcType=VARCHAR}, + environment_id = #{environmentId,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentMapper.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentMapper.java new file mode 100644 index 0000000000..83b589cd66 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.sdk.mapper; + +import io.metersphere.sdk.domain.Environment; +import io.metersphere.sdk.domain.EnvironmentExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface EnvironmentMapper { + long countByExample(EnvironmentExample example); + + int deleteByExample(EnvironmentExample example); + + int deleteByPrimaryKey(String id); + + int insert(Environment record); + + int insertSelective(Environment record); + + List selectByExampleWithBLOBs(EnvironmentExample example); + + List selectByExample(EnvironmentExample example); + + Environment selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Environment record, @Param("example") EnvironmentExample example); + + int updateByExampleWithBLOBs(@Param("record") Environment record, @Param("example") EnvironmentExample example); + + int updateByExample(@Param("record") Environment record, @Param("example") EnvironmentExample example); + + int updateByPrimaryKeySelective(Environment record); + + int updateByPrimaryKeyWithBLOBs(Environment record); + + int updateByPrimaryKey(Environment record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentMapper.xml new file mode 100644 index 0000000000..7e2c7376b9 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/EnvironmentMapper.xml @@ -0,0 +1,405 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, project_id, protocol, socket, `domain`, port, create_user, create_time, + update_time + + + `variables`, headers, config, `hosts` + + + + + + delete from environment + where id = #{id,jdbcType=VARCHAR} + + + delete from environment + + + + + + insert into environment (id, `name`, project_id, + protocol, socket, `domain`, + port, create_user, create_time, + update_time, `variables`, headers, + config, `hosts`) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, + #{protocol,jdbcType=VARCHAR}, #{socket,jdbcType=VARCHAR}, #{domain,jdbcType=VARCHAR}, + #{port,jdbcType=INTEGER}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{variables,jdbcType=LONGVARCHAR}, #{headers,jdbcType=LONGVARCHAR}, + #{config,jdbcType=LONGVARCHAR}, #{hosts,jdbcType=LONGVARCHAR}) + + + insert into environment + + + id, + + + `name`, + + + project_id, + + + protocol, + + + socket, + + + `domain`, + + + port, + + + create_user, + + + create_time, + + + update_time, + + + `variables`, + + + headers, + + + config, + + + `hosts`, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{protocol,jdbcType=VARCHAR}, + + + #{socket,jdbcType=VARCHAR}, + + + #{domain,jdbcType=VARCHAR}, + + + #{port,jdbcType=INTEGER}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{variables,jdbcType=LONGVARCHAR}, + + + #{headers,jdbcType=LONGVARCHAR}, + + + #{config,jdbcType=LONGVARCHAR}, + + + #{hosts,jdbcType=LONGVARCHAR}, + + + + + + update environment + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + protocol = #{record.protocol,jdbcType=VARCHAR}, + + + socket = #{record.socket,jdbcType=VARCHAR}, + + + `domain` = #{record.domain,jdbcType=VARCHAR}, + + + port = #{record.port,jdbcType=INTEGER}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + `variables` = #{record.variables,jdbcType=LONGVARCHAR}, + + + headers = #{record.headers,jdbcType=LONGVARCHAR}, + + + config = #{record.config,jdbcType=LONGVARCHAR}, + + + `hosts` = #{record.hosts,jdbcType=LONGVARCHAR}, + + + + + + + + update environment + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + protocol = #{record.protocol,jdbcType=VARCHAR}, + socket = #{record.socket,jdbcType=VARCHAR}, + `domain` = #{record.domain,jdbcType=VARCHAR}, + port = #{record.port,jdbcType=INTEGER}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + `variables` = #{record.variables,jdbcType=LONGVARCHAR}, + headers = #{record.headers,jdbcType=LONGVARCHAR}, + config = #{record.config,jdbcType=LONGVARCHAR}, + `hosts` = #{record.hosts,jdbcType=LONGVARCHAR} + + + + + + update environment + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + protocol = #{record.protocol,jdbcType=VARCHAR}, + socket = #{record.socket,jdbcType=VARCHAR}, + `domain` = #{record.domain,jdbcType=VARCHAR}, + port = #{record.port,jdbcType=INTEGER}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update environment + + + `name` = #{name,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + protocol = #{protocol,jdbcType=VARCHAR}, + + + socket = #{socket,jdbcType=VARCHAR}, + + + `domain` = #{domain,jdbcType=VARCHAR}, + + + port = #{port,jdbcType=INTEGER}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + `variables` = #{variables,jdbcType=LONGVARCHAR}, + + + headers = #{headers,jdbcType=LONGVARCHAR}, + + + config = #{config,jdbcType=LONGVARCHAR}, + + + `hosts` = #{hosts,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update environment + set `name` = #{name,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + protocol = #{protocol,jdbcType=VARCHAR}, + socket = #{socket,jdbcType=VARCHAR}, + `domain` = #{domain,jdbcType=VARCHAR}, + port = #{port,jdbcType=INTEGER}, + create_user = #{createUser,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + `variables` = #{variables,jdbcType=LONGVARCHAR}, + headers = #{headers,jdbcType=LONGVARCHAR}, + config = #{config,jdbcType=LONGVARCHAR}, + `hosts` = #{hosts,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update environment + set `name` = #{name,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + protocol = #{protocol,jdbcType=VARCHAR}, + socket = #{socket,jdbcType=VARCHAR}, + `domain` = #{domain,jdbcType=VARCHAR}, + port = #{port,jdbcType=INTEGER}, + create_user = #{createUser,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.java new file mode 100644 index 0000000000..ea87fae8d7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.sdk.mapper; + +import io.metersphere.sdk.domain.ExecutionQueueDetail; +import io.metersphere.sdk.domain.ExecutionQueueDetailExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ExecutionQueueDetailMapper { + long countByExample(ExecutionQueueDetailExample example); + + int deleteByExample(ExecutionQueueDetailExample example); + + int deleteByPrimaryKey(String id); + + int insert(ExecutionQueueDetail record); + + int insertSelective(ExecutionQueueDetail record); + + List selectByExampleWithBLOBs(ExecutionQueueDetailExample example); + + List selectByExample(ExecutionQueueDetailExample example); + + ExecutionQueueDetail selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ExecutionQueueDetail record, @Param("example") ExecutionQueueDetailExample example); + + int updateByExampleWithBLOBs(@Param("record") ExecutionQueueDetail record, @Param("example") ExecutionQueueDetailExample example); + + int updateByExample(@Param("record") ExecutionQueueDetail record, @Param("example") ExecutionQueueDetailExample example); + + int updateByPrimaryKeySelective(ExecutionQueueDetail record); + + int updateByPrimaryKeyWithBLOBs(ExecutionQueueDetail record); + + int updateByPrimaryKey(ExecutionQueueDetail record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.xml new file mode 100644 index 0000000000..6eb8fda588 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.xml @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, queue_id, sort, report_id, test_id, `type`, create_time, retry_enable, retry_number, + project_ids + + + evn_map + + + + + + delete from execution_queue_detail + where id = #{id,jdbcType=VARCHAR} + + + delete from execution_queue_detail + + + + + + insert into execution_queue_detail (id, queue_id, sort, + report_id, test_id, `type`, + create_time, retry_enable, retry_number, + project_ids, evn_map) + values (#{id,jdbcType=VARCHAR}, #{queueId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, + #{reportId,jdbcType=VARCHAR}, #{testId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{retryEnable,jdbcType=BIT}, #{retryNumber,jdbcType=BIGINT}, + #{projectIds,jdbcType=VARCHAR}, #{evnMap,jdbcType=LONGVARCHAR}) + + + insert into execution_queue_detail + + + id, + + + queue_id, + + + sort, + + + report_id, + + + test_id, + + + `type`, + + + create_time, + + + retry_enable, + + + retry_number, + + + project_ids, + + + evn_map, + + + + + #{id,jdbcType=VARCHAR}, + + + #{queueId,jdbcType=VARCHAR}, + + + #{sort,jdbcType=INTEGER}, + + + #{reportId,jdbcType=VARCHAR}, + + + #{testId,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{retryEnable,jdbcType=BIT}, + + + #{retryNumber,jdbcType=BIGINT}, + + + #{projectIds,jdbcType=VARCHAR}, + + + #{evnMap,jdbcType=LONGVARCHAR}, + + + + + + update execution_queue_detail + + + id = #{record.id,jdbcType=VARCHAR}, + + + queue_id = #{record.queueId,jdbcType=VARCHAR}, + + + sort = #{record.sort,jdbcType=INTEGER}, + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + test_id = #{record.testId,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + retry_enable = #{record.retryEnable,jdbcType=BIT}, + + + retry_number = #{record.retryNumber,jdbcType=BIGINT}, + + + project_ids = #{record.projectIds,jdbcType=VARCHAR}, + + + evn_map = #{record.evnMap,jdbcType=LONGVARCHAR}, + + + + + + + + update execution_queue_detail + set id = #{record.id,jdbcType=VARCHAR}, + queue_id = #{record.queueId,jdbcType=VARCHAR}, + sort = #{record.sort,jdbcType=INTEGER}, + report_id = #{record.reportId,jdbcType=VARCHAR}, + test_id = #{record.testId,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + retry_enable = #{record.retryEnable,jdbcType=BIT}, + retry_number = #{record.retryNumber,jdbcType=BIGINT}, + project_ids = #{record.projectIds,jdbcType=VARCHAR}, + evn_map = #{record.evnMap,jdbcType=LONGVARCHAR} + + + + + + update execution_queue_detail + set id = #{record.id,jdbcType=VARCHAR}, + queue_id = #{record.queueId,jdbcType=VARCHAR}, + sort = #{record.sort,jdbcType=INTEGER}, + report_id = #{record.reportId,jdbcType=VARCHAR}, + test_id = #{record.testId,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + retry_enable = #{record.retryEnable,jdbcType=BIT}, + retry_number = #{record.retryNumber,jdbcType=BIGINT}, + project_ids = #{record.projectIds,jdbcType=VARCHAR} + + + + + + update execution_queue_detail + + + queue_id = #{queueId,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=INTEGER}, + + + report_id = #{reportId,jdbcType=VARCHAR}, + + + test_id = #{testId,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + retry_enable = #{retryEnable,jdbcType=BIT}, + + + retry_number = #{retryNumber,jdbcType=BIGINT}, + + + project_ids = #{projectIds,jdbcType=VARCHAR}, + + + evn_map = #{evnMap,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update execution_queue_detail + set queue_id = #{queueId,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + report_id = #{reportId,jdbcType=VARCHAR}, + test_id = #{testId,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + retry_enable = #{retryEnable,jdbcType=BIT}, + retry_number = #{retryNumber,jdbcType=BIGINT}, + project_ids = #{projectIds,jdbcType=VARCHAR}, + evn_map = #{evnMap,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update execution_queue_detail + set queue_id = #{queueId,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=INTEGER}, + report_id = #{reportId,jdbcType=VARCHAR}, + test_id = #{testId,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + retry_enable = #{retryEnable,jdbcType=BIT}, + retry_number = #{retryNumber,jdbcType=BIGINT}, + project_ids = #{projectIds,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.java new file mode 100644 index 0000000000..db2fb571b9 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.sdk.mapper; + +import io.metersphere.sdk.domain.ExecutionQueue; +import io.metersphere.sdk.domain.ExecutionQueueExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ExecutionQueueMapper { + long countByExample(ExecutionQueueExample example); + + int deleteByExample(ExecutionQueueExample example); + + int deleteByPrimaryKey(String id); + + int insert(ExecutionQueue record); + + int insertSelective(ExecutionQueue record); + + List selectByExample(ExecutionQueueExample example); + + ExecutionQueue selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ExecutionQueue record, @Param("example") ExecutionQueueExample example); + + int updateByExample(@Param("record") ExecutionQueue record, @Param("example") ExecutionQueueExample example); + + int updateByPrimaryKeySelective(ExecutionQueue record); + + int updateByPrimaryKey(ExecutionQueue record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.xml new file mode 100644 index 0000000000..03aeba5b4c --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, report_id, report_type, run_mode, pool_id, create_time, failure + + + + + delete from execution_queue + where id = #{id,jdbcType=VARCHAR} + + + delete from execution_queue + + + + + + insert into execution_queue (id, report_id, report_type, + run_mode, pool_id, create_time, + failure) + values (#{id,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{reportType,jdbcType=VARCHAR}, + #{runMode,jdbcType=VARCHAR}, #{poolId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{failure,jdbcType=BIT}) + + + insert into execution_queue + + + id, + + + report_id, + + + report_type, + + + run_mode, + + + pool_id, + + + create_time, + + + failure, + + + + + #{id,jdbcType=VARCHAR}, + + + #{reportId,jdbcType=VARCHAR}, + + + #{reportType,jdbcType=VARCHAR}, + + + #{runMode,jdbcType=VARCHAR}, + + + #{poolId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{failure,jdbcType=BIT}, + + + + + + update execution_queue + + + id = #{record.id,jdbcType=VARCHAR}, + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + report_type = #{record.reportType,jdbcType=VARCHAR}, + + + run_mode = #{record.runMode,jdbcType=VARCHAR}, + + + pool_id = #{record.poolId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + failure = #{record.failure,jdbcType=BIT}, + + + + + + + + update execution_queue + set id = #{record.id,jdbcType=VARCHAR}, + report_id = #{record.reportId,jdbcType=VARCHAR}, + report_type = #{record.reportType,jdbcType=VARCHAR}, + run_mode = #{record.runMode,jdbcType=VARCHAR}, + pool_id = #{record.poolId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + failure = #{record.failure,jdbcType=BIT} + + + + + + update execution_queue + + + report_id = #{reportId,jdbcType=VARCHAR}, + + + report_type = #{reportType,jdbcType=VARCHAR}, + + + run_mode = #{runMode,jdbcType=VARCHAR}, + + + pool_id = #{poolId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + failure = #{failure,jdbcType=BIT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update execution_queue + set report_id = #{reportId,jdbcType=VARCHAR}, + report_type = #{reportType,jdbcType=VARCHAR}, + run_mode = #{runMode,jdbcType=VARCHAR}, + pool_id = #{poolId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + failure = #{failure,jdbcType=BIT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/RelationshipEdgeMapper.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/RelationshipEdgeMapper.java new file mode 100644 index 0000000000..b5a843ff13 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/RelationshipEdgeMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.sdk.mapper; + +import io.metersphere.sdk.domain.RelationshipEdge; +import io.metersphere.sdk.domain.RelationshipEdgeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface RelationshipEdgeMapper { + long countByExample(RelationshipEdgeExample example); + + int deleteByExample(RelationshipEdgeExample example); + + int deleteByPrimaryKey(@Param("sourceId") String sourceId, @Param("targetId") String targetId); + + int insert(RelationshipEdge record); + + int insertSelective(RelationshipEdge record); + + List selectByExample(RelationshipEdgeExample example); + + RelationshipEdge selectByPrimaryKey(@Param("sourceId") String sourceId, @Param("targetId") String targetId); + + int updateByExampleSelective(@Param("record") RelationshipEdge record, @Param("example") RelationshipEdgeExample example); + + int updateByExample(@Param("record") RelationshipEdge record, @Param("example") RelationshipEdgeExample example); + + int updateByPrimaryKeySelective(RelationshipEdge record); + + int updateByPrimaryKey(RelationshipEdge record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/RelationshipEdgeMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/RelationshipEdgeMapper.xml new file mode 100644 index 0000000000..f2464cbfef --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/RelationshipEdgeMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + source_id, target_id, `type`, graph_id, creator, create_time + + + + + delete from relationship_edge + where source_id = #{sourceId,jdbcType=VARCHAR} + and target_id = #{targetId,jdbcType=VARCHAR} + + + delete from relationship_edge + + + + + + insert into relationship_edge (source_id, target_id, `type`, + graph_id, creator, create_time + ) + values (#{sourceId,jdbcType=VARCHAR}, #{targetId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{graphId,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT} + ) + + + insert into relationship_edge + + + source_id, + + + target_id, + + + `type`, + + + graph_id, + + + creator, + + + create_time, + + + + + #{sourceId,jdbcType=VARCHAR}, + + + #{targetId,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{graphId,jdbcType=VARCHAR}, + + + #{creator,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + + + + update relationship_edge + + + source_id = #{record.sourceId,jdbcType=VARCHAR}, + + + target_id = #{record.targetId,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + graph_id = #{record.graphId,jdbcType=VARCHAR}, + + + creator = #{record.creator,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + + + + + + update relationship_edge + set source_id = #{record.sourceId,jdbcType=VARCHAR}, + target_id = #{record.targetId,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + graph_id = #{record.graphId,jdbcType=VARCHAR}, + creator = #{record.creator,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT} + + + + + + update relationship_edge + + + `type` = #{type,jdbcType=VARCHAR}, + + + graph_id = #{graphId,jdbcType=VARCHAR}, + + + creator = #{creator,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + where source_id = #{sourceId,jdbcType=VARCHAR} + and target_id = #{targetId,jdbcType=VARCHAR} + + + update relationship_edge + set `type` = #{type,jdbcType=VARCHAR}, + graph_id = #{graphId,jdbcType=VARCHAR}, + creator = #{creator,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT} + where source_id = #{sourceId,jdbcType=VARCHAR} + and target_id = #{targetId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ShareInfoMapper.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ShareInfoMapper.java new file mode 100644 index 0000000000..4662b235bd --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ShareInfoMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.sdk.mapper; + +import io.metersphere.sdk.domain.ShareInfo; +import io.metersphere.sdk.domain.ShareInfoExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ShareInfoMapper { + long countByExample(ShareInfoExample example); + + int deleteByExample(ShareInfoExample example); + + int deleteByPrimaryKey(String id); + + int insert(ShareInfo record); + + int insertSelective(ShareInfo record); + + List selectByExampleWithBLOBs(ShareInfoExample example); + + List selectByExample(ShareInfoExample example); + + ShareInfo selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ShareInfo record, @Param("example") ShareInfoExample example); + + int updateByExampleWithBLOBs(@Param("record") ShareInfo record, @Param("example") ShareInfoExample example); + + int updateByExample(@Param("record") ShareInfo record, @Param("example") ShareInfoExample example); + + int updateByPrimaryKeySelective(ShareInfo record); + + int updateByPrimaryKeyWithBLOBs(ShareInfo record); + + int updateByPrimaryKey(ShareInfo record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ShareInfoMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ShareInfoMapper.xml new file mode 100644 index 0000000000..8c197673cd --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ShareInfoMapper.xml @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_time, create_user, update_time, share_type, lang + + + custom_data + + + + + + delete from share_info + where id = #{id,jdbcType=VARCHAR} + + + delete from share_info + + + + + + insert into share_info (id, create_time, create_user, + update_time, share_type, lang, + custom_data) + values (#{id,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{updateTime,jdbcType=BIGINT}, #{shareType,jdbcType=VARCHAR}, #{lang,jdbcType=VARCHAR}, + #{customData,jdbcType=LONGVARBINARY}) + + + insert into share_info + + + id, + + + create_time, + + + create_user, + + + update_time, + + + share_type, + + + lang, + + + custom_data, + + + + + #{id,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{shareType,jdbcType=VARCHAR}, + + + #{lang,jdbcType=VARCHAR}, + + + #{customData,jdbcType=LONGVARBINARY}, + + + + + + update share_info + + + id = #{record.id,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + share_type = #{record.shareType,jdbcType=VARCHAR}, + + + lang = #{record.lang,jdbcType=VARCHAR}, + + + custom_data = #{record.customData,jdbcType=LONGVARBINARY}, + + + + + + + + update share_info + set id = #{record.id,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + share_type = #{record.shareType,jdbcType=VARCHAR}, + lang = #{record.lang,jdbcType=VARCHAR}, + custom_data = #{record.customData,jdbcType=LONGVARBINARY} + + + + + + update share_info + set id = #{record.id,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + share_type = #{record.shareType,jdbcType=VARCHAR}, + lang = #{record.lang,jdbcType=VARCHAR} + + + + + + update share_info + + + create_time = #{createTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + share_type = #{shareType,jdbcType=VARCHAR}, + + + lang = #{lang,jdbcType=VARCHAR}, + + + custom_data = #{customData,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update share_info + set create_time = #{createTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=BIGINT}, + share_type = #{shareType,jdbcType=VARCHAR}, + lang = #{lang,jdbcType=VARCHAR}, + custom_data = #{customData,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update share_info + set create_time = #{createTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=BIGINT}, + share_type = #{shareType,jdbcType=VARCHAR}, + lang = #{lang,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file 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 262d8ff3ba..f73813ed90 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,56 +1,44 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "三方认证源") -@Table("auth_source") @Data public class AuthSource implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{auth_source.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "认证源ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "认证源ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{auth_source.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{auth_source.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "认证源配置", required = true, allowableValues = "range[1, ]") - private byte[] configuration; - + @Schema(title = "状态 启用 禁用", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{auth_source.status.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{auth_source.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{auth_source.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "状态 启用 禁用", required = true, allowableValues = "range[1, 64]") private String status; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]") + @Schema(title = "描述") private String description; - - @ApiModelProperty(name = "名称", required = false, allowableValues = "range[1, 60]") + @Schema(title = "名称") private String name; - - @ApiModelProperty(name = "类型", required = false, allowableValues = "range[1, 30]") + @Schema(title = "类型") private String type; + @Schema(title = "认证源配置", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 65535]") + @NotBlank(message = "{auth_source.configuration.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 65535, message = "{auth_source.configuration.length_range}", groups = {Created.class, Updated.class}) + private byte[] configuration; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSourceExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSourceExample.java new file mode 100644 index 0000000000..65345bea3e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/AuthSourceExample.java @@ -0,0 +1,670 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class AuthSourceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public AuthSourceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 4563037a0e..76df44a617 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,39 +1,28 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "") -@Table("license") @Data public class License implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{license.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{license.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{license.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "Create timestamp", required = true, allowableValues = "range[1, ]") + @Schema(title = "Create timestamp") private Long createTime; - - @ApiModelProperty(name = "Update timestamp", required = true, allowableValues = "range[1, ]") + @Schema(title = "Update timestamp") private Long updateTime; - - @ApiModelProperty(name = "license_code", required = false, allowableValues = "range[1, ]") + @Schema(title = "license_code") private String licenseCode; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/LicenseExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/LicenseExample.java new file mode 100644 index 0000000000..bddd20b59f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/LicenseExample.java @@ -0,0 +1,390 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LicenseExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LicenseExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 a77cfb2060..f925d60a50 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,65 +1,55 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "消息通知任务") -@Table("message_task") @Data public class MessageTask implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{message_task.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 255]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{message_task.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 255, message = "{message_task.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "消息类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{message_task.type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{message_task.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{message_task.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "消息类型", required = true, allowableValues = "range[1, 50]") private String type; + @Schema(title = "通知事件类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{message_task.event.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 255, message = "{message_task.event.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{message_task.event.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "通知事件类型", required = true, allowableValues = "range[1, 255]") private String event; + @Schema(title = "接收人id", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{message_task.receiver.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{message_task.receiver.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{message_task.receiver.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接收人id", required = true, allowableValues = "range[1, 50]") private String receiver; + @Schema(title = "任务类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{message_task.task_type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{message_task.task_type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{message_task.task_type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "任务类型", required = true, allowableValues = "range[1, 64]") private String taskType; - - @ApiModelProperty(name = "webhook地址", required = false, allowableValues = "range[1, 255]") + @Schema(title = "webhook地址") private String webhook; + @Schema(title = "具体测试的ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{message_task.test_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 255, message = "{message_task.test_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{message_task.test_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "具体测试的ID", required = true, allowableValues = "range[1, 255]") private String testId; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{message_task.project_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{message_task.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{message_task.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 64]") private String projectId; - + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 6f622a7554..80e3e497fc 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,33 +1,22 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "消息通知任务大字段") -@Table("message_task_blob") @Data -@EqualsAndHashCode(callSuper=false) public class MessageTaskBlob implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{message_task_blob.message_task_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 255, message = "{message_task_blob.message_task_id.length_range}", groups = {Created.class, Updated.class}) + private String messageTaskId; - @Id - @NotBlank(message = "{message_task_blob.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") - private String id; - - - @ApiModelProperty(name = "消息模版", required = false, allowableValues = "range[1, ]") + @Schema(title = "消息模版") private String template; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlobExample.java new file mode 100644 index 0000000000..e708178c8e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskBlobExample.java @@ -0,0 +1,270 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class MessageTaskBlobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MessageTaskBlobExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andMessageTaskIdIsNull() { + addCriterion("message_task_id is null"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdIsNotNull() { + addCriterion("message_task_id is not null"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdEqualTo(String value) { + addCriterion("message_task_id =", value, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdNotEqualTo(String value) { + addCriterion("message_task_id <>", value, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdGreaterThan(String value) { + addCriterion("message_task_id >", value, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdGreaterThanOrEqualTo(String value) { + addCriterion("message_task_id >=", value, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdLessThan(String value) { + addCriterion("message_task_id <", value, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdLessThanOrEqualTo(String value) { + addCriterion("message_task_id <=", value, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdLike(String value) { + addCriterion("message_task_id like", value, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdNotLike(String value) { + addCriterion("message_task_id not like", value, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdIn(List values) { + addCriterion("message_task_id in", values, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdNotIn(List values) { + addCriterion("message_task_id not in", values, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdBetween(String value1, String value2) { + addCriterion("message_task_id between", value1, value2, "messageTaskId"); + return (Criteria) this; + } + + public Criteria andMessageTaskIdNotBetween(String value1, String value2) { + addCriterion("message_task_id not between", value1, value2, "messageTaskId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskExample.java new file mode 100644 index 0000000000..bfc63bf861 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/MessageTaskExample.java @@ -0,0 +1,820 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class MessageTaskExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MessageTaskExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andEventIsNull() { + addCriterion("event is null"); + return (Criteria) this; + } + + public Criteria andEventIsNotNull() { + addCriterion("event is not null"); + return (Criteria) this; + } + + public Criteria andEventEqualTo(String value) { + addCriterion("event =", value, "event"); + return (Criteria) this; + } + + public Criteria andEventNotEqualTo(String value) { + addCriterion("event <>", value, "event"); + return (Criteria) this; + } + + public Criteria andEventGreaterThan(String value) { + addCriterion("event >", value, "event"); + return (Criteria) this; + } + + public Criteria andEventGreaterThanOrEqualTo(String value) { + addCriterion("event >=", value, "event"); + return (Criteria) this; + } + + public Criteria andEventLessThan(String value) { + addCriterion("event <", value, "event"); + return (Criteria) this; + } + + public Criteria andEventLessThanOrEqualTo(String value) { + addCriterion("event <=", value, "event"); + return (Criteria) this; + } + + public Criteria andEventLike(String value) { + addCriterion("event like", value, "event"); + return (Criteria) this; + } + + public Criteria andEventNotLike(String value) { + addCriterion("event not like", value, "event"); + return (Criteria) this; + } + + public Criteria andEventIn(List values) { + addCriterion("event in", values, "event"); + return (Criteria) this; + } + + public Criteria andEventNotIn(List values) { + addCriterion("event not in", values, "event"); + return (Criteria) this; + } + + public Criteria andEventBetween(String value1, String value2) { + addCriterion("event between", value1, value2, "event"); + return (Criteria) this; + } + + public Criteria andEventNotBetween(String value1, String value2) { + addCriterion("event not between", value1, value2, "event"); + return (Criteria) this; + } + + public Criteria andReceiverIsNull() { + addCriterion("receiver is null"); + return (Criteria) this; + } + + public Criteria andReceiverIsNotNull() { + addCriterion("receiver is not null"); + return (Criteria) this; + } + + public Criteria andReceiverEqualTo(String value) { + addCriterion("receiver =", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverNotEqualTo(String value) { + addCriterion("receiver <>", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverGreaterThan(String value) { + addCriterion("receiver >", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverGreaterThanOrEqualTo(String value) { + addCriterion("receiver >=", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverLessThan(String value) { + addCriterion("receiver <", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverLessThanOrEqualTo(String value) { + addCriterion("receiver <=", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverLike(String value) { + addCriterion("receiver like", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverNotLike(String value) { + addCriterion("receiver not like", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverIn(List values) { + addCriterion("receiver in", values, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverNotIn(List values) { + addCriterion("receiver not in", values, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverBetween(String value1, String value2) { + addCriterion("receiver between", value1, value2, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverNotBetween(String value1, String value2) { + addCriterion("receiver not between", value1, value2, "receiver"); + return (Criteria) this; + } + + public Criteria andTaskTypeIsNull() { + addCriterion("task_type is null"); + return (Criteria) this; + } + + public Criteria andTaskTypeIsNotNull() { + addCriterion("task_type is not null"); + return (Criteria) this; + } + + public Criteria andTaskTypeEqualTo(String value) { + addCriterion("task_type =", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeNotEqualTo(String value) { + addCriterion("task_type <>", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeGreaterThan(String value) { + addCriterion("task_type >", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeGreaterThanOrEqualTo(String value) { + addCriterion("task_type >=", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeLessThan(String value) { + addCriterion("task_type <", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeLessThanOrEqualTo(String value) { + addCriterion("task_type <=", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeLike(String value) { + addCriterion("task_type like", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeNotLike(String value) { + addCriterion("task_type not like", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeIn(List values) { + addCriterion("task_type in", values, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeNotIn(List values) { + addCriterion("task_type not in", values, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeBetween(String value1, String value2) { + addCriterion("task_type between", value1, value2, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeNotBetween(String value1, String value2) { + addCriterion("task_type not between", value1, value2, "taskType"); + return (Criteria) this; + } + + public Criteria andWebhookIsNull() { + addCriterion("webhook is null"); + return (Criteria) this; + } + + public Criteria andWebhookIsNotNull() { + addCriterion("webhook is not null"); + return (Criteria) this; + } + + public Criteria andWebhookEqualTo(String value) { + addCriterion("webhook =", value, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookNotEqualTo(String value) { + addCriterion("webhook <>", value, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookGreaterThan(String value) { + addCriterion("webhook >", value, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookGreaterThanOrEqualTo(String value) { + addCriterion("webhook >=", value, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookLessThan(String value) { + addCriterion("webhook <", value, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookLessThanOrEqualTo(String value) { + addCriterion("webhook <=", value, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookLike(String value) { + addCriterion("webhook like", value, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookNotLike(String value) { + addCriterion("webhook not like", value, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookIn(List values) { + addCriterion("webhook in", values, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookNotIn(List values) { + addCriterion("webhook not in", values, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookBetween(String value1, String value2) { + addCriterion("webhook between", value1, value2, "webhook"); + return (Criteria) this; + } + + public Criteria andWebhookNotBetween(String value1, String value2) { + addCriterion("webhook not between", value1, value2, "webhook"); + return (Criteria) this; + } + + public Criteria andTestIdIsNull() { + addCriterion("test_id is null"); + return (Criteria) this; + } + + public Criteria andTestIdIsNotNull() { + addCriterion("test_id is not null"); + return (Criteria) this; + } + + public Criteria andTestIdEqualTo(String value) { + addCriterion("test_id =", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotEqualTo(String value) { + addCriterion("test_id <>", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThan(String value) { + addCriterion("test_id >", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThanOrEqualTo(String value) { + addCriterion("test_id >=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThan(String value) { + addCriterion("test_id <", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThanOrEqualTo(String value) { + addCriterion("test_id <=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLike(String value) { + addCriterion("test_id like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotLike(String value) { + addCriterion("test_id not like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdIn(List values) { + addCriterion("test_id in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotIn(List values) { + addCriterion("test_id not in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdBetween(String value1, String value2) { + addCriterion("test_id between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotBetween(String value1, String value2) { + addCriterion("test_id not between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 5b9e43bed6..884da1386c 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,76 +1,67 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "消息通知") -@Table("notification") @Data public class Notification implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{notification.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, ]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 19]") + @NotBlank(message = "{notification.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 19, message = "{notification.id.length_range}", groups = {Created.class, Updated.class}) private Long id; + @Schema(title = "通知类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 30]") + @NotBlank(message = "{notification.type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 30, message = "{notification.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{notification.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "通知类型", required = true, allowableValues = "range[1, 30]") private String type; + @Schema(title = "接收人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{notification.receiver.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{notification.receiver.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{notification.receiver.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "接收人", required = true, allowableValues = "range[1, 50]") private String receiver; + @Schema(title = "标题", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{notification.title.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 100, message = "{notification.title.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{notification.title.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "标题", required = true, allowableValues = "range[1, 100]") private String title; + @Schema(title = "状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 30]") + @NotBlank(message = "{notification.status.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 30, message = "{notification.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{notification.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "状态", required = true, allowableValues = "range[1, 30]") private String status; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; + @Schema(title = "操作人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{notification.operator.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{notification.operator.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{notification.operator.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "操作人", required = true, allowableValues = "range[1, 50]") private String operator; + @Schema(title = "操作", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{notification.operation.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{notification.operation.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{notification.operation.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "操作", required = true, allowableValues = "range[1, 50]") private String operation; + @Schema(title = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{notification.resource_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{notification.resource_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{notification.resource_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源ID", required = true, allowableValues = "range[1, 50]") private String resourceId; + @Schema(title = "资源类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{notification.resource_type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{notification.resource_type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{notification.resource_type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源类型", required = true, allowableValues = "range[1, 50]") private String resourceType; + @Schema(title = "资源名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{notification.resource_name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 100, message = "{notification.resource_name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{notification.resource_name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源名称", required = true, allowableValues = "range[1, 100]") private String resourceName; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/NotificationExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/NotificationExample.java new file mode 100644 index 0000000000..549900a513 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/NotificationExample.java @@ -0,0 +1,950 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class NotificationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public NotificationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andReceiverIsNull() { + addCriterion("receiver is null"); + return (Criteria) this; + } + + public Criteria andReceiverIsNotNull() { + addCriterion("receiver is not null"); + return (Criteria) this; + } + + public Criteria andReceiverEqualTo(String value) { + addCriterion("receiver =", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverNotEqualTo(String value) { + addCriterion("receiver <>", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverGreaterThan(String value) { + addCriterion("receiver >", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverGreaterThanOrEqualTo(String value) { + addCriterion("receiver >=", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverLessThan(String value) { + addCriterion("receiver <", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverLessThanOrEqualTo(String value) { + addCriterion("receiver <=", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverLike(String value) { + addCriterion("receiver like", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverNotLike(String value) { + addCriterion("receiver not like", value, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverIn(List values) { + addCriterion("receiver in", values, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverNotIn(List values) { + addCriterion("receiver not in", values, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverBetween(String value1, String value2) { + addCriterion("receiver between", value1, value2, "receiver"); + return (Criteria) this; + } + + public Criteria andReceiverNotBetween(String value1, String value2) { + addCriterion("receiver not between", value1, value2, "receiver"); + return (Criteria) this; + } + + public Criteria andTitleIsNull() { + addCriterion("title is null"); + return (Criteria) this; + } + + public Criteria andTitleIsNotNull() { + addCriterion("title is not null"); + return (Criteria) this; + } + + public Criteria andTitleEqualTo(String value) { + addCriterion("title =", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotEqualTo(String value) { + addCriterion("title <>", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThan(String value) { + addCriterion("title >", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThanOrEqualTo(String value) { + addCriterion("title >=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThan(String value) { + addCriterion("title <", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThanOrEqualTo(String value) { + addCriterion("title <=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List values) { + addCriterion("title not in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleBetween(String value1, String value2) { + addCriterion("title between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotBetween(String value1, String value2) { + addCriterion("title not between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andOperatorIsNull() { + addCriterion("`operator` is null"); + return (Criteria) this; + } + + public Criteria andOperatorIsNotNull() { + addCriterion("`operator` is not null"); + return (Criteria) this; + } + + public Criteria andOperatorEqualTo(String value) { + addCriterion("`operator` =", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotEqualTo(String value) { + addCriterion("`operator` <>", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThan(String value) { + addCriterion("`operator` >", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorGreaterThanOrEqualTo(String value) { + addCriterion("`operator` >=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThan(String value) { + addCriterion("`operator` <", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLessThanOrEqualTo(String value) { + addCriterion("`operator` <=", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorLike(String value) { + addCriterion("`operator` like", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotLike(String value) { + addCriterion("`operator` not like", value, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorIn(List values) { + addCriterion("`operator` in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotIn(List values) { + addCriterion("`operator` not in", values, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorBetween(String value1, String value2) { + addCriterion("`operator` between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperatorNotBetween(String value1, String value2) { + addCriterion("`operator` not between", value1, value2, "operator"); + return (Criteria) this; + } + + public Criteria andOperationIsNull() { + addCriterion("`operation` is null"); + return (Criteria) this; + } + + public Criteria andOperationIsNotNull() { + addCriterion("`operation` is not null"); + return (Criteria) this; + } + + public Criteria andOperationEqualTo(String value) { + addCriterion("`operation` =", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotEqualTo(String value) { + addCriterion("`operation` <>", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationGreaterThan(String value) { + addCriterion("`operation` >", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationGreaterThanOrEqualTo(String value) { + addCriterion("`operation` >=", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationLessThan(String value) { + addCriterion("`operation` <", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationLessThanOrEqualTo(String value) { + addCriterion("`operation` <=", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationLike(String value) { + addCriterion("`operation` like", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotLike(String value) { + addCriterion("`operation` not like", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationIn(List values) { + addCriterion("`operation` in", values, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotIn(List values) { + addCriterion("`operation` not in", values, "operation"); + return (Criteria) this; + } + + public Criteria andOperationBetween(String value1, String value2) { + addCriterion("`operation` between", value1, value2, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotBetween(String value1, String value2) { + addCriterion("`operation` not between", value1, value2, "operation"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNull() { + addCriterion("resource_id is null"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNotNull() { + addCriterion("resource_id is not null"); + return (Criteria) this; + } + + public Criteria andResourceIdEqualTo(String value) { + addCriterion("resource_id =", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotEqualTo(String value) { + addCriterion("resource_id <>", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThan(String value) { + addCriterion("resource_id >", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThanOrEqualTo(String value) { + addCriterion("resource_id >=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThan(String value) { + addCriterion("resource_id <", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThanOrEqualTo(String value) { + addCriterion("resource_id <=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLike(String value) { + addCriterion("resource_id like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotLike(String value) { + addCriterion("resource_id not like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdIn(List values) { + addCriterion("resource_id in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotIn(List values) { + addCriterion("resource_id not in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdBetween(String value1, String value2) { + addCriterion("resource_id between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotBetween(String value1, String value2) { + addCriterion("resource_id not between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceTypeIsNull() { + addCriterion("resource_type is null"); + return (Criteria) this; + } + + public Criteria andResourceTypeIsNotNull() { + addCriterion("resource_type is not null"); + return (Criteria) this; + } + + public Criteria andResourceTypeEqualTo(String value) { + addCriterion("resource_type =", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotEqualTo(String value) { + addCriterion("resource_type <>", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeGreaterThan(String value) { + addCriterion("resource_type >", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeGreaterThanOrEqualTo(String value) { + addCriterion("resource_type >=", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLessThan(String value) { + addCriterion("resource_type <", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLessThanOrEqualTo(String value) { + addCriterion("resource_type <=", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLike(String value) { + addCriterion("resource_type like", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotLike(String value) { + addCriterion("resource_type not like", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeIn(List values) { + addCriterion("resource_type in", values, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotIn(List values) { + addCriterion("resource_type not in", values, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeBetween(String value1, String value2) { + addCriterion("resource_type between", value1, value2, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotBetween(String value1, String value2) { + addCriterion("resource_type not between", value1, value2, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceNameIsNull() { + addCriterion("resource_name is null"); + return (Criteria) this; + } + + public Criteria andResourceNameIsNotNull() { + addCriterion("resource_name is not null"); + return (Criteria) this; + } + + public Criteria andResourceNameEqualTo(String value) { + addCriterion("resource_name =", value, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameNotEqualTo(String value) { + addCriterion("resource_name <>", value, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameGreaterThan(String value) { + addCriterion("resource_name >", value, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameGreaterThanOrEqualTo(String value) { + addCriterion("resource_name >=", value, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameLessThan(String value) { + addCriterion("resource_name <", value, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameLessThanOrEqualTo(String value) { + addCriterion("resource_name <=", value, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameLike(String value) { + addCriterion("resource_name like", value, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameNotLike(String value) { + addCriterion("resource_name not like", value, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameIn(List values) { + addCriterion("resource_name in", values, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameNotIn(List values) { + addCriterion("resource_name not in", values, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameBetween(String value1, String value2) { + addCriterion("resource_name between", value1, value2, "resourceName"); + return (Criteria) this; + } + + public Criteria andResourceNameNotBetween(String value1, String value2) { + addCriterion("resource_name not between", value1, value2, "resourceName"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 97c8917065..63bb3e02ae 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,52 +1,41 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "新手村") -@Table("novice_statistics") @Data public class NoviceStatistics implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{novice_statistics.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{novice_statistics.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{novice_statistics.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "用户id", required = false, allowableValues = "range[1, 64]") + @Schema(title = "用户id") private String userId; + @Schema(title = "新手引导完成的步骤", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") + @NotBlank(message = "{novice_statistics.guide_step.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 1, message = "{novice_statistics.guide_step.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{novice_statistics.guide_step.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "新手引导完成的步骤", required = true, allowableValues = "range[1, 1]") private Boolean guideStep; - - @ApiModelProperty(name = "新手引导的次数", required = true, allowableValues = "range[1, ]") + @Schema(title = "新手引导的次数", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 10]") + @NotBlank(message = "{novice_statistics.guide_num.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 10, message = "{novice_statistics.guide_num.length_range}", groups = {Created.class, Updated.class}) private Integer guideNum; - - @ApiModelProperty(name = "data option (JSON format)", required = false, allowableValues = "range[1, ]") - private byte[] dataOption; - - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]") + @Schema(title = "") private Long createTime; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]") + @Schema(title = "") private Long updateTime; + @Schema(title = "data option (JSON format)") + private byte[] dataOption; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatisticsExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatisticsExample.java new file mode 100644 index 0000000000..0c339ef0d1 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/NoviceStatisticsExample.java @@ -0,0 +1,580 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class NoviceStatisticsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public NoviceStatisticsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andGuideStepIsNull() { + addCriterion("guide_step is null"); + return (Criteria) this; + } + + public Criteria andGuideStepIsNotNull() { + addCriterion("guide_step is not null"); + return (Criteria) this; + } + + public Criteria andGuideStepEqualTo(Boolean value) { + addCriterion("guide_step =", value, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideStepNotEqualTo(Boolean value) { + addCriterion("guide_step <>", value, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideStepGreaterThan(Boolean value) { + addCriterion("guide_step >", value, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideStepGreaterThanOrEqualTo(Boolean value) { + addCriterion("guide_step >=", value, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideStepLessThan(Boolean value) { + addCriterion("guide_step <", value, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideStepLessThanOrEqualTo(Boolean value) { + addCriterion("guide_step <=", value, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideStepIn(List values) { + addCriterion("guide_step in", values, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideStepNotIn(List values) { + addCriterion("guide_step not in", values, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideStepBetween(Boolean value1, Boolean value2) { + addCriterion("guide_step between", value1, value2, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideStepNotBetween(Boolean value1, Boolean value2) { + addCriterion("guide_step not between", value1, value2, "guideStep"); + return (Criteria) this; + } + + public Criteria andGuideNumIsNull() { + addCriterion("guide_num is null"); + return (Criteria) this; + } + + public Criteria andGuideNumIsNotNull() { + addCriterion("guide_num is not null"); + return (Criteria) this; + } + + public Criteria andGuideNumEqualTo(Integer value) { + addCriterion("guide_num =", value, "guideNum"); + return (Criteria) this; + } + + public Criteria andGuideNumNotEqualTo(Integer value) { + addCriterion("guide_num <>", value, "guideNum"); + return (Criteria) this; + } + + public Criteria andGuideNumGreaterThan(Integer value) { + addCriterion("guide_num >", value, "guideNum"); + return (Criteria) this; + } + + public Criteria andGuideNumGreaterThanOrEqualTo(Integer value) { + addCriterion("guide_num >=", value, "guideNum"); + return (Criteria) this; + } + + public Criteria andGuideNumLessThan(Integer value) { + addCriterion("guide_num <", value, "guideNum"); + return (Criteria) this; + } + + public Criteria andGuideNumLessThanOrEqualTo(Integer value) { + addCriterion("guide_num <=", value, "guideNum"); + return (Criteria) this; + } + + public Criteria andGuideNumIn(List values) { + addCriterion("guide_num in", values, "guideNum"); + return (Criteria) this; + } + + public Criteria andGuideNumNotIn(List values) { + addCriterion("guide_num not in", values, "guideNum"); + return (Criteria) this; + } + + public Criteria andGuideNumBetween(Integer value1, Integer value2) { + addCriterion("guide_num between", value1, value2, "guideNum"); + return (Criteria) this; + } + + public Criteria andGuideNumNotBetween(Integer value1, Integer value2) { + addCriterion("guide_num not between", value1, value2, "guideNum"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 aba3de215c..bfeeffc259 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,76 +1,59 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "操作日志") -@Table("operating_log") @Data public class OperatingLog implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{operating_log.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{operating_log.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{operating_log.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{operating_log.project_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{operating_log.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{operating_log.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues = "range[1, 50]") private String projectId; - - @ApiModelProperty(name = "operating method", required = false, allowableValues = "range[1, 500]") + @Schema(title = "operating method") private String operMethod; - - @ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]") + @Schema(title = "创建人") private String createUser; - - @ApiModelProperty(name = "操作人", required = false, allowableValues = "range[1, 50]") + @Schema(title = "操作人") private String operUser; - - @ApiModelProperty(name = "资源ID", required = false, allowableValues = "range[1, 6000]") + @Schema(title = "资源ID") private String sourceId; - - @ApiModelProperty(name = "操作类型", required = false, allowableValues = "range[1, 100]") + @Schema(title = "操作类型") private String operType; - - @ApiModelProperty(name = "操作模块", required = false, allowableValues = "range[1, 100]") + @Schema(title = "操作模块") private String operModule; - - @ApiModelProperty(name = "操作标题", required = false, allowableValues = "range[1, 6000]") + @Schema(title = "操作标题") private String operTitle; - - @ApiModelProperty(name = "操作路径", required = false, allowableValues = "range[1, 500]") + @Schema(title = "操作路径") private String operPath; - - @ApiModelProperty(name = "操作内容", required = false, allowableValues = "range[1, ]") - private byte[] operContent; - - - @ApiModelProperty(name = "操作参数", required = false, allowableValues = "range[1, ]") - private byte[] operParams; - - - @ApiModelProperty(name = "操作时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "操作时间", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 19]") + @NotBlank(message = "{operating_log.oper_time.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 19, message = "{operating_log.oper_time.length_range}", groups = {Created.class, Updated.class}) private Long operTime; + @Schema(title = "操作内容") + private byte[] operContent; + @Schema(title = "操作参数") + private byte[] operParams; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogExample.java new file mode 100644 index 0000000000..debd54ed83 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogExample.java @@ -0,0 +1,960 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class OperatingLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public OperatingLogExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andOperMethodIsNull() { + addCriterion("oper_method is null"); + return (Criteria) this; + } + + public Criteria andOperMethodIsNotNull() { + addCriterion("oper_method is not null"); + return (Criteria) this; + } + + public Criteria andOperMethodEqualTo(String value) { + addCriterion("oper_method =", value, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodNotEqualTo(String value) { + addCriterion("oper_method <>", value, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodGreaterThan(String value) { + addCriterion("oper_method >", value, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodGreaterThanOrEqualTo(String value) { + addCriterion("oper_method >=", value, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodLessThan(String value) { + addCriterion("oper_method <", value, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodLessThanOrEqualTo(String value) { + addCriterion("oper_method <=", value, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodLike(String value) { + addCriterion("oper_method like", value, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodNotLike(String value) { + addCriterion("oper_method not like", value, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodIn(List values) { + addCriterion("oper_method in", values, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodNotIn(List values) { + addCriterion("oper_method not in", values, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodBetween(String value1, String value2) { + addCriterion("oper_method between", value1, value2, "operMethod"); + return (Criteria) this; + } + + public Criteria andOperMethodNotBetween(String value1, String value2) { + addCriterion("oper_method not between", value1, value2, "operMethod"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andOperUserIsNull() { + addCriterion("oper_user is null"); + return (Criteria) this; + } + + public Criteria andOperUserIsNotNull() { + addCriterion("oper_user is not null"); + return (Criteria) this; + } + + public Criteria andOperUserEqualTo(String value) { + addCriterion("oper_user =", value, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserNotEqualTo(String value) { + addCriterion("oper_user <>", value, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserGreaterThan(String value) { + addCriterion("oper_user >", value, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserGreaterThanOrEqualTo(String value) { + addCriterion("oper_user >=", value, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserLessThan(String value) { + addCriterion("oper_user <", value, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserLessThanOrEqualTo(String value) { + addCriterion("oper_user <=", value, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserLike(String value) { + addCriterion("oper_user like", value, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserNotLike(String value) { + addCriterion("oper_user not like", value, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserIn(List values) { + addCriterion("oper_user in", values, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserNotIn(List values) { + addCriterion("oper_user not in", values, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserBetween(String value1, String value2) { + addCriterion("oper_user between", value1, value2, "operUser"); + return (Criteria) this; + } + + public Criteria andOperUserNotBetween(String value1, String value2) { + addCriterion("oper_user not between", value1, value2, "operUser"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNull() { + addCriterion("source_id is null"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNotNull() { + addCriterion("source_id is not null"); + return (Criteria) this; + } + + public Criteria andSourceIdEqualTo(String value) { + addCriterion("source_id =", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotEqualTo(String value) { + addCriterion("source_id <>", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThan(String value) { + addCriterion("source_id >", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThanOrEqualTo(String value) { + addCriterion("source_id >=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThan(String value) { + addCriterion("source_id <", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThanOrEqualTo(String value) { + addCriterion("source_id <=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLike(String value) { + addCriterion("source_id like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotLike(String value) { + addCriterion("source_id not like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdIn(List values) { + addCriterion("source_id in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotIn(List values) { + addCriterion("source_id not in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdBetween(String value1, String value2) { + addCriterion("source_id between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotBetween(String value1, String value2) { + addCriterion("source_id not between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andOperTypeIsNull() { + addCriterion("oper_type is null"); + return (Criteria) this; + } + + public Criteria andOperTypeIsNotNull() { + addCriterion("oper_type is not null"); + return (Criteria) this; + } + + public Criteria andOperTypeEqualTo(String value) { + addCriterion("oper_type =", value, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeNotEqualTo(String value) { + addCriterion("oper_type <>", value, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeGreaterThan(String value) { + addCriterion("oper_type >", value, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeGreaterThanOrEqualTo(String value) { + addCriterion("oper_type >=", value, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeLessThan(String value) { + addCriterion("oper_type <", value, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeLessThanOrEqualTo(String value) { + addCriterion("oper_type <=", value, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeLike(String value) { + addCriterion("oper_type like", value, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeNotLike(String value) { + addCriterion("oper_type not like", value, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeIn(List values) { + addCriterion("oper_type in", values, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeNotIn(List values) { + addCriterion("oper_type not in", values, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeBetween(String value1, String value2) { + addCriterion("oper_type between", value1, value2, "operType"); + return (Criteria) this; + } + + public Criteria andOperTypeNotBetween(String value1, String value2) { + addCriterion("oper_type not between", value1, value2, "operType"); + return (Criteria) this; + } + + public Criteria andOperModuleIsNull() { + addCriterion("oper_module is null"); + return (Criteria) this; + } + + public Criteria andOperModuleIsNotNull() { + addCriterion("oper_module is not null"); + return (Criteria) this; + } + + public Criteria andOperModuleEqualTo(String value) { + addCriterion("oper_module =", value, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleNotEqualTo(String value) { + addCriterion("oper_module <>", value, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleGreaterThan(String value) { + addCriterion("oper_module >", value, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleGreaterThanOrEqualTo(String value) { + addCriterion("oper_module >=", value, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleLessThan(String value) { + addCriterion("oper_module <", value, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleLessThanOrEqualTo(String value) { + addCriterion("oper_module <=", value, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleLike(String value) { + addCriterion("oper_module like", value, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleNotLike(String value) { + addCriterion("oper_module not like", value, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleIn(List values) { + addCriterion("oper_module in", values, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleNotIn(List values) { + addCriterion("oper_module not in", values, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleBetween(String value1, String value2) { + addCriterion("oper_module between", value1, value2, "operModule"); + return (Criteria) this; + } + + public Criteria andOperModuleNotBetween(String value1, String value2) { + addCriterion("oper_module not between", value1, value2, "operModule"); + return (Criteria) this; + } + + public Criteria andOperTitleIsNull() { + addCriterion("oper_title is null"); + return (Criteria) this; + } + + public Criteria andOperTitleIsNotNull() { + addCriterion("oper_title is not null"); + return (Criteria) this; + } + + public Criteria andOperTitleEqualTo(String value) { + addCriterion("oper_title =", value, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleNotEqualTo(String value) { + addCriterion("oper_title <>", value, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleGreaterThan(String value) { + addCriterion("oper_title >", value, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleGreaterThanOrEqualTo(String value) { + addCriterion("oper_title >=", value, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleLessThan(String value) { + addCriterion("oper_title <", value, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleLessThanOrEqualTo(String value) { + addCriterion("oper_title <=", value, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleLike(String value) { + addCriterion("oper_title like", value, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleNotLike(String value) { + addCriterion("oper_title not like", value, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleIn(List values) { + addCriterion("oper_title in", values, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleNotIn(List values) { + addCriterion("oper_title not in", values, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleBetween(String value1, String value2) { + addCriterion("oper_title between", value1, value2, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperTitleNotBetween(String value1, String value2) { + addCriterion("oper_title not between", value1, value2, "operTitle"); + return (Criteria) this; + } + + public Criteria andOperPathIsNull() { + addCriterion("oper_path is null"); + return (Criteria) this; + } + + public Criteria andOperPathIsNotNull() { + addCriterion("oper_path is not null"); + return (Criteria) this; + } + + public Criteria andOperPathEqualTo(String value) { + addCriterion("oper_path =", value, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathNotEqualTo(String value) { + addCriterion("oper_path <>", value, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathGreaterThan(String value) { + addCriterion("oper_path >", value, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathGreaterThanOrEqualTo(String value) { + addCriterion("oper_path >=", value, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathLessThan(String value) { + addCriterion("oper_path <", value, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathLessThanOrEqualTo(String value) { + addCriterion("oper_path <=", value, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathLike(String value) { + addCriterion("oper_path like", value, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathNotLike(String value) { + addCriterion("oper_path not like", value, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathIn(List values) { + addCriterion("oper_path in", values, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathNotIn(List values) { + addCriterion("oper_path not in", values, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathBetween(String value1, String value2) { + addCriterion("oper_path between", value1, value2, "operPath"); + return (Criteria) this; + } + + public Criteria andOperPathNotBetween(String value1, String value2) { + addCriterion("oper_path not between", value1, value2, "operPath"); + return (Criteria) this; + } + + public Criteria andOperTimeIsNull() { + addCriterion("oper_time is null"); + return (Criteria) this; + } + + public Criteria andOperTimeIsNotNull() { + addCriterion("oper_time is not null"); + return (Criteria) this; + } + + public Criteria andOperTimeEqualTo(Long value) { + addCriterion("oper_time =", value, "operTime"); + return (Criteria) this; + } + + public Criteria andOperTimeNotEqualTo(Long value) { + addCriterion("oper_time <>", value, "operTime"); + return (Criteria) this; + } + + public Criteria andOperTimeGreaterThan(Long value) { + addCriterion("oper_time >", value, "operTime"); + return (Criteria) this; + } + + public Criteria andOperTimeGreaterThanOrEqualTo(Long value) { + addCriterion("oper_time >=", value, "operTime"); + return (Criteria) this; + } + + public Criteria andOperTimeLessThan(Long value) { + addCriterion("oper_time <", value, "operTime"); + return (Criteria) this; + } + + public Criteria andOperTimeLessThanOrEqualTo(Long value) { + addCriterion("oper_time <=", value, "operTime"); + return (Criteria) this; + } + + public Criteria andOperTimeIn(List values) { + addCriterion("oper_time in", values, "operTime"); + return (Criteria) this; + } + + public Criteria andOperTimeNotIn(List values) { + addCriterion("oper_time not in", values, "operTime"); + return (Criteria) this; + } + + public Criteria andOperTimeBetween(Long value1, Long value2) { + addCriterion("oper_time between", value1, value2, "operTime"); + return (Criteria) this; + } + + public Criteria andOperTimeNotBetween(Long value1, Long value2) { + addCriterion("oper_time not between", value1, value2, "operTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 ac5b37da5b..3d2c06aa58 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,36 +1,29 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; -import lombok.Data; import java.io.Serializable; +import lombok.Data; -@ApiModel(value = "操作日志关系记录") -@Table("operating_log_resource") @Data public class OperatingLogResource implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{operating_log_resource.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{operating_log_resource.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{operating_log_resource.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @Size(min = 1, max = 50, message = "{operating_log_resource.operating_log_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{operating_log_resource.operating_log_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Operating log ID", required = true, allowableValues="range[1, 50]") - private String operatingLogId; - - @Size(min = 1, max = 50, message = "{operating_log_resource.source_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{operating_log_resource.source_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "operating source id", required = true, allowableValues="range[1, 50]") - private String sourceId; - + @Schema(title = "Operating log ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{operating_log_resource.operating_log_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{operating_log_resource.operating_log_id.length_range}", groups = {Created.class, Updated.class}) + private String operatingLogId; + + @Schema(title = "operating source id", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{operating_log_resource.source_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{operating_log_resource.source_id.length_range}", groups = {Created.class, Updated.class}) + private String sourceId; + + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResourceExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResourceExample.java new file mode 100644 index 0000000000..7f5a96f4f4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OperatingLogResourceExample.java @@ -0,0 +1,410 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class OperatingLogResourceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public OperatingLogResourceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdIsNull() { + addCriterion("operating_log_id is null"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdIsNotNull() { + addCriterion("operating_log_id is not null"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdEqualTo(String value) { + addCriterion("operating_log_id =", value, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdNotEqualTo(String value) { + addCriterion("operating_log_id <>", value, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdGreaterThan(String value) { + addCriterion("operating_log_id >", value, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdGreaterThanOrEqualTo(String value) { + addCriterion("operating_log_id >=", value, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdLessThan(String value) { + addCriterion("operating_log_id <", value, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdLessThanOrEqualTo(String value) { + addCriterion("operating_log_id <=", value, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdLike(String value) { + addCriterion("operating_log_id like", value, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdNotLike(String value) { + addCriterion("operating_log_id not like", value, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdIn(List values) { + addCriterion("operating_log_id in", values, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdNotIn(List values) { + addCriterion("operating_log_id not in", values, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdBetween(String value1, String value2) { + addCriterion("operating_log_id between", value1, value2, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andOperatingLogIdNotBetween(String value1, String value2) { + addCriterion("operating_log_id not between", value1, value2, "operatingLogId"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNull() { + addCriterion("source_id is null"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNotNull() { + addCriterion("source_id is not null"); + return (Criteria) this; + } + + public Criteria andSourceIdEqualTo(String value) { + addCriterion("source_id =", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotEqualTo(String value) { + addCriterion("source_id <>", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThan(String value) { + addCriterion("source_id >", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThanOrEqualTo(String value) { + addCriterion("source_id >=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThan(String value) { + addCriterion("source_id <", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThanOrEqualTo(String value) { + addCriterion("source_id <=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLike(String value) { + addCriterion("source_id like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotLike(String value) { + addCriterion("source_id not like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdIn(List values) { + addCriterion("source_id in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotIn(List values) { + addCriterion("source_id not in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdBetween(String value1, String value2) { + addCriterion("source_id between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotBetween(String value1, String value2) { + addCriterion("source_id not between", value1, value2, "sourceId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 9f3174c968..9b04331105 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,86 +1,72 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "插件") -@Table("plugin") @Data public class Plugin implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{plugin.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{plugin.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{plugin.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "plugin name", required = false, allowableValues = "range[1, 300]") + @Schema(title = "plugin name") private String name; + @Schema(title = "Plugin id", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 300]") + @NotBlank(message = "{plugin.plugin_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 300, message = "{plugin.plugin_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{plugin.plugin_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Plugin id", required = true, allowableValues = "range[1, 300]") private String pluginId; + @Schema(title = "Ui script id", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 300]") + @NotBlank(message = "{plugin.script_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 300, message = "{plugin.script_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{plugin.script_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Ui script id", required = true, allowableValues = "range[1, 300]") private String scriptId; + @Schema(title = "Plugin clazzName", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 500]") + @NotBlank(message = "{plugin.clazz_name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 500, message = "{plugin.clazz_name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{plugin.clazz_name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Plugin clazzName", required = true, allowableValues = "range[1, 500]") private String clazzName; + @Schema(title = "Jmeter base clazzName", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 300]") + @NotBlank(message = "{plugin.jmeter_clazz.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 300, message = "{plugin.jmeter_clazz.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{plugin.jmeter_clazz.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Jmeter base clazzName", required = true, allowableValues = "range[1, 300]") private String jmeterClazz; + @Schema(title = "Plugin jar path", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 300]") + @NotBlank(message = "{plugin.source_path.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 300, message = "{plugin.source_path.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{plugin.source_path.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Plugin jar path", required = true, allowableValues = "range[1, 300]") private String sourcePath; + @Schema(title = "Plugin jar name", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 300]") + @NotBlank(message = "{plugin.source_name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 300, message = "{plugin.source_name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{plugin.source_name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Plugin jar name", required = true, allowableValues = "range[1, 300]") private String sourceName; - - @ApiModelProperty(name = "plugin init entry class", required = false, allowableValues = "range[1, 300]") + @Schema(title = "plugin init entry class") private String execEntry; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]") + @Schema(title = "") private Long createTime; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, ]") + @Schema(title = "") private Long updateTime; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]") + @Schema(title = "") private String createUser; - - @ApiModelProperty(name = "Is xpack plugin", required = false, allowableValues = "range[1, 1]") + @Schema(title = "Is xpack plugin") private Boolean xpack; + @Schema(title = "Plugin usage scenarios", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{plugin.scenario.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{plugin.scenario.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{plugin.scenario.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Plugin usage scenarios", required = true, allowableValues = "range[1, 50]") private String scenario; - + private static final long serialVersionUID = 1L; } \ No newline at end of file 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 6aa24eeaba..1673fef8c8 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,35 +1,25 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "插件大字段") -@Table("plugin_blob") @Data public class PluginBlob implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{plugin_blob.plugin_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{plugin_blob.plugin_id.length_range}", groups = {Created.class, Updated.class}) + private String pluginId; - @Id - @NotBlank(message = "{plugin_blob.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues = "range[1, 50]") - private String id; - - - @ApiModelProperty(name = "plugin form option", required = false, allowableValues = "range[1, ]") + @Schema(title = "plugin form option") private byte[] formOption; - - @ApiModelProperty(name = "plugin form script", required = false, allowableValues = "range[1, ]") + @Schema(title = "plugin form script") private byte[] formScript; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlobExample.java new file mode 100644 index 0000000000..12dc372be1 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginBlobExample.java @@ -0,0 +1,270 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class PluginBlobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public PluginBlobExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andPluginIdIsNull() { + addCriterion("plugin_id is null"); + return (Criteria) this; + } + + public Criteria andPluginIdIsNotNull() { + addCriterion("plugin_id is not null"); + return (Criteria) this; + } + + public Criteria andPluginIdEqualTo(String value) { + addCriterion("plugin_id =", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotEqualTo(String value) { + addCriterion("plugin_id <>", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdGreaterThan(String value) { + addCriterion("plugin_id >", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdGreaterThanOrEqualTo(String value) { + addCriterion("plugin_id >=", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLessThan(String value) { + addCriterion("plugin_id <", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLessThanOrEqualTo(String value) { + addCriterion("plugin_id <=", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLike(String value) { + addCriterion("plugin_id like", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotLike(String value) { + addCriterion("plugin_id not like", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdIn(List values) { + addCriterion("plugin_id in", values, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotIn(List values) { + addCriterion("plugin_id not in", values, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdBetween(String value1, String value2) { + addCriterion("plugin_id between", value1, value2, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotBetween(String value1, String value2) { + addCriterion("plugin_id not between", value1, value2, "pluginId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginExample.java new file mode 100644 index 0000000000..daafaf99e1 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/PluginExample.java @@ -0,0 +1,1150 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class PluginExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public PluginExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andPluginIdIsNull() { + addCriterion("plugin_id is null"); + return (Criteria) this; + } + + public Criteria andPluginIdIsNotNull() { + addCriterion("plugin_id is not null"); + return (Criteria) this; + } + + public Criteria andPluginIdEqualTo(String value) { + addCriterion("plugin_id =", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotEqualTo(String value) { + addCriterion("plugin_id <>", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdGreaterThan(String value) { + addCriterion("plugin_id >", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdGreaterThanOrEqualTo(String value) { + addCriterion("plugin_id >=", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLessThan(String value) { + addCriterion("plugin_id <", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLessThanOrEqualTo(String value) { + addCriterion("plugin_id <=", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdLike(String value) { + addCriterion("plugin_id like", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotLike(String value) { + addCriterion("plugin_id not like", value, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdIn(List values) { + addCriterion("plugin_id in", values, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotIn(List values) { + addCriterion("plugin_id not in", values, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdBetween(String value1, String value2) { + addCriterion("plugin_id between", value1, value2, "pluginId"); + return (Criteria) this; + } + + public Criteria andPluginIdNotBetween(String value1, String value2) { + addCriterion("plugin_id not between", value1, value2, "pluginId"); + return (Criteria) this; + } + + public Criteria andScriptIdIsNull() { + addCriterion("script_id is null"); + return (Criteria) this; + } + + public Criteria andScriptIdIsNotNull() { + addCriterion("script_id is not null"); + return (Criteria) this; + } + + public Criteria andScriptIdEqualTo(String value) { + addCriterion("script_id =", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdNotEqualTo(String value) { + addCriterion("script_id <>", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdGreaterThan(String value) { + addCriterion("script_id >", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdGreaterThanOrEqualTo(String value) { + addCriterion("script_id >=", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdLessThan(String value) { + addCriterion("script_id <", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdLessThanOrEqualTo(String value) { + addCriterion("script_id <=", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdLike(String value) { + addCriterion("script_id like", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdNotLike(String value) { + addCriterion("script_id not like", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdIn(List values) { + addCriterion("script_id in", values, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdNotIn(List values) { + addCriterion("script_id not in", values, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdBetween(String value1, String value2) { + addCriterion("script_id between", value1, value2, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdNotBetween(String value1, String value2) { + addCriterion("script_id not between", value1, value2, "scriptId"); + return (Criteria) this; + } + + public Criteria andClazzNameIsNull() { + addCriterion("clazz_name is null"); + return (Criteria) this; + } + + public Criteria andClazzNameIsNotNull() { + addCriterion("clazz_name is not null"); + return (Criteria) this; + } + + public Criteria andClazzNameEqualTo(String value) { + addCriterion("clazz_name =", value, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameNotEqualTo(String value) { + addCriterion("clazz_name <>", value, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameGreaterThan(String value) { + addCriterion("clazz_name >", value, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameGreaterThanOrEqualTo(String value) { + addCriterion("clazz_name >=", value, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameLessThan(String value) { + addCriterion("clazz_name <", value, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameLessThanOrEqualTo(String value) { + addCriterion("clazz_name <=", value, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameLike(String value) { + addCriterion("clazz_name like", value, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameNotLike(String value) { + addCriterion("clazz_name not like", value, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameIn(List values) { + addCriterion("clazz_name in", values, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameNotIn(List values) { + addCriterion("clazz_name not in", values, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameBetween(String value1, String value2) { + addCriterion("clazz_name between", value1, value2, "clazzName"); + return (Criteria) this; + } + + public Criteria andClazzNameNotBetween(String value1, String value2) { + addCriterion("clazz_name not between", value1, value2, "clazzName"); + return (Criteria) this; + } + + public Criteria andJmeterClazzIsNull() { + addCriterion("jmeter_clazz is null"); + return (Criteria) this; + } + + public Criteria andJmeterClazzIsNotNull() { + addCriterion("jmeter_clazz is not null"); + return (Criteria) this; + } + + public Criteria andJmeterClazzEqualTo(String value) { + addCriterion("jmeter_clazz =", value, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzNotEqualTo(String value) { + addCriterion("jmeter_clazz <>", value, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzGreaterThan(String value) { + addCriterion("jmeter_clazz >", value, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzGreaterThanOrEqualTo(String value) { + addCriterion("jmeter_clazz >=", value, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzLessThan(String value) { + addCriterion("jmeter_clazz <", value, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzLessThanOrEqualTo(String value) { + addCriterion("jmeter_clazz <=", value, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzLike(String value) { + addCriterion("jmeter_clazz like", value, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzNotLike(String value) { + addCriterion("jmeter_clazz not like", value, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzIn(List values) { + addCriterion("jmeter_clazz in", values, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzNotIn(List values) { + addCriterion("jmeter_clazz not in", values, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzBetween(String value1, String value2) { + addCriterion("jmeter_clazz between", value1, value2, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andJmeterClazzNotBetween(String value1, String value2) { + addCriterion("jmeter_clazz not between", value1, value2, "jmeterClazz"); + return (Criteria) this; + } + + public Criteria andSourcePathIsNull() { + addCriterion("source_path is null"); + return (Criteria) this; + } + + public Criteria andSourcePathIsNotNull() { + addCriterion("source_path is not null"); + return (Criteria) this; + } + + public Criteria andSourcePathEqualTo(String value) { + addCriterion("source_path =", value, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathNotEqualTo(String value) { + addCriterion("source_path <>", value, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathGreaterThan(String value) { + addCriterion("source_path >", value, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathGreaterThanOrEqualTo(String value) { + addCriterion("source_path >=", value, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathLessThan(String value) { + addCriterion("source_path <", value, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathLessThanOrEqualTo(String value) { + addCriterion("source_path <=", value, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathLike(String value) { + addCriterion("source_path like", value, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathNotLike(String value) { + addCriterion("source_path not like", value, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathIn(List values) { + addCriterion("source_path in", values, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathNotIn(List values) { + addCriterion("source_path not in", values, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathBetween(String value1, String value2) { + addCriterion("source_path between", value1, value2, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourcePathNotBetween(String value1, String value2) { + addCriterion("source_path not between", value1, value2, "sourcePath"); + return (Criteria) this; + } + + public Criteria andSourceNameIsNull() { + addCriterion("source_name is null"); + return (Criteria) this; + } + + public Criteria andSourceNameIsNotNull() { + addCriterion("source_name is not null"); + return (Criteria) this; + } + + public Criteria andSourceNameEqualTo(String value) { + addCriterion("source_name =", value, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameNotEqualTo(String value) { + addCriterion("source_name <>", value, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameGreaterThan(String value) { + addCriterion("source_name >", value, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameGreaterThanOrEqualTo(String value) { + addCriterion("source_name >=", value, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameLessThan(String value) { + addCriterion("source_name <", value, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameLessThanOrEqualTo(String value) { + addCriterion("source_name <=", value, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameLike(String value) { + addCriterion("source_name like", value, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameNotLike(String value) { + addCriterion("source_name not like", value, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameIn(List values) { + addCriterion("source_name in", values, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameNotIn(List values) { + addCriterion("source_name not in", values, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameBetween(String value1, String value2) { + addCriterion("source_name between", value1, value2, "sourceName"); + return (Criteria) this; + } + + public Criteria andSourceNameNotBetween(String value1, String value2) { + addCriterion("source_name not between", value1, value2, "sourceName"); + return (Criteria) this; + } + + public Criteria andExecEntryIsNull() { + addCriterion("exec_entry is null"); + return (Criteria) this; + } + + public Criteria andExecEntryIsNotNull() { + addCriterion("exec_entry is not null"); + return (Criteria) this; + } + + public Criteria andExecEntryEqualTo(String value) { + addCriterion("exec_entry =", value, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryNotEqualTo(String value) { + addCriterion("exec_entry <>", value, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryGreaterThan(String value) { + addCriterion("exec_entry >", value, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryGreaterThanOrEqualTo(String value) { + addCriterion("exec_entry >=", value, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryLessThan(String value) { + addCriterion("exec_entry <", value, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryLessThanOrEqualTo(String value) { + addCriterion("exec_entry <=", value, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryLike(String value) { + addCriterion("exec_entry like", value, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryNotLike(String value) { + addCriterion("exec_entry not like", value, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryIn(List values) { + addCriterion("exec_entry in", values, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryNotIn(List values) { + addCriterion("exec_entry not in", values, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryBetween(String value1, String value2) { + addCriterion("exec_entry between", value1, value2, "execEntry"); + return (Criteria) this; + } + + public Criteria andExecEntryNotBetween(String value1, String value2) { + addCriterion("exec_entry not between", value1, value2, "execEntry"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andXpackIsNull() { + addCriterion("xpack is null"); + return (Criteria) this; + } + + public Criteria andXpackIsNotNull() { + addCriterion("xpack is not null"); + return (Criteria) this; + } + + public Criteria andXpackEqualTo(Boolean value) { + addCriterion("xpack =", value, "xpack"); + return (Criteria) this; + } + + public Criteria andXpackNotEqualTo(Boolean value) { + addCriterion("xpack <>", value, "xpack"); + return (Criteria) this; + } + + public Criteria andXpackGreaterThan(Boolean value) { + addCriterion("xpack >", value, "xpack"); + return (Criteria) this; + } + + public Criteria andXpackGreaterThanOrEqualTo(Boolean value) { + addCriterion("xpack >=", value, "xpack"); + return (Criteria) this; + } + + public Criteria andXpackLessThan(Boolean value) { + addCriterion("xpack <", value, "xpack"); + return (Criteria) this; + } + + public Criteria andXpackLessThanOrEqualTo(Boolean value) { + addCriterion("xpack <=", value, "xpack"); + return (Criteria) this; + } + + public Criteria andXpackIn(List values) { + addCriterion("xpack in", values, "xpack"); + return (Criteria) this; + } + + public Criteria andXpackNotIn(List values) { + addCriterion("xpack not in", values, "xpack"); + return (Criteria) this; + } + + public Criteria andXpackBetween(Boolean value1, Boolean value2) { + addCriterion("xpack between", value1, value2, "xpack"); + return (Criteria) this; + } + + public Criteria andXpackNotBetween(Boolean value1, Boolean value2) { + addCriterion("xpack not between", value1, value2, "xpack"); + return (Criteria) this; + } + + public Criteria andScenarioIsNull() { + addCriterion("scenario is null"); + return (Criteria) this; + } + + public Criteria andScenarioIsNotNull() { + addCriterion("scenario is not null"); + return (Criteria) this; + } + + public Criteria andScenarioEqualTo(String value) { + addCriterion("scenario =", value, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioNotEqualTo(String value) { + addCriterion("scenario <>", value, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioGreaterThan(String value) { + addCriterion("scenario >", value, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioGreaterThanOrEqualTo(String value) { + addCriterion("scenario >=", value, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioLessThan(String value) { + addCriterion("scenario <", value, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioLessThanOrEqualTo(String value) { + addCriterion("scenario <=", value, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioLike(String value) { + addCriterion("scenario like", value, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioNotLike(String value) { + addCriterion("scenario not like", value, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioIn(List values) { + addCriterion("scenario in", values, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioNotIn(List values) { + addCriterion("scenario not in", values, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioBetween(String value1, String value2) { + addCriterion("scenario between", value1, value2, "scenario"); + return (Criteria) this; + } + + public Criteria andScenarioNotBetween(String value1, String value2) { + addCriterion("scenario not between", value1, value2, "scenario"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 52d7b45ce3..97de394cb6 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,79 +1,59 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; +import java.math.BigDecimal; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "配额") -@Table("quota") @Data public class Quota implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{quota.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{quota.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{quota.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "接口数量", required = false, allowableValues = "range[1, ]") + @Schema(title = "接口数量") private Integer api; - - @ApiModelProperty(name = "性能测试数量", required = false, allowableValues = "range[1, ]") + @Schema(title = "性能测试数量") private Integer performance; - - @ApiModelProperty(name = "最大并发数", required = false, allowableValues = "range[1, ]") + @Schema(title = "最大并发数") private Integer maxThreads; - - @ApiModelProperty(name = "最大执行时长", required = false, allowableValues = "range[1, ]") + @Schema(title = "最大执行时长") private Integer duration; - - @ApiModelProperty(name = "资源池列表", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "资源池列表") private String resourcePool; - - @ApiModelProperty(name = "工作空间ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "工作空间ID") private String workspaceId; - - @ApiModelProperty(name = "是否使用默认值", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否使用默认值") private Boolean useDefault; - - @ApiModelProperty(name = "更新时间", required = false, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - - @ApiModelProperty(name = "成员数量限制", required = false, allowableValues = "range[1, ]") + @Schema(title = "成员数量限制") private Integer member; - - @ApiModelProperty(name = "项目数量限制", required = false, allowableValues = "range[1, ]") + @Schema(title = "项目数量限制") private Integer project; - - @ApiModelProperty(name = "项目类型配额", required = false, allowableValues = "range[1, 50]") + @Schema(title = "项目类型配额") private String projectId; + @Schema(title = "总vum数") + private BigDecimal vumTotal; - @ApiModelProperty(name = "总vum数", required = false, allowableValues = "range[1, 10]") - private Double vumTotal; - - - @ApiModelProperty(name = "消耗的vum数", required = false, allowableValues = "range[1, 10]") - private Double vumUsed; - + @Schema(title = "消耗的vum数") + private BigDecimal vumUsed; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/QuotaExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/QuotaExample.java new file mode 100644 index 0000000000..13e2673567 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/QuotaExample.java @@ -0,0 +1,1081 @@ +package io.metersphere.system.domain; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +public class QuotaExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public QuotaExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andApiIsNull() { + addCriterion("api is null"); + return (Criteria) this; + } + + public Criteria andApiIsNotNull() { + addCriterion("api is not null"); + return (Criteria) this; + } + + public Criteria andApiEqualTo(Integer value) { + addCriterion("api =", value, "api"); + return (Criteria) this; + } + + public Criteria andApiNotEqualTo(Integer value) { + addCriterion("api <>", value, "api"); + return (Criteria) this; + } + + public Criteria andApiGreaterThan(Integer value) { + addCriterion("api >", value, "api"); + return (Criteria) this; + } + + public Criteria andApiGreaterThanOrEqualTo(Integer value) { + addCriterion("api >=", value, "api"); + return (Criteria) this; + } + + public Criteria andApiLessThan(Integer value) { + addCriterion("api <", value, "api"); + return (Criteria) this; + } + + public Criteria andApiLessThanOrEqualTo(Integer value) { + addCriterion("api <=", value, "api"); + return (Criteria) this; + } + + public Criteria andApiIn(List values) { + addCriterion("api in", values, "api"); + return (Criteria) this; + } + + public Criteria andApiNotIn(List values) { + addCriterion("api not in", values, "api"); + return (Criteria) this; + } + + public Criteria andApiBetween(Integer value1, Integer value2) { + addCriterion("api between", value1, value2, "api"); + return (Criteria) this; + } + + public Criteria andApiNotBetween(Integer value1, Integer value2) { + addCriterion("api not between", value1, value2, "api"); + return (Criteria) this; + } + + public Criteria andPerformanceIsNull() { + addCriterion("performance is null"); + return (Criteria) this; + } + + public Criteria andPerformanceIsNotNull() { + addCriterion("performance is not null"); + return (Criteria) this; + } + + public Criteria andPerformanceEqualTo(Integer value) { + addCriterion("performance =", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceNotEqualTo(Integer value) { + addCriterion("performance <>", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceGreaterThan(Integer value) { + addCriterion("performance >", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceGreaterThanOrEqualTo(Integer value) { + addCriterion("performance >=", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceLessThan(Integer value) { + addCriterion("performance <", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceLessThanOrEqualTo(Integer value) { + addCriterion("performance <=", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceIn(List values) { + addCriterion("performance in", values, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceNotIn(List values) { + addCriterion("performance not in", values, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceBetween(Integer value1, Integer value2) { + addCriterion("performance between", value1, value2, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceNotBetween(Integer value1, Integer value2) { + addCriterion("performance not between", value1, value2, "performance"); + return (Criteria) this; + } + + public Criteria andMaxThreadsIsNull() { + addCriterion("max_threads is null"); + return (Criteria) this; + } + + public Criteria andMaxThreadsIsNotNull() { + addCriterion("max_threads is not null"); + return (Criteria) this; + } + + public Criteria andMaxThreadsEqualTo(Integer value) { + addCriterion("max_threads =", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsNotEqualTo(Integer value) { + addCriterion("max_threads <>", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsGreaterThan(Integer value) { + addCriterion("max_threads >", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsGreaterThanOrEqualTo(Integer value) { + addCriterion("max_threads >=", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsLessThan(Integer value) { + addCriterion("max_threads <", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsLessThanOrEqualTo(Integer value) { + addCriterion("max_threads <=", value, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsIn(List values) { + addCriterion("max_threads in", values, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsNotIn(List values) { + addCriterion("max_threads not in", values, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsBetween(Integer value1, Integer value2) { + addCriterion("max_threads between", value1, value2, "maxThreads"); + return (Criteria) this; + } + + public Criteria andMaxThreadsNotBetween(Integer value1, Integer value2) { + addCriterion("max_threads not between", value1, value2, "maxThreads"); + return (Criteria) this; + } + + public Criteria andDurationIsNull() { + addCriterion("duration is null"); + return (Criteria) this; + } + + public Criteria andDurationIsNotNull() { + addCriterion("duration is not null"); + return (Criteria) this; + } + + public Criteria andDurationEqualTo(Integer value) { + addCriterion("duration =", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotEqualTo(Integer value) { + addCriterion("duration <>", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThan(Integer value) { + addCriterion("duration >", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("duration >=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThan(Integer value) { + addCriterion("duration <", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThanOrEqualTo(Integer value) { + addCriterion("duration <=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationIn(List values) { + addCriterion("duration in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotIn(List values) { + addCriterion("duration not in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationBetween(Integer value1, Integer value2) { + addCriterion("duration between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotBetween(Integer value1, Integer value2) { + addCriterion("duration not between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andResourcePoolIsNull() { + addCriterion("resource_pool is null"); + return (Criteria) this; + } + + public Criteria andResourcePoolIsNotNull() { + addCriterion("resource_pool is not null"); + return (Criteria) this; + } + + public Criteria andResourcePoolEqualTo(String value) { + addCriterion("resource_pool =", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolNotEqualTo(String value) { + addCriterion("resource_pool <>", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolGreaterThan(String value) { + addCriterion("resource_pool >", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolGreaterThanOrEqualTo(String value) { + addCriterion("resource_pool >=", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolLessThan(String value) { + addCriterion("resource_pool <", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolLessThanOrEqualTo(String value) { + addCriterion("resource_pool <=", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolLike(String value) { + addCriterion("resource_pool like", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolNotLike(String value) { + addCriterion("resource_pool not like", value, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolIn(List values) { + addCriterion("resource_pool in", values, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolNotIn(List values) { + addCriterion("resource_pool not in", values, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolBetween(String value1, String value2) { + addCriterion("resource_pool between", value1, value2, "resourcePool"); + return (Criteria) this; + } + + public Criteria andResourcePoolNotBetween(String value1, String value2) { + addCriterion("resource_pool not between", value1, value2, "resourcePool"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNull() { + addCriterion("workspace_id is null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNotNull() { + addCriterion("workspace_id is not null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdEqualTo(String value) { + addCriterion("workspace_id =", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotEqualTo(String value) { + addCriterion("workspace_id <>", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThan(String value) { + addCriterion("workspace_id >", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { + addCriterion("workspace_id >=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThan(String value) { + addCriterion("workspace_id <", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { + addCriterion("workspace_id <=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLike(String value) { + addCriterion("workspace_id like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotLike(String value) { + addCriterion("workspace_id not like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIn(List values) { + addCriterion("workspace_id in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotIn(List values) { + addCriterion("workspace_id not in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdBetween(String value1, String value2) { + addCriterion("workspace_id between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotBetween(String value1, String value2) { + addCriterion("workspace_id not between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andUseDefaultIsNull() { + addCriterion("use_default is null"); + return (Criteria) this; + } + + public Criteria andUseDefaultIsNotNull() { + addCriterion("use_default is not null"); + return (Criteria) this; + } + + public Criteria andUseDefaultEqualTo(Boolean value) { + addCriterion("use_default =", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultNotEqualTo(Boolean value) { + addCriterion("use_default <>", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultGreaterThan(Boolean value) { + addCriterion("use_default >", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultGreaterThanOrEqualTo(Boolean value) { + addCriterion("use_default >=", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultLessThan(Boolean value) { + addCriterion("use_default <", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultLessThanOrEqualTo(Boolean value) { + addCriterion("use_default <=", value, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultIn(List values) { + addCriterion("use_default in", values, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultNotIn(List values) { + addCriterion("use_default not in", values, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultBetween(Boolean value1, Boolean value2) { + addCriterion("use_default between", value1, value2, "useDefault"); + return (Criteria) this; + } + + public Criteria andUseDefaultNotBetween(Boolean value1, Boolean value2) { + addCriterion("use_default not between", value1, value2, "useDefault"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andMemberIsNull() { + addCriterion("`member` is null"); + return (Criteria) this; + } + + public Criteria andMemberIsNotNull() { + addCriterion("`member` is not null"); + return (Criteria) this; + } + + public Criteria andMemberEqualTo(Integer value) { + addCriterion("`member` =", value, "member"); + return (Criteria) this; + } + + public Criteria andMemberNotEqualTo(Integer value) { + addCriterion("`member` <>", value, "member"); + return (Criteria) this; + } + + public Criteria andMemberGreaterThan(Integer value) { + addCriterion("`member` >", value, "member"); + return (Criteria) this; + } + + public Criteria andMemberGreaterThanOrEqualTo(Integer value) { + addCriterion("`member` >=", value, "member"); + return (Criteria) this; + } + + public Criteria andMemberLessThan(Integer value) { + addCriterion("`member` <", value, "member"); + return (Criteria) this; + } + + public Criteria andMemberLessThanOrEqualTo(Integer value) { + addCriterion("`member` <=", value, "member"); + return (Criteria) this; + } + + public Criteria andMemberIn(List values) { + addCriterion("`member` in", values, "member"); + return (Criteria) this; + } + + public Criteria andMemberNotIn(List values) { + addCriterion("`member` not in", values, "member"); + return (Criteria) this; + } + + public Criteria andMemberBetween(Integer value1, Integer value2) { + addCriterion("`member` between", value1, value2, "member"); + return (Criteria) this; + } + + public Criteria andMemberNotBetween(Integer value1, Integer value2) { + addCriterion("`member` not between", value1, value2, "member"); + return (Criteria) this; + } + + public Criteria andProjectIsNull() { + addCriterion("project is null"); + return (Criteria) this; + } + + public Criteria andProjectIsNotNull() { + addCriterion("project is not null"); + return (Criteria) this; + } + + public Criteria andProjectEqualTo(Integer value) { + addCriterion("project =", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotEqualTo(Integer value) { + addCriterion("project <>", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectGreaterThan(Integer value) { + addCriterion("project >", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectGreaterThanOrEqualTo(Integer value) { + addCriterion("project >=", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLessThan(Integer value) { + addCriterion("project <", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLessThanOrEqualTo(Integer value) { + addCriterion("project <=", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectIn(List values) { + addCriterion("project in", values, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotIn(List values) { + addCriterion("project not in", values, "project"); + return (Criteria) this; + } + + public Criteria andProjectBetween(Integer value1, Integer value2) { + addCriterion("project between", value1, value2, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotBetween(Integer value1, Integer value2) { + addCriterion("project not between", value1, value2, "project"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andVumTotalIsNull() { + addCriterion("vum_total is null"); + return (Criteria) this; + } + + public Criteria andVumTotalIsNotNull() { + addCriterion("vum_total is not null"); + return (Criteria) this; + } + + public Criteria andVumTotalEqualTo(BigDecimal value) { + addCriterion("vum_total =", value, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumTotalNotEqualTo(BigDecimal value) { + addCriterion("vum_total <>", value, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumTotalGreaterThan(BigDecimal value) { + addCriterion("vum_total >", value, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumTotalGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("vum_total >=", value, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumTotalLessThan(BigDecimal value) { + addCriterion("vum_total <", value, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumTotalLessThanOrEqualTo(BigDecimal value) { + addCriterion("vum_total <=", value, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumTotalIn(List values) { + addCriterion("vum_total in", values, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumTotalNotIn(List values) { + addCriterion("vum_total not in", values, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumTotalBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("vum_total between", value1, value2, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumTotalNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("vum_total not between", value1, value2, "vumTotal"); + return (Criteria) this; + } + + public Criteria andVumUsedIsNull() { + addCriterion("vum_used is null"); + return (Criteria) this; + } + + public Criteria andVumUsedIsNotNull() { + addCriterion("vum_used is not null"); + return (Criteria) this; + } + + public Criteria andVumUsedEqualTo(BigDecimal value) { + addCriterion("vum_used =", value, "vumUsed"); + return (Criteria) this; + } + + public Criteria andVumUsedNotEqualTo(BigDecimal value) { + addCriterion("vum_used <>", value, "vumUsed"); + return (Criteria) this; + } + + public Criteria andVumUsedGreaterThan(BigDecimal value) { + addCriterion("vum_used >", value, "vumUsed"); + return (Criteria) this; + } + + public Criteria andVumUsedGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("vum_used >=", value, "vumUsed"); + return (Criteria) this; + } + + public Criteria andVumUsedLessThan(BigDecimal value) { + addCriterion("vum_used <", value, "vumUsed"); + return (Criteria) this; + } + + public Criteria andVumUsedLessThanOrEqualTo(BigDecimal value) { + addCriterion("vum_used <=", value, "vumUsed"); + return (Criteria) this; + } + + public Criteria andVumUsedIn(List values) { + addCriterion("vum_used in", values, "vumUsed"); + return (Criteria) this; + } + + public Criteria andVumUsedNotIn(List values) { + addCriterion("vum_used not in", values, "vumUsed"); + return (Criteria) this; + } + + public Criteria andVumUsedBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("vum_used between", value1, value2, "vumUsed"); + return (Criteria) this; + } + + public Criteria andVumUsedNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("vum_used not between", value1, value2, "vumUsed"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 f67678c345..22b1b55726 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,79 +1,63 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "定时任务") -@Table("schedule") @Data public class Schedule implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{schedule.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{schedule.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{schedule.id.length_range}", groups = {Created.class, Updated.class}) private String id; - - @ApiModelProperty(name = "qrtz UUID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "qrtz UUID") private String key; + @Schema(title = "资源类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{schedule.type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{schedule.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{schedule.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "资源类型", required = true, allowableValues = "range[1, 50]") private String type; + @Schema(title = "Schedule value", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 255]") + @NotBlank(message = "{schedule.value.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 255, message = "{schedule.value.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{schedule.value.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Schedule value", required = true, allowableValues = "range[1, 255]") private String value; + @Schema(title = "Schedule Job Class Name", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{schedule.job.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{schedule.job.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{schedule.job.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Schedule Job Class Name", required = true, allowableValues = "range[1, 64]") private String job; - - @ApiModelProperty(name = "Schedule Eable", required = false, allowableValues = "range[1, 1]") + @Schema(title = "Schedule Eable") private Boolean enable; - - @ApiModelProperty(name = "", required = false, allowableValues = "range[1, 50]") + @Schema(title = "") private String resourceId; + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{schedule.create_user.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{schedule.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{schedule.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") private String createUser; - - @ApiModelProperty(name = "Create timestamp", required = false, allowableValues = "range[1, ]") + @Schema(title = "Create timestamp") private Long createTime; - - @ApiModelProperty(name = "Update timestamp", required = false, allowableValues = "range[1, ]") + @Schema(title = "Update timestamp") private Long updateTime; - - @ApiModelProperty(name = "项目ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "项目ID") private String projectId; - - @ApiModelProperty(name = "名称", required = false, allowableValues = "range[1, 100]") + @Schema(title = "名称") private String name; - - @ApiModelProperty(name = "配置", required = false, allowableValues = "range[1, 1000]") + @Schema(title = "配置") private String config; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ScheduleExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ScheduleExample.java new file mode 100644 index 0000000000..bef3935250 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ScheduleExample.java @@ -0,0 +1,1080 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ScheduleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ScheduleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andKeyIsNull() { + addCriterion("`key` is null"); + return (Criteria) this; + } + + public Criteria andKeyIsNotNull() { + addCriterion("`key` is not null"); + return (Criteria) this; + } + + public Criteria andKeyEqualTo(String value) { + addCriterion("`key` =", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotEqualTo(String value) { + addCriterion("`key` <>", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyGreaterThan(String value) { + addCriterion("`key` >", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyGreaterThanOrEqualTo(String value) { + addCriterion("`key` >=", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyLessThan(String value) { + addCriterion("`key` <", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyLessThanOrEqualTo(String value) { + addCriterion("`key` <=", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyLike(String value) { + addCriterion("`key` like", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotLike(String value) { + addCriterion("`key` not like", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyIn(List values) { + addCriterion("`key` in", values, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotIn(List values) { + addCriterion("`key` not in", values, "key"); + return (Criteria) this; + } + + public Criteria andKeyBetween(String value1, String value2) { + addCriterion("`key` between", value1, value2, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotBetween(String value1, String value2) { + addCriterion("`key` not between", value1, value2, "key"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andValueIsNull() { + addCriterion("`value` is null"); + return (Criteria) this; + } + + public Criteria andValueIsNotNull() { + addCriterion("`value` is not null"); + return (Criteria) this; + } + + public Criteria andValueEqualTo(String value) { + addCriterion("`value` =", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotEqualTo(String value) { + addCriterion("`value` <>", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThan(String value) { + addCriterion("`value` >", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThanOrEqualTo(String value) { + addCriterion("`value` >=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThan(String value) { + addCriterion("`value` <", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThanOrEqualTo(String value) { + addCriterion("`value` <=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLike(String value) { + addCriterion("`value` like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotLike(String value) { + addCriterion("`value` not like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueIn(List values) { + addCriterion("`value` in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueNotIn(List values) { + addCriterion("`value` not in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueBetween(String value1, String value2) { + addCriterion("`value` between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andValueNotBetween(String value1, String value2) { + addCriterion("`value` not between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andJobIsNull() { + addCriterion("job is null"); + return (Criteria) this; + } + + public Criteria andJobIsNotNull() { + addCriterion("job is not null"); + return (Criteria) this; + } + + public Criteria andJobEqualTo(String value) { + addCriterion("job =", value, "job"); + return (Criteria) this; + } + + public Criteria andJobNotEqualTo(String value) { + addCriterion("job <>", value, "job"); + return (Criteria) this; + } + + public Criteria andJobGreaterThan(String value) { + addCriterion("job >", value, "job"); + return (Criteria) this; + } + + public Criteria andJobGreaterThanOrEqualTo(String value) { + addCriterion("job >=", value, "job"); + return (Criteria) this; + } + + public Criteria andJobLessThan(String value) { + addCriterion("job <", value, "job"); + return (Criteria) this; + } + + public Criteria andJobLessThanOrEqualTo(String value) { + addCriterion("job <=", value, "job"); + return (Criteria) this; + } + + public Criteria andJobLike(String value) { + addCriterion("job like", value, "job"); + return (Criteria) this; + } + + public Criteria andJobNotLike(String value) { + addCriterion("job not like", value, "job"); + return (Criteria) this; + } + + public Criteria andJobIn(List values) { + addCriterion("job in", values, "job"); + return (Criteria) this; + } + + public Criteria andJobNotIn(List values) { + addCriterion("job not in", values, "job"); + return (Criteria) this; + } + + public Criteria andJobBetween(String value1, String value2) { + addCriterion("job between", value1, value2, "job"); + return (Criteria) this; + } + + public Criteria andJobNotBetween(String value1, String value2) { + addCriterion("job not between", value1, value2, "job"); + return (Criteria) this; + } + + public Criteria andEnableIsNull() { + addCriterion("`enable` is null"); + return (Criteria) this; + } + + public Criteria andEnableIsNotNull() { + addCriterion("`enable` is not null"); + return (Criteria) this; + } + + public Criteria andEnableEqualTo(Boolean value) { + addCriterion("`enable` =", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableNotEqualTo(Boolean value) { + addCriterion("`enable` <>", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableGreaterThan(Boolean value) { + addCriterion("`enable` >", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableGreaterThanOrEqualTo(Boolean value) { + addCriterion("`enable` >=", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableLessThan(Boolean value) { + addCriterion("`enable` <", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableLessThanOrEqualTo(Boolean value) { + addCriterion("`enable` <=", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableIn(List values) { + addCriterion("`enable` in", values, "enable"); + return (Criteria) this; + } + + public Criteria andEnableNotIn(List values) { + addCriterion("`enable` not in", values, "enable"); + return (Criteria) this; + } + + public Criteria andEnableBetween(Boolean value1, Boolean value2) { + addCriterion("`enable` between", value1, value2, "enable"); + return (Criteria) this; + } + + public Criteria andEnableNotBetween(Boolean value1, Boolean value2) { + addCriterion("`enable` not between", value1, value2, "enable"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNull() { + addCriterion("resource_id is null"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNotNull() { + addCriterion("resource_id is not null"); + return (Criteria) this; + } + + public Criteria andResourceIdEqualTo(String value) { + addCriterion("resource_id =", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotEqualTo(String value) { + addCriterion("resource_id <>", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThan(String value) { + addCriterion("resource_id >", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThanOrEqualTo(String value) { + addCriterion("resource_id >=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThan(String value) { + addCriterion("resource_id <", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThanOrEqualTo(String value) { + addCriterion("resource_id <=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLike(String value) { + addCriterion("resource_id like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotLike(String value) { + addCriterion("resource_id not like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdIn(List values) { + addCriterion("resource_id in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotIn(List values) { + addCriterion("resource_id not in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdBetween(String value1, String value2) { + addCriterion("resource_id between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotBetween(String value1, String value2) { + addCriterion("resource_id not between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andConfigIsNull() { + addCriterion("config is null"); + return (Criteria) this; + } + + public Criteria andConfigIsNotNull() { + addCriterion("config is not null"); + return (Criteria) this; + } + + public Criteria andConfigEqualTo(String value) { + addCriterion("config =", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigNotEqualTo(String value) { + addCriterion("config <>", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigGreaterThan(String value) { + addCriterion("config >", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigGreaterThanOrEqualTo(String value) { + addCriterion("config >=", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigLessThan(String value) { + addCriterion("config <", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigLessThanOrEqualTo(String value) { + addCriterion("config <=", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigLike(String value) { + addCriterion("config like", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigNotLike(String value) { + addCriterion("config not like", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigIn(List values) { + addCriterion("config in", values, "config"); + return (Criteria) this; + } + + public Criteria andConfigNotIn(List values) { + addCriterion("config not in", values, "config"); + return (Criteria) this; + } + + public Criteria andConfigBetween(String value1, String value2) { + addCriterion("config between", value1, value2, "config"); + return (Criteria) this; + } + + public Criteria andConfigNotBetween(String value1, String value2) { + addCriterion("config not between", value1, value2, "config"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 74530eda8b..199b5a5cf6 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,40 +1,32 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "服务集成") -@Table("service_integration") @Data public class ServiceIntegration implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{service_integration.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 50]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{service_integration.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{service_integration.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "平台", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{service_integration.platform.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{service_integration.platform.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{service_integration.platform.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "平台", required = true, allowableValues = "range[1, 50]") private String platform; - - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, ]") - private byte[] configuration; - - - @ApiModelProperty(name = "工作空间ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "工作空间ID") private String workspaceId; + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 65535]") + @NotBlank(message = "{service_integration.configuration.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 65535, message = "{service_integration.configuration.length_range}", groups = {Created.class, Updated.class}) + private byte[] configuration; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegrationExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegrationExample.java new file mode 100644 index 0000000000..d5ff61694e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegrationExample.java @@ -0,0 +1,410 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ServiceIntegrationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ServiceIntegrationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPlatformIsNull() { + addCriterion("platform is null"); + return (Criteria) this; + } + + public Criteria andPlatformIsNotNull() { + addCriterion("platform is not null"); + return (Criteria) this; + } + + public Criteria andPlatformEqualTo(String value) { + addCriterion("platform =", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotEqualTo(String value) { + addCriterion("platform <>", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThan(String value) { + addCriterion("platform >", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThanOrEqualTo(String value) { + addCriterion("platform >=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThan(String value) { + addCriterion("platform <", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThanOrEqualTo(String value) { + addCriterion("platform <=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLike(String value) { + addCriterion("platform like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotLike(String value) { + addCriterion("platform not like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformIn(List values) { + addCriterion("platform in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotIn(List values) { + addCriterion("platform not in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformBetween(String value1, String value2) { + addCriterion("platform between", value1, value2, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotBetween(String value1, String value2) { + addCriterion("platform not between", value1, value2, "platform"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNull() { + addCriterion("workspace_id is null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNotNull() { + addCriterion("workspace_id is not null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdEqualTo(String value) { + addCriterion("workspace_id =", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotEqualTo(String value) { + addCriterion("workspace_id <>", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThan(String value) { + addCriterion("workspace_id >", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { + addCriterion("workspace_id >=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThan(String value) { + addCriterion("workspace_id <", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { + addCriterion("workspace_id <=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLike(String value) { + addCriterion("workspace_id like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotLike(String value) { + addCriterion("workspace_id not like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIn(List values) { + addCriterion("workspace_id in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotIn(List values) { + addCriterion("workspace_id not in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdBetween(String value1, String value2) { + addCriterion("workspace_id between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotBetween(String value1, String value2) { + addCriterion("workspace_id not between", value1, value2, "workspaceId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 bc252e9842..63272b5398 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,36 +1,27 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "系统参数") -@Table("system_parameter") @Data public class SystemParameter implements Serializable { - private static final long serialVersionUID = 1L; - - @Id + @Schema(title = "参数名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") @NotBlank(message = "{system_parameter.param_key.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "参数名称", required = true, allowableValues = "range[1, 64]") + @Size(min = 1, max = 64, message = "{system_parameter.param_key.length_range}", groups = {Created.class, Updated.class}) private String paramKey; - - @ApiModelProperty(name = "参数值", required = false, allowableValues = "range[1, 255]") + @Schema(title = "参数值") private String paramValue; + @Schema(title = "类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{system_parameter.type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 100, message = "{system_parameter.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{system_parameter.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "类型", required = true, allowableValues = "range[1, 100]") private String type; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameterExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameterExample.java new file mode 100644 index 0000000000..97787858ce --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/SystemParameterExample.java @@ -0,0 +1,410 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class SystemParameterExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SystemParameterExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andParamKeyIsNull() { + addCriterion("param_key is null"); + return (Criteria) this; + } + + public Criteria andParamKeyIsNotNull() { + addCriterion("param_key is not null"); + return (Criteria) this; + } + + public Criteria andParamKeyEqualTo(String value) { + addCriterion("param_key =", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyNotEqualTo(String value) { + addCriterion("param_key <>", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyGreaterThan(String value) { + addCriterion("param_key >", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyGreaterThanOrEqualTo(String value) { + addCriterion("param_key >=", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyLessThan(String value) { + addCriterion("param_key <", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyLessThanOrEqualTo(String value) { + addCriterion("param_key <=", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyLike(String value) { + addCriterion("param_key like", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyNotLike(String value) { + addCriterion("param_key not like", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyIn(List values) { + addCriterion("param_key in", values, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyNotIn(List values) { + addCriterion("param_key not in", values, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyBetween(String value1, String value2) { + addCriterion("param_key between", value1, value2, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyNotBetween(String value1, String value2) { + addCriterion("param_key not between", value1, value2, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamValueIsNull() { + addCriterion("param_value is null"); + return (Criteria) this; + } + + public Criteria andParamValueIsNotNull() { + addCriterion("param_value is not null"); + return (Criteria) this; + } + + public Criteria andParamValueEqualTo(String value) { + addCriterion("param_value =", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueNotEqualTo(String value) { + addCriterion("param_value <>", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueGreaterThan(String value) { + addCriterion("param_value >", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueGreaterThanOrEqualTo(String value) { + addCriterion("param_value >=", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueLessThan(String value) { + addCriterion("param_value <", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueLessThanOrEqualTo(String value) { + addCriterion("param_value <=", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueLike(String value) { + addCriterion("param_value like", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueNotLike(String value) { + addCriterion("param_value not like", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueIn(List values) { + addCriterion("param_value in", values, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueNotIn(List values) { + addCriterion("param_value not in", values, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueBetween(String value1, String value2) { + addCriterion("param_value between", value1, value2, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueNotBetween(String value1, String value2) { + addCriterion("param_value not between", value1, value2, "paramValue"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 2772887679..7d2635579c 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,49 +1,38 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "测试资源池节点") -@Table("test_resource") @Data public class TestResource implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{test_resource.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "Test resource ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "资源节点ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{test_resource.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{test_resource.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{test_resource.test_resource_pool_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{test_resource.test_resource_pool_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{test_resource.test_resource_pool_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Test resource pool ID this test resource belongs to", required = true, allowableValues = "range[1, 50]") private String testResourcePoolId; - - @ApiModelProperty(name = "Test resource configuration", required = false, allowableValues = "range[1, ]") - private byte[] configuration; - + @Schema(title = "资源节点状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{test_resource.status.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{test_resource.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{test_resource.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "Test resource status", required = true, allowableValues = "range[1, 64]") private String status; - - @ApiModelProperty(name = "Create timestamp", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "Update timestamp", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; + @Schema(title = "资源节点配置") + private byte[] configuration; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourceExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourceExample.java new file mode 100644 index 0000000000..556550efb8 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourceExample.java @@ -0,0 +1,530 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestResourceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestResourceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIsNull() { + addCriterion("test_resource_pool_id is null"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIsNotNull() { + addCriterion("test_resource_pool_id is not null"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdEqualTo(String value) { + addCriterion("test_resource_pool_id =", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotEqualTo(String value) { + addCriterion("test_resource_pool_id <>", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdGreaterThan(String value) { + addCriterion("test_resource_pool_id >", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdGreaterThanOrEqualTo(String value) { + addCriterion("test_resource_pool_id >=", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLessThan(String value) { + addCriterion("test_resource_pool_id <", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLessThanOrEqualTo(String value) { + addCriterion("test_resource_pool_id <=", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLike(String value) { + addCriterion("test_resource_pool_id like", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotLike(String value) { + addCriterion("test_resource_pool_id not like", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIn(List values) { + addCriterion("test_resource_pool_id in", values, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotIn(List values) { + addCriterion("test_resource_pool_id not in", values, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdBetween(String value1, String value2) { + addCriterion("test_resource_pool_id between", value1, value2, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotBetween(String value1, String value2) { + addCriterion("test_resource_pool_id not between", value1, value2, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 4c4d95ba58..7890637302 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,78 +1,61 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "测试资源池") -@Table("test_resource_pool") @Data public class TestResourcePool implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{test_resource_pool.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "资源池ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{test_resource_pool.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{test_resource_pool.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{test_resource_pool.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{test_resource_pool.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{test_resource_pool.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "名称", required = true, allowableValues = "range[1, 64]") private String name; + @Schema(title = "类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 30]") + @NotBlank(message = "{test_resource_pool.type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 30, message = "{test_resource_pool.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{test_resource_pool.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "类型", required = true, allowableValues = "range[1, 30]") private String type; - - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]") + @Schema(title = "描述") private String description; + @Schema(title = "状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{test_resource_pool.status.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{test_resource_pool.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{test_resource_pool.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "状态", required = true, allowableValues = "range[1, 64]") private String status; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - - @ApiModelProperty(name = "性能测试镜像", required = false, allowableValues = "range[1, 100]") + @Schema(title = "性能测试镜像") private String image; - - @ApiModelProperty(name = "性能测试jvm配置", required = false, allowableValues = "range[1, 200]") + @Schema(title = "性能测试jvm配置") private String heap; - - @ApiModelProperty(name = "性能测试gc配置", required = false, allowableValues = "range[1, 200]") + @Schema(title = "性能测试gc配置") private String gcAlgo; - - @ApiModelProperty(name = "创建人", required = false, allowableValues = "range[1, 100]") + @Schema(title = "创建人") private String createUser; - - @ApiModelProperty(name = "是否用于接口测试", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否用于接口测试") private Boolean api; - - @ApiModelProperty(name = "是否用于性能测试", required = false, allowableValues = "range[1, 1]") + @Schema(title = "是否用于性能测试") private Boolean performance; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePoolExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePoolExample.java new file mode 100644 index 0000000000..f3b141c0f6 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TestResourcePoolExample.java @@ -0,0 +1,1070 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestResourcePoolExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestResourcePoolExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andImageIsNull() { + addCriterion("image is null"); + return (Criteria) this; + } + + public Criteria andImageIsNotNull() { + addCriterion("image is not null"); + return (Criteria) this; + } + + public Criteria andImageEqualTo(String value) { + addCriterion("image =", value, "image"); + return (Criteria) this; + } + + public Criteria andImageNotEqualTo(String value) { + addCriterion("image <>", value, "image"); + return (Criteria) this; + } + + public Criteria andImageGreaterThan(String value) { + addCriterion("image >", value, "image"); + return (Criteria) this; + } + + public Criteria andImageGreaterThanOrEqualTo(String value) { + addCriterion("image >=", value, "image"); + return (Criteria) this; + } + + public Criteria andImageLessThan(String value) { + addCriterion("image <", value, "image"); + return (Criteria) this; + } + + public Criteria andImageLessThanOrEqualTo(String value) { + addCriterion("image <=", value, "image"); + return (Criteria) this; + } + + public Criteria andImageLike(String value) { + addCriterion("image like", value, "image"); + return (Criteria) this; + } + + public Criteria andImageNotLike(String value) { + addCriterion("image not like", value, "image"); + return (Criteria) this; + } + + public Criteria andImageIn(List values) { + addCriterion("image in", values, "image"); + return (Criteria) this; + } + + public Criteria andImageNotIn(List values) { + addCriterion("image not in", values, "image"); + return (Criteria) this; + } + + public Criteria andImageBetween(String value1, String value2) { + addCriterion("image between", value1, value2, "image"); + return (Criteria) this; + } + + public Criteria andImageNotBetween(String value1, String value2) { + addCriterion("image not between", value1, value2, "image"); + return (Criteria) this; + } + + public Criteria andHeapIsNull() { + addCriterion("`heap` is null"); + return (Criteria) this; + } + + public Criteria andHeapIsNotNull() { + addCriterion("`heap` is not null"); + return (Criteria) this; + } + + public Criteria andHeapEqualTo(String value) { + addCriterion("`heap` =", value, "heap"); + return (Criteria) this; + } + + public Criteria andHeapNotEqualTo(String value) { + addCriterion("`heap` <>", value, "heap"); + return (Criteria) this; + } + + public Criteria andHeapGreaterThan(String value) { + addCriterion("`heap` >", value, "heap"); + return (Criteria) this; + } + + public Criteria andHeapGreaterThanOrEqualTo(String value) { + addCriterion("`heap` >=", value, "heap"); + return (Criteria) this; + } + + public Criteria andHeapLessThan(String value) { + addCriterion("`heap` <", value, "heap"); + return (Criteria) this; + } + + public Criteria andHeapLessThanOrEqualTo(String value) { + addCriterion("`heap` <=", value, "heap"); + return (Criteria) this; + } + + public Criteria andHeapLike(String value) { + addCriterion("`heap` like", value, "heap"); + return (Criteria) this; + } + + public Criteria andHeapNotLike(String value) { + addCriterion("`heap` not like", value, "heap"); + return (Criteria) this; + } + + public Criteria andHeapIn(List values) { + addCriterion("`heap` in", values, "heap"); + return (Criteria) this; + } + + public Criteria andHeapNotIn(List values) { + addCriterion("`heap` not in", values, "heap"); + return (Criteria) this; + } + + public Criteria andHeapBetween(String value1, String value2) { + addCriterion("`heap` between", value1, value2, "heap"); + return (Criteria) this; + } + + public Criteria andHeapNotBetween(String value1, String value2) { + addCriterion("`heap` not between", value1, value2, "heap"); + return (Criteria) this; + } + + public Criteria andGcAlgoIsNull() { + addCriterion("gc_algo is null"); + return (Criteria) this; + } + + public Criteria andGcAlgoIsNotNull() { + addCriterion("gc_algo is not null"); + return (Criteria) this; + } + + public Criteria andGcAlgoEqualTo(String value) { + addCriterion("gc_algo =", value, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoNotEqualTo(String value) { + addCriterion("gc_algo <>", value, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoGreaterThan(String value) { + addCriterion("gc_algo >", value, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoGreaterThanOrEqualTo(String value) { + addCriterion("gc_algo >=", value, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoLessThan(String value) { + addCriterion("gc_algo <", value, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoLessThanOrEqualTo(String value) { + addCriterion("gc_algo <=", value, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoLike(String value) { + addCriterion("gc_algo like", value, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoNotLike(String value) { + addCriterion("gc_algo not like", value, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoIn(List values) { + addCriterion("gc_algo in", values, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoNotIn(List values) { + addCriterion("gc_algo not in", values, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoBetween(String value1, String value2) { + addCriterion("gc_algo between", value1, value2, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andGcAlgoNotBetween(String value1, String value2) { + addCriterion("gc_algo not between", value1, value2, "gcAlgo"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andApiIsNull() { + addCriterion("api is null"); + return (Criteria) this; + } + + public Criteria andApiIsNotNull() { + addCriterion("api is not null"); + return (Criteria) this; + } + + public Criteria andApiEqualTo(Boolean value) { + addCriterion("api =", value, "api"); + return (Criteria) this; + } + + public Criteria andApiNotEqualTo(Boolean value) { + addCriterion("api <>", value, "api"); + return (Criteria) this; + } + + public Criteria andApiGreaterThan(Boolean value) { + addCriterion("api >", value, "api"); + return (Criteria) this; + } + + public Criteria andApiGreaterThanOrEqualTo(Boolean value) { + addCriterion("api >=", value, "api"); + return (Criteria) this; + } + + public Criteria andApiLessThan(Boolean value) { + addCriterion("api <", value, "api"); + return (Criteria) this; + } + + public Criteria andApiLessThanOrEqualTo(Boolean value) { + addCriterion("api <=", value, "api"); + return (Criteria) this; + } + + public Criteria andApiIn(List values) { + addCriterion("api in", values, "api"); + return (Criteria) this; + } + + public Criteria andApiNotIn(List values) { + addCriterion("api not in", values, "api"); + return (Criteria) this; + } + + public Criteria andApiBetween(Boolean value1, Boolean value2) { + addCriterion("api between", value1, value2, "api"); + return (Criteria) this; + } + + public Criteria andApiNotBetween(Boolean value1, Boolean value2) { + addCriterion("api not between", value1, value2, "api"); + return (Criteria) this; + } + + public Criteria andPerformanceIsNull() { + addCriterion("performance is null"); + return (Criteria) this; + } + + public Criteria andPerformanceIsNotNull() { + addCriterion("performance is not null"); + return (Criteria) this; + } + + public Criteria andPerformanceEqualTo(Boolean value) { + addCriterion("performance =", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceNotEqualTo(Boolean value) { + addCriterion("performance <>", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceGreaterThan(Boolean value) { + addCriterion("performance >", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceGreaterThanOrEqualTo(Boolean value) { + addCriterion("performance >=", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceLessThan(Boolean value) { + addCriterion("performance <", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceLessThanOrEqualTo(Boolean value) { + addCriterion("performance <=", value, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceIn(List values) { + addCriterion("performance in", values, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceNotIn(List values) { + addCriterion("performance not in", values, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceBetween(Boolean value1, Boolean value2) { + addCriterion("performance between", value1, value2, "performance"); + return (Criteria) this; + } + + public Criteria andPerformanceNotBetween(Boolean value1, Boolean value2) { + addCriterion("performance not between", value1, value2, "performance"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 f8455fbed4..3c64016123 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 @@ -2,79 +2,64 @@ package io.metersphere.system.domain; import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; 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; +import lombok.Data; -@ApiModel(value = "用户") -@Table("user") @Data public class User implements Serializable { - private static final long serialVersionUID = 1L; - - @Id + @Schema(title = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") @NotBlank(message = "{user.id.not_blank}", groups = {Created.class, Updated.class}) - @ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]") + @Size(min = 1, max = 50, message = "{user.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "用户名", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{user.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{user.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用户名", required = true, allowableValues = "range[1, 64]") private String name; + @Schema(title = "用户邮箱", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{user.email.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{user.email.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user.email.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用户邮箱", required = true, allowableValues = "range[1, 64]") private String email; - - @ApiModelProperty(name = "用户密码", required = false, allowableValues = "range[1, 256]") + @Schema(title = "用户密码") private String password; + @Schema(title = "用户状态,启用或禁用", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user.status.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{user.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用户状态,启用或禁用", required = true, allowableValues = "range[1, 50]") private String status; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - - @ApiModelProperty(name = "语言", required = false, allowableValues = "range[1, 30]") + @Schema(title = "语言") private String language; - - @ApiModelProperty(name = "当前工作空间ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "当前工作空间ID") private String lastWorkspaceId; - - @ApiModelProperty(name = "手机号", required = false, allowableValues = "range[1, 50]") + @Schema(title = "手机号") private String phone; + @Schema(title = "来源:LOCAL OIDC CAS", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user.source.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{user.source.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user.source.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "来源:LOCAL OIDC CAS", required = true, allowableValues = "range[1, 50]") private String source; - - @ApiModelProperty(name = "当前项目ID", required = false, allowableValues = "range[1, 50]") + @Schema(title = "当前项目ID") private String lastProjectId; + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{user.create_user.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 100, message = "{user.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 100]") private String createUser; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExample.java new file mode 100644 index 0000000000..92cafae78e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExample.java @@ -0,0 +1,1090 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class UserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andEmailIsNull() { + addCriterion("email is null"); + return (Criteria) this; + } + + public Criteria andEmailIsNotNull() { + addCriterion("email is not null"); + return (Criteria) this; + } + + public Criteria andEmailEqualTo(String value) { + addCriterion("email =", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotEqualTo(String value) { + addCriterion("email <>", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThan(String value) { + addCriterion("email >", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThanOrEqualTo(String value) { + addCriterion("email >=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThan(String value) { + addCriterion("email <", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThanOrEqualTo(String value) { + addCriterion("email <=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLike(String value) { + addCriterion("email like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotLike(String value) { + addCriterion("email not like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailIn(List values) { + addCriterion("email in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotIn(List values) { + addCriterion("email not in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailBetween(String value1, String value2) { + addCriterion("email between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotBetween(String value1, String value2) { + addCriterion("email not between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andPasswordIsNull() { + addCriterion("`password` is null"); + return (Criteria) this; + } + + public Criteria andPasswordIsNotNull() { + addCriterion("`password` is not null"); + return (Criteria) this; + } + + public Criteria andPasswordEqualTo(String value) { + addCriterion("`password` =", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotEqualTo(String value) { + addCriterion("`password` <>", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordGreaterThan(String value) { + addCriterion("`password` >", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordGreaterThanOrEqualTo(String value) { + addCriterion("`password` >=", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLessThan(String value) { + addCriterion("`password` <", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLessThanOrEqualTo(String value) { + addCriterion("`password` <=", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLike(String value) { + addCriterion("`password` like", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotLike(String value) { + addCriterion("`password` not like", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordIn(List values) { + addCriterion("`password` in", values, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotIn(List values) { + addCriterion("`password` not in", values, "password"); + return (Criteria) this; + } + + public Criteria andPasswordBetween(String value1, String value2) { + addCriterion("`password` between", value1, value2, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotBetween(String value1, String value2) { + addCriterion("`password` not between", value1, value2, "password"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andLanguageIsNull() { + addCriterion("`language` is null"); + return (Criteria) this; + } + + public Criteria andLanguageIsNotNull() { + addCriterion("`language` is not null"); + return (Criteria) this; + } + + public Criteria andLanguageEqualTo(String value) { + addCriterion("`language` =", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageNotEqualTo(String value) { + addCriterion("`language` <>", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageGreaterThan(String value) { + addCriterion("`language` >", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageGreaterThanOrEqualTo(String value) { + addCriterion("`language` >=", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageLessThan(String value) { + addCriterion("`language` <", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageLessThanOrEqualTo(String value) { + addCriterion("`language` <=", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageLike(String value) { + addCriterion("`language` like", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageNotLike(String value) { + addCriterion("`language` not like", value, "language"); + return (Criteria) this; + } + + public Criteria andLanguageIn(List values) { + addCriterion("`language` in", values, "language"); + return (Criteria) this; + } + + public Criteria andLanguageNotIn(List values) { + addCriterion("`language` not in", values, "language"); + return (Criteria) this; + } + + public Criteria andLanguageBetween(String value1, String value2) { + addCriterion("`language` between", value1, value2, "language"); + return (Criteria) this; + } + + public Criteria andLanguageNotBetween(String value1, String value2) { + addCriterion("`language` not between", value1, value2, "language"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdIsNull() { + addCriterion("last_workspace_id is null"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdIsNotNull() { + addCriterion("last_workspace_id is not null"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdEqualTo(String value) { + addCriterion("last_workspace_id =", value, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdNotEqualTo(String value) { + addCriterion("last_workspace_id <>", value, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdGreaterThan(String value) { + addCriterion("last_workspace_id >", value, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdGreaterThanOrEqualTo(String value) { + addCriterion("last_workspace_id >=", value, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdLessThan(String value) { + addCriterion("last_workspace_id <", value, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdLessThanOrEqualTo(String value) { + addCriterion("last_workspace_id <=", value, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdLike(String value) { + addCriterion("last_workspace_id like", value, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdNotLike(String value) { + addCriterion("last_workspace_id not like", value, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdIn(List values) { + addCriterion("last_workspace_id in", values, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdNotIn(List values) { + addCriterion("last_workspace_id not in", values, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdBetween(String value1, String value2) { + addCriterion("last_workspace_id between", value1, value2, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andLastWorkspaceIdNotBetween(String value1, String value2) { + addCriterion("last_workspace_id not between", value1, value2, "lastWorkspaceId"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andSourceIsNull() { + addCriterion("`source` is null"); + return (Criteria) this; + } + + public Criteria andSourceIsNotNull() { + addCriterion("`source` is not null"); + return (Criteria) this; + } + + public Criteria andSourceEqualTo(String value) { + addCriterion("`source` =", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotEqualTo(String value) { + addCriterion("`source` <>", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThan(String value) { + addCriterion("`source` >", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThanOrEqualTo(String value) { + addCriterion("`source` >=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThan(String value) { + addCriterion("`source` <", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThanOrEqualTo(String value) { + addCriterion("`source` <=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLike(String value) { + addCriterion("`source` like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotLike(String value) { + addCriterion("`source` not like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceIn(List values) { + addCriterion("`source` in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotIn(List values) { + addCriterion("`source` not in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceBetween(String value1, String value2) { + addCriterion("`source` between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotBetween(String value1, String value2) { + addCriterion("`source` not between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andLastProjectIdIsNull() { + addCriterion("last_project_id is null"); + return (Criteria) this; + } + + public Criteria andLastProjectIdIsNotNull() { + addCriterion("last_project_id is not null"); + return (Criteria) this; + } + + public Criteria andLastProjectIdEqualTo(String value) { + addCriterion("last_project_id =", value, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdNotEqualTo(String value) { + addCriterion("last_project_id <>", value, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdGreaterThan(String value) { + addCriterion("last_project_id >", value, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("last_project_id >=", value, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdLessThan(String value) { + addCriterion("last_project_id <", value, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdLessThanOrEqualTo(String value) { + addCriterion("last_project_id <=", value, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdLike(String value) { + addCriterion("last_project_id like", value, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdNotLike(String value) { + addCriterion("last_project_id not like", value, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdIn(List values) { + addCriterion("last_project_id in", values, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdNotIn(List values) { + addCriterion("last_project_id not in", values, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdBetween(String value1, String value2) { + addCriterion("last_project_id between", value1, value2, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andLastProjectIdNotBetween(String value1, String value2) { + addCriterion("last_project_id not between", value1, value2, "lastProjectId"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 eb70c44514..87d9f1b2ba 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,33 +1,25 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "用户扩展") -@Table("user_extend") @Data public class UserExtend implements Serializable { - private static final long serialVersionUID = 1L; + @Schema(title = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_extend.user_id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{user_extend.user_id.length_range}", groups = {Created.class, Updated.class}) + private String userId; - @Id - @NotBlank(message = "{user_extend.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]") - private String id; - - - @ApiModelProperty(name = "其他平台对接信息", required = false, allowableValues = "range[1, 2000]") - private byte[] platformInfo; - - - @ApiModelProperty(name = "UI本地调试地址", required = false, allowableValues = "range[1, 255]") + @Schema(title = "UI本地调试地址") private String seleniumServer; + @Schema(title = "其他平台对接信息") + private byte[] platformInfo; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtendExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtendExample.java new file mode 100644 index 0000000000..b7696d07a4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExtendExample.java @@ -0,0 +1,340 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class UserExtendExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserExtendExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andSeleniumServerIsNull() { + addCriterion("selenium_server is null"); + return (Criteria) this; + } + + public Criteria andSeleniumServerIsNotNull() { + addCriterion("selenium_server is not null"); + return (Criteria) this; + } + + public Criteria andSeleniumServerEqualTo(String value) { + addCriterion("selenium_server =", value, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerNotEqualTo(String value) { + addCriterion("selenium_server <>", value, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerGreaterThan(String value) { + addCriterion("selenium_server >", value, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerGreaterThanOrEqualTo(String value) { + addCriterion("selenium_server >=", value, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerLessThan(String value) { + addCriterion("selenium_server <", value, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerLessThanOrEqualTo(String value) { + addCriterion("selenium_server <=", value, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerLike(String value) { + addCriterion("selenium_server like", value, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerNotLike(String value) { + addCriterion("selenium_server not like", value, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerIn(List values) { + addCriterion("selenium_server in", values, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerNotIn(List values) { + addCriterion("selenium_server not in", values, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerBetween(String value1, String value2) { + addCriterion("selenium_server between", value1, value2, "seleniumServer"); + return (Criteria) this; + } + + public Criteria andSeleniumServerNotBetween(String value1, String value2) { + addCriterion("selenium_server not between", value1, value2, "seleniumServer"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 d6847f2bcf..ff08ffdf65 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,50 +1,40 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "用户api key") -@Table("user_key") @Data public class UserKey implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{user_key.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "user_key ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "user_key ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_key.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{user_key.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_key.create_user.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{user_key.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_key.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]") private String createUser; + @Schema(title = "access_key", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_key.access_key.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{user_key.access_key.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_key.access_key.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "access_key", required = true, allowableValues = "range[1, 50]") private String accessKey; + @Schema(title = "secret key", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_key.secret_key.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{user_key.secret_key.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_key.secret_key.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "secret key", required = true, allowableValues = "range[1, 50]") private String secretKey; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "状态", required = false, allowableValues = "range[1, 10]") + @Schema(title = "状态") private String status; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKeyExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKeyExample.java new file mode 100644 index 0000000000..f336f14966 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserKeyExample.java @@ -0,0 +1,610 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class UserKeyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserKeyExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andAccessKeyIsNull() { + addCriterion("access_key is null"); + return (Criteria) this; + } + + public Criteria andAccessKeyIsNotNull() { + addCriterion("access_key is not null"); + return (Criteria) this; + } + + public Criteria andAccessKeyEqualTo(String value) { + addCriterion("access_key =", value, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyNotEqualTo(String value) { + addCriterion("access_key <>", value, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyGreaterThan(String value) { + addCriterion("access_key >", value, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyGreaterThanOrEqualTo(String value) { + addCriterion("access_key >=", value, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyLessThan(String value) { + addCriterion("access_key <", value, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyLessThanOrEqualTo(String value) { + addCriterion("access_key <=", value, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyLike(String value) { + addCriterion("access_key like", value, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyNotLike(String value) { + addCriterion("access_key not like", value, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyIn(List values) { + addCriterion("access_key in", values, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyNotIn(List values) { + addCriterion("access_key not in", values, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyBetween(String value1, String value2) { + addCriterion("access_key between", value1, value2, "accessKey"); + return (Criteria) this; + } + + public Criteria andAccessKeyNotBetween(String value1, String value2) { + addCriterion("access_key not between", value1, value2, "accessKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyIsNull() { + addCriterion("secret_key is null"); + return (Criteria) this; + } + + public Criteria andSecretKeyIsNotNull() { + addCriterion("secret_key is not null"); + return (Criteria) this; + } + + public Criteria andSecretKeyEqualTo(String value) { + addCriterion("secret_key =", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyNotEqualTo(String value) { + addCriterion("secret_key <>", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyGreaterThan(String value) { + addCriterion("secret_key >", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyGreaterThanOrEqualTo(String value) { + addCriterion("secret_key >=", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyLessThan(String value) { + addCriterion("secret_key <", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyLessThanOrEqualTo(String value) { + addCriterion("secret_key <=", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyLike(String value) { + addCriterion("secret_key like", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyNotLike(String value) { + addCriterion("secret_key not like", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyIn(List values) { + addCriterion("secret_key in", values, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyNotIn(List values) { + addCriterion("secret_key not in", values, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyBetween(String value1, String value2) { + addCriterion("secret_key between", value1, value2, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyNotBetween(String value1, String value2) { + addCriterion("secret_key not between", value1, value2, "secretKey"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 e90f4d36b7..590aba014f 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,64 +1,53 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "用户组") -@Table("user_role") @Data public class UserRole implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{user_role.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "组ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "组ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_role.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{user_role.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "组名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{user_role.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{user_role.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "组名称", required = true, allowableValues = "range[1, 64]") private String name; - - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 100]") + @Schema(title = "描述") private String description; + @Schema(title = "是否是系统用户组", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 1]") + @NotBlank(message = "{user_role.system.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 1, message = "{user_role.system.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role.system.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否是系统用户组", required = true, allowableValues = "range[1, 1]") private Boolean system; + @Schema(title = "所属类型", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 20]") + @NotBlank(message = "{user_role.type.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 20, message = "{user_role.type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role.type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "所属类型", required = true, allowableValues = "range[1, 20]") private String type; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; + @Schema(title = "创建人(操作人)", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{user_role.create_user.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{user_role.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人(操作人)", required = true, allowableValues = "range[1, 64]") private String createUser; + @Schema(title = "应用范围", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{user_role.scope_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{user_role.scope_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role.scope_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "应用范围", required = true, allowableValues = "range[1, 64]") private String scopeId; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleExample.java new file mode 100644 index 0000000000..f2ccfad45f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleExample.java @@ -0,0 +1,800 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class UserRoleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserRoleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andSystemIsNull() { + addCriterion("`system` is null"); + return (Criteria) this; + } + + public Criteria andSystemIsNotNull() { + addCriterion("`system` is not null"); + return (Criteria) this; + } + + public Criteria andSystemEqualTo(Boolean value) { + addCriterion("`system` =", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotEqualTo(Boolean value) { + addCriterion("`system` <>", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThan(Boolean value) { + addCriterion("`system` >", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThanOrEqualTo(Boolean value) { + addCriterion("`system` >=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThan(Boolean value) { + addCriterion("`system` <", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThanOrEqualTo(Boolean value) { + addCriterion("`system` <=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemIn(List values) { + addCriterion("`system` in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotIn(List values) { + addCriterion("`system` not in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemBetween(Boolean value1, Boolean value2) { + addCriterion("`system` between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotBetween(Boolean value1, Boolean value2) { + addCriterion("`system` not between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andScopeIdIsNull() { + addCriterion("scope_id is null"); + return (Criteria) this; + } + + public Criteria andScopeIdIsNotNull() { + addCriterion("scope_id is not null"); + return (Criteria) this; + } + + public Criteria andScopeIdEqualTo(String value) { + addCriterion("scope_id =", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdNotEqualTo(String value) { + addCriterion("scope_id <>", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdGreaterThan(String value) { + addCriterion("scope_id >", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdGreaterThanOrEqualTo(String value) { + addCriterion("scope_id >=", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdLessThan(String value) { + addCriterion("scope_id <", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdLessThanOrEqualTo(String value) { + addCriterion("scope_id <=", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdLike(String value) { + addCriterion("scope_id like", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdNotLike(String value) { + addCriterion("scope_id not like", value, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdIn(List values) { + addCriterion("scope_id in", values, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdNotIn(List values) { + addCriterion("scope_id not in", values, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdBetween(String value1, String value2) { + addCriterion("scope_id between", value1, value2, "scopeId"); + return (Criteria) this; + } + + public Criteria andScopeIdNotBetween(String value1, String value2) { + addCriterion("scope_id not between", value1, value2, "scopeId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 738428ac1f..3d4d365432 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,41 +1,34 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "用户组权限") -@Table("user_role_permission") @Data public class UserRolePermission implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{user_role_permission.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues = "range[1, 64]") + @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{user_role_permission.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 64, message = "{user_role_permission.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "用户组ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{user_role_permission.role_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{user_role_permission.role_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role_permission.role_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用户组ID", required = true, allowableValues = "range[1, 64]") private String roleId; + @Schema(title = "权限ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 128]") + @NotBlank(message = "{user_role_permission.permission_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 128, message = "{user_role_permission.permission_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role_permission.permission_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "权限ID", required = true, allowableValues = "range[1, 128]") private String permissionId; + @Schema(title = "功能菜单", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 64]") + @NotBlank(message = "{user_role_permission.module_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 64, message = "{user_role_permission.module_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role_permission.module_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "功能菜单", required = true, allowableValues = "range[1, 64]") private String moduleId; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermissionExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermissionExample.java new file mode 100644 index 0000000000..7da84723e5 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRolePermissionExample.java @@ -0,0 +1,480 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class UserRolePermissionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserRolePermissionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("role_id is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("role_id is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(String value) { + addCriterion("role_id =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(String value) { + addCriterion("role_id <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(String value) { + addCriterion("role_id >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(String value) { + addCriterion("role_id >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(String value) { + addCriterion("role_id <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(String value) { + addCriterion("role_id <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLike(String value) { + addCriterion("role_id like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotLike(String value) { + addCriterion("role_id not like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("role_id in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("role_id not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(String value1, String value2) { + addCriterion("role_id between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(String value1, String value2) { + addCriterion("role_id not between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andPermissionIdIsNull() { + addCriterion("permission_id is null"); + return (Criteria) this; + } + + public Criteria andPermissionIdIsNotNull() { + addCriterion("permission_id is not null"); + return (Criteria) this; + } + + public Criteria andPermissionIdEqualTo(String value) { + addCriterion("permission_id =", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotEqualTo(String value) { + addCriterion("permission_id <>", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdGreaterThan(String value) { + addCriterion("permission_id >", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdGreaterThanOrEqualTo(String value) { + addCriterion("permission_id >=", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdLessThan(String value) { + addCriterion("permission_id <", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdLessThanOrEqualTo(String value) { + addCriterion("permission_id <=", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdLike(String value) { + addCriterion("permission_id like", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotLike(String value) { + addCriterion("permission_id not like", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdIn(List values) { + addCriterion("permission_id in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotIn(List values) { + addCriterion("permission_id not in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdBetween(String value1, String value2) { + addCriterion("permission_id between", value1, value2, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotBetween(String value1, String value2) { + addCriterion("permission_id not between", value1, value2, "permissionId"); + return (Criteria) this; + } + + public Criteria andModuleIdIsNull() { + addCriterion("module_id is null"); + return (Criteria) this; + } + + public Criteria andModuleIdIsNotNull() { + addCriterion("module_id is not null"); + return (Criteria) this; + } + + public Criteria andModuleIdEqualTo(String value) { + addCriterion("module_id =", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotEqualTo(String value) { + addCriterion("module_id <>", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThan(String value) { + addCriterion("module_id >", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThanOrEqualTo(String value) { + addCriterion("module_id >=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThan(String value) { + addCriterion("module_id <", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThanOrEqualTo(String value) { + addCriterion("module_id <=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLike(String value) { + addCriterion("module_id like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotLike(String value) { + addCriterion("module_id not like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdIn(List values) { + addCriterion("module_id in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotIn(List values) { + addCriterion("module_id not in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdBetween(String value1, String value2) { + addCriterion("module_id between", value1, value2, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotBetween(String value1, String value2) { + addCriterion("module_id not between", value1, value2, "moduleId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 b09eda3531..b817f2d118 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,50 +1,40 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "用户组关系") -@Table("user_role_relation") @Data public class UserRoleRelation implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{user_role_relation.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "用户组关系ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "用户组关系ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_role_relation.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{user_role_relation.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_role_relation.user_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{user_role_relation.user_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role_relation.user_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用户ID", required = true, allowableValues = "range[1, 50]") private String userId; + @Schema(title = "组ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_role_relation.role_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{user_role_relation.role_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role_relation.role_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "组ID", required = true, allowableValues = "range[1, 50]") private String roleId; + @Schema(title = "工作空间或项目ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{user_role_relation.source_id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{user_role_relation.source_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{user_role_relation.source_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "工作空间或项目ID", required = true, allowableValues = "range[1, 50]") private String sourceId; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelationExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelationExample.java new file mode 100644 index 0000000000..5743834197 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserRoleRelationExample.java @@ -0,0 +1,600 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class UserRoleRelationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public UserRoleRelationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNull() { + addCriterion("role_id is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("role_id is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(String value) { + addCriterion("role_id =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(String value) { + addCriterion("role_id <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(String value) { + addCriterion("role_id >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(String value) { + addCriterion("role_id >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(String value) { + addCriterion("role_id <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(String value) { + addCriterion("role_id <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLike(String value) { + addCriterion("role_id like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotLike(String value) { + addCriterion("role_id not like", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("role_id in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("role_id not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(String value1, String value2) { + addCriterion("role_id between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(String value1, String value2) { + addCriterion("role_id not between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNull() { + addCriterion("source_id is null"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNotNull() { + addCriterion("source_id is not null"); + return (Criteria) this; + } + + public Criteria andSourceIdEqualTo(String value) { + addCriterion("source_id =", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotEqualTo(String value) { + addCriterion("source_id <>", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThan(String value) { + addCriterion("source_id >", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThanOrEqualTo(String value) { + addCriterion("source_id >=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThan(String value) { + addCriterion("source_id <", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThanOrEqualTo(String value) { + addCriterion("source_id <=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLike(String value) { + addCriterion("source_id like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotLike(String value) { + addCriterion("source_id not like", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdIn(List values) { + addCriterion("source_id in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotIn(List values) { + addCriterion("source_id not in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdBetween(String value1, String value2) { + addCriterion("source_id between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotBetween(String value1, String value2) { + addCriterion("source_id not between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file 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 d89c69126e..f239700041 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,49 +1,38 @@ package io.metersphere.system.domain; -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; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; +import java.io.Serializable; import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "工作空间") -@Table("workspace") @Data public class Workspace implements Serializable { - private static final long serialVersionUID = 1L; - - @Id - @NotBlank(message = "{workspace.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "工作空间ID", required = true, allowableValues = "range[1, 50]") + @Schema(title = "工作空间ID", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{workspace.id.not_blank}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 50, message = "{workspace.id.length_range}", groups = {Created.class, Updated.class}) private String id; + @Schema(title = "工作空间名称", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 100]") + @NotBlank(message = "{workspace.name.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 100, message = "{workspace.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{workspace.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "工作空间名称", required = true, allowableValues = "range[1, 100]") private String name; - - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, 255]") + @Schema(title = "描述") private String description; - - @ApiModelProperty(name = "创建时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "创建时间") private Long createTime; - - @ApiModelProperty(name = "更新时间", required = true, allowableValues = "range[1, ]") + @Schema(title = "更新时间") private Long updateTime; + @Schema(title = "创建人", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = "range[1, 50]") + @NotBlank(message = "{workspace.create_user.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{workspace.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{workspace.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues = "range[1, 50]") private String createUser; - + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/WorkspaceExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/WorkspaceExample.java new file mode 100644 index 0000000000..d824c4eac7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/WorkspaceExample.java @@ -0,0 +1,600 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class WorkspaceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WorkspaceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/AuthSourceMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/AuthSourceMapper.java new file mode 100644 index 0000000000..8029572b57 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/AuthSourceMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.AuthSource; +import io.metersphere.system.domain.AuthSourceExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface AuthSourceMapper { + long countByExample(AuthSourceExample example); + + int deleteByExample(AuthSourceExample example); + + int deleteByPrimaryKey(String id); + + int insert(AuthSource record); + + int insertSelective(AuthSource record); + + List selectByExampleWithBLOBs(AuthSourceExample example); + + List selectByExample(AuthSourceExample example); + + AuthSource selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") AuthSource record, @Param("example") AuthSourceExample example); + + int updateByExampleWithBLOBs(@Param("record") AuthSource record, @Param("example") AuthSourceExample example); + + int updateByExample(@Param("record") AuthSource record, @Param("example") AuthSourceExample example); + + int updateByPrimaryKeySelective(AuthSource record); + + int updateByPrimaryKeyWithBLOBs(AuthSource record); + + int updateByPrimaryKey(AuthSource record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/AuthSourceMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/AuthSourceMapper.xml new file mode 100644 index 0000000000..f4ddf5a553 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/AuthSourceMapper.xml @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `status`, create_time, update_time, description, `name`, `type` + + + configuration + + + + + + delete from auth_source + where id = #{id,jdbcType=VARCHAR} + + + delete from auth_source + + + + + + insert into auth_source (id, `status`, create_time, + update_time, description, `name`, + `type`, configuration) + values (#{id,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{description,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{type,jdbcType=VARCHAR}, #{configuration,jdbcType=LONGVARBINARY}) + + + insert into auth_source + + + id, + + + `status`, + + + create_time, + + + update_time, + + + description, + + + `name`, + + + `type`, + + + configuration, + + + + + #{id,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{description,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{configuration,jdbcType=LONGVARBINARY}, + + + + + + update auth_source + + + id = #{record.id,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + configuration = #{record.configuration,jdbcType=LONGVARBINARY}, + + + + + + + + update auth_source + set id = #{record.id,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + configuration = #{record.configuration,jdbcType=LONGVARBINARY} + + + + + + update auth_source + set id = #{record.id,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + description = #{record.description,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR} + + + + + + update auth_source + + + `status` = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + description = #{description,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + configuration = #{configuration,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update auth_source + set `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + description = #{description,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + configuration = #{configuration,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update auth_source + set `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + description = #{description,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/LicenseMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/LicenseMapper.java new file mode 100644 index 0000000000..acfb7d1c9d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/LicenseMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.License; +import io.metersphere.system.domain.LicenseExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface LicenseMapper { + long countByExample(LicenseExample example); + + int deleteByExample(LicenseExample example); + + int deleteByPrimaryKey(String id); + + int insert(License record); + + int insertSelective(License record); + + List selectByExampleWithBLOBs(LicenseExample example); + + List selectByExample(LicenseExample example); + + License selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") License record, @Param("example") LicenseExample example); + + int updateByExampleWithBLOBs(@Param("record") License record, @Param("example") LicenseExample example); + + int updateByExample(@Param("record") License record, @Param("example") LicenseExample example); + + int updateByPrimaryKeySelective(License record); + + int updateByPrimaryKeyWithBLOBs(License record); + + int updateByPrimaryKey(License record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/LicenseMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/LicenseMapper.xml new file mode 100644 index 0000000000..2009d1887e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/LicenseMapper.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_time, update_time + + + license_code + + + + + + delete from license + where id = #{id,jdbcType=VARCHAR} + + + delete from license + + + + + + insert into license (id, create_time, update_time, + license_code) + values (#{id,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{licenseCode,jdbcType=LONGVARCHAR}) + + + insert into license + + + id, + + + create_time, + + + update_time, + + + license_code, + + + + + #{id,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{licenseCode,jdbcType=LONGVARCHAR}, + + + + + + update license + + + id = #{record.id,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + license_code = #{record.licenseCode,jdbcType=LONGVARCHAR}, + + + + + + + + update license + set id = #{record.id,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + license_code = #{record.licenseCode,jdbcType=LONGVARCHAR} + + + + + + update license + set id = #{record.id,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update license + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + license_code = #{licenseCode,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update license + set create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + license_code = #{licenseCode,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update license + set create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskBlobMapper.java new file mode 100644 index 0000000000..927e2a5de0 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskBlobMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.MessageTaskBlob; +import io.metersphere.system.domain.MessageTaskBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MessageTaskBlobMapper { + long countByExample(MessageTaskBlobExample example); + + int deleteByExample(MessageTaskBlobExample example); + + int deleteByPrimaryKey(String messageTaskId); + + int insert(MessageTaskBlob record); + + int insertSelective(MessageTaskBlob record); + + List selectByExampleWithBLOBs(MessageTaskBlobExample example); + + List selectByExample(MessageTaskBlobExample example); + + MessageTaskBlob selectByPrimaryKey(String messageTaskId); + + int updateByExampleSelective(@Param("record") MessageTaskBlob record, @Param("example") MessageTaskBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") MessageTaskBlob record, @Param("example") MessageTaskBlobExample example); + + int updateByExample(@Param("record") MessageTaskBlob record, @Param("example") MessageTaskBlobExample example); + + int updateByPrimaryKeySelective(MessageTaskBlob record); + + int updateByPrimaryKeyWithBLOBs(MessageTaskBlob record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskBlobMapper.xml new file mode 100644 index 0000000000..4c5903463e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskBlobMapper.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + message_task_id + + + `template` + + + + + + delete from message_task_blob + where message_task_id = #{messageTaskId,jdbcType=VARCHAR} + + + delete from message_task_blob + + + + + + insert into message_task_blob (message_task_id, `template`) + values (#{messageTaskId,jdbcType=VARCHAR}, #{template,jdbcType=LONGVARCHAR}) + + + insert into message_task_blob + + + message_task_id, + + + `template`, + + + + + #{messageTaskId,jdbcType=VARCHAR}, + + + #{template,jdbcType=LONGVARCHAR}, + + + + + + update message_task_blob + + + message_task_id = #{record.messageTaskId,jdbcType=VARCHAR}, + + + `template` = #{record.template,jdbcType=LONGVARCHAR}, + + + + + + + + update message_task_blob + set message_task_id = #{record.messageTaskId,jdbcType=VARCHAR}, + `template` = #{record.template,jdbcType=LONGVARCHAR} + + + + + + update message_task_blob + set message_task_id = #{record.messageTaskId,jdbcType=VARCHAR} + + + + + + update message_task_blob + + + `template` = #{template,jdbcType=LONGVARCHAR}, + + + where message_task_id = #{messageTaskId,jdbcType=VARCHAR} + + + update message_task_blob + set `template` = #{template,jdbcType=LONGVARCHAR} + where message_task_id = #{messageTaskId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskMapper.java new file mode 100644 index 0000000000..d2d26afc86 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.MessageTask; +import io.metersphere.system.domain.MessageTaskExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface MessageTaskMapper { + long countByExample(MessageTaskExample example); + + int deleteByExample(MessageTaskExample example); + + int deleteByPrimaryKey(String id); + + int insert(MessageTask record); + + int insertSelective(MessageTask record); + + List selectByExample(MessageTaskExample example); + + MessageTask selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") MessageTask record, @Param("example") MessageTaskExample example); + + int updateByExample(@Param("record") MessageTask record, @Param("example") MessageTaskExample example); + + int updateByPrimaryKeySelective(MessageTask record); + + int updateByPrimaryKey(MessageTask record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskMapper.xml new file mode 100644 index 0000000000..3da55773ca --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/MessageTaskMapper.xml @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `type`, event, receiver, task_type, webhook, test_id, create_time, project_id + + + + + delete from message_task + where id = #{id,jdbcType=VARCHAR} + + + delete from message_task + + + + + + insert into message_task (id, `type`, event, + receiver, task_type, webhook, + test_id, create_time, project_id + ) + values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{event,jdbcType=VARCHAR}, + #{receiver,jdbcType=VARCHAR}, #{taskType,jdbcType=VARCHAR}, #{webhook,jdbcType=VARCHAR}, + #{testId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR} + ) + + + insert into message_task + + + id, + + + `type`, + + + event, + + + receiver, + + + task_type, + + + webhook, + + + test_id, + + + create_time, + + + project_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{event,jdbcType=VARCHAR}, + + + #{receiver,jdbcType=VARCHAR}, + + + #{taskType,jdbcType=VARCHAR}, + + + #{webhook,jdbcType=VARCHAR}, + + + #{testId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{projectId,jdbcType=VARCHAR}, + + + + + + update message_task + + + id = #{record.id,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + event = #{record.event,jdbcType=VARCHAR}, + + + receiver = #{record.receiver,jdbcType=VARCHAR}, + + + task_type = #{record.taskType,jdbcType=VARCHAR}, + + + webhook = #{record.webhook,jdbcType=VARCHAR}, + + + test_id = #{record.testId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + + + + + + update message_task + set id = #{record.id,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + event = #{record.event,jdbcType=VARCHAR}, + receiver = #{record.receiver,jdbcType=VARCHAR}, + task_type = #{record.taskType,jdbcType=VARCHAR}, + webhook = #{record.webhook,jdbcType=VARCHAR}, + test_id = #{record.testId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=VARCHAR} + + + + + + update message_task + + + `type` = #{type,jdbcType=VARCHAR}, + + + event = #{event,jdbcType=VARCHAR}, + + + receiver = #{receiver,jdbcType=VARCHAR}, + + + task_type = #{taskType,jdbcType=VARCHAR}, + + + webhook = #{webhook,jdbcType=VARCHAR}, + + + test_id = #{testId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update message_task + set `type` = #{type,jdbcType=VARCHAR}, + event = #{event,jdbcType=VARCHAR}, + receiver = #{receiver,jdbcType=VARCHAR}, + task_type = #{taskType,jdbcType=VARCHAR}, + webhook = #{webhook,jdbcType=VARCHAR}, + test_id = #{testId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NotificationMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NotificationMapper.java new file mode 100644 index 0000000000..b4fd7a156d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NotificationMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.Notification; +import io.metersphere.system.domain.NotificationExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface NotificationMapper { + long countByExample(NotificationExample example); + + int deleteByExample(NotificationExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Notification record); + + int insertSelective(Notification record); + + List selectByExample(NotificationExample example); + + Notification selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Notification record, @Param("example") NotificationExample example); + + int updateByExample(@Param("record") Notification record, @Param("example") NotificationExample example); + + int updateByPrimaryKeySelective(Notification record); + + int updateByPrimaryKey(Notification record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NotificationMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NotificationMapper.xml new file mode 100644 index 0000000000..75669bdd64 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NotificationMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `type`, receiver, title, `status`, create_time, `operator`, `operation`, resource_id, + resource_type, resource_name + + + + + delete from notification + where id = #{id,jdbcType=BIGINT} + + + delete from notification + + + + + + insert into notification (id, `type`, receiver, + title, `status`, create_time, + `operator`, `operation`, resource_id, + resource_type, resource_name) + values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{receiver,jdbcType=VARCHAR}, + #{title,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{operator,jdbcType=VARCHAR}, #{operation,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, + #{resourceType,jdbcType=VARCHAR}, #{resourceName,jdbcType=VARCHAR}) + + + insert into notification + + + id, + + + `type`, + + + receiver, + + + title, + + + `status`, + + + create_time, + + + `operator`, + + + `operation`, + + + resource_id, + + + resource_type, + + + resource_name, + + + + + #{id,jdbcType=BIGINT}, + + + #{type,jdbcType=VARCHAR}, + + + #{receiver,jdbcType=VARCHAR}, + + + #{title,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{operator,jdbcType=VARCHAR}, + + + #{operation,jdbcType=VARCHAR}, + + + #{resourceId,jdbcType=VARCHAR}, + + + #{resourceType,jdbcType=VARCHAR}, + + + #{resourceName,jdbcType=VARCHAR}, + + + + + + update notification + + + id = #{record.id,jdbcType=BIGINT}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + receiver = #{record.receiver,jdbcType=VARCHAR}, + + + title = #{record.title,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + `operator` = #{record.operator,jdbcType=VARCHAR}, + + + `operation` = #{record.operation,jdbcType=VARCHAR}, + + + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + + + resource_type = #{record.resourceType,jdbcType=VARCHAR}, + + + resource_name = #{record.resourceName,jdbcType=VARCHAR}, + + + + + + + + update notification + set id = #{record.id,jdbcType=BIGINT}, + `type` = #{record.type,jdbcType=VARCHAR}, + receiver = #{record.receiver,jdbcType=VARCHAR}, + title = #{record.title,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + `operator` = #{record.operator,jdbcType=VARCHAR}, + `operation` = #{record.operation,jdbcType=VARCHAR}, + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + resource_type = #{record.resourceType,jdbcType=VARCHAR}, + resource_name = #{record.resourceName,jdbcType=VARCHAR} + + + + + + update notification + + + `type` = #{type,jdbcType=VARCHAR}, + + + receiver = #{receiver,jdbcType=VARCHAR}, + + + title = #{title,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + `operator` = #{operator,jdbcType=VARCHAR}, + + + `operation` = #{operation,jdbcType=VARCHAR}, + + + resource_id = #{resourceId,jdbcType=VARCHAR}, + + + resource_type = #{resourceType,jdbcType=VARCHAR}, + + + resource_name = #{resourceName,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update notification + set `type` = #{type,jdbcType=VARCHAR}, + receiver = #{receiver,jdbcType=VARCHAR}, + title = #{title,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + `operator` = #{operator,jdbcType=VARCHAR}, + `operation` = #{operation,jdbcType=VARCHAR}, + resource_id = #{resourceId,jdbcType=VARCHAR}, + resource_type = #{resourceType,jdbcType=VARCHAR}, + resource_name = #{resourceName,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NoviceStatisticsMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NoviceStatisticsMapper.java new file mode 100644 index 0000000000..6816d69a94 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NoviceStatisticsMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.NoviceStatistics; +import io.metersphere.system.domain.NoviceStatisticsExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface NoviceStatisticsMapper { + long countByExample(NoviceStatisticsExample example); + + int deleteByExample(NoviceStatisticsExample example); + + int deleteByPrimaryKey(String id); + + int insert(NoviceStatistics record); + + int insertSelective(NoviceStatistics record); + + List selectByExampleWithBLOBs(NoviceStatisticsExample example); + + List selectByExample(NoviceStatisticsExample example); + + NoviceStatistics selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") NoviceStatistics record, @Param("example") NoviceStatisticsExample example); + + int updateByExampleWithBLOBs(@Param("record") NoviceStatistics record, @Param("example") NoviceStatisticsExample example); + + int updateByExample(@Param("record") NoviceStatistics record, @Param("example") NoviceStatisticsExample example); + + int updateByPrimaryKeySelective(NoviceStatistics record); + + int updateByPrimaryKeyWithBLOBs(NoviceStatistics record); + + int updateByPrimaryKey(NoviceStatistics record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NoviceStatisticsMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NoviceStatisticsMapper.xml new file mode 100644 index 0000000000..42539b3ba6 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/NoviceStatisticsMapper.xml @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, guide_step, guide_num, create_time, update_time + + + data_option + + + + + + delete from novice_statistics + where id = #{id,jdbcType=VARCHAR} + + + delete from novice_statistics + + + + + + insert into novice_statistics (id, user_id, guide_step, + guide_num, create_time, update_time, + data_option) + values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{guideStep,jdbcType=BIT}, + #{guideNum,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{dataOption,jdbcType=LONGVARBINARY}) + + + insert into novice_statistics + + + id, + + + user_id, + + + guide_step, + + + guide_num, + + + create_time, + + + update_time, + + + data_option, + + + + + #{id,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + #{guideStep,jdbcType=BIT}, + + + #{guideNum,jdbcType=INTEGER}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{dataOption,jdbcType=LONGVARBINARY}, + + + + + + update novice_statistics + + + id = #{record.id,jdbcType=VARCHAR}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + guide_step = #{record.guideStep,jdbcType=BIT}, + + + guide_num = #{record.guideNum,jdbcType=INTEGER}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + data_option = #{record.dataOption,jdbcType=LONGVARBINARY}, + + + + + + + + update novice_statistics + set id = #{record.id,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + guide_step = #{record.guideStep,jdbcType=BIT}, + guide_num = #{record.guideNum,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + data_option = #{record.dataOption,jdbcType=LONGVARBINARY} + + + + + + update novice_statistics + set id = #{record.id,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + guide_step = #{record.guideStep,jdbcType=BIT}, + guide_num = #{record.guideNum,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update novice_statistics + + + user_id = #{userId,jdbcType=VARCHAR}, + + + guide_step = #{guideStep,jdbcType=BIT}, + + + guide_num = #{guideNum,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + data_option = #{dataOption,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update novice_statistics + set user_id = #{userId,jdbcType=VARCHAR}, + guide_step = #{guideStep,jdbcType=BIT}, + guide_num = #{guideNum,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + data_option = #{dataOption,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update novice_statistics + set user_id = #{userId,jdbcType=VARCHAR}, + guide_step = #{guideStep,jdbcType=BIT}, + guide_num = #{guideNum,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogMapper.java new file mode 100644 index 0000000000..7aab0f8328 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.OperatingLog; +import io.metersphere.system.domain.OperatingLogExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface OperatingLogMapper { + long countByExample(OperatingLogExample example); + + int deleteByExample(OperatingLogExample example); + + int deleteByPrimaryKey(String id); + + int insert(OperatingLog record); + + int insertSelective(OperatingLog record); + + List selectByExampleWithBLOBs(OperatingLogExample example); + + List selectByExample(OperatingLogExample example); + + OperatingLog selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") OperatingLog record, @Param("example") OperatingLogExample example); + + int updateByExampleWithBLOBs(@Param("record") OperatingLog record, @Param("example") OperatingLogExample example); + + int updateByExample(@Param("record") OperatingLog record, @Param("example") OperatingLogExample example); + + int updateByPrimaryKeySelective(OperatingLog record); + + int updateByPrimaryKeyWithBLOBs(OperatingLog record); + + int updateByPrimaryKey(OperatingLog record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogMapper.xml new file mode 100644 index 0000000000..cd95518689 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogMapper.xml @@ -0,0 +1,392 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, oper_method, create_user, oper_user, source_id, oper_type, oper_module, + oper_title, oper_path, oper_time + + + oper_content, oper_params + + + + + + delete from operating_log + where id = #{id,jdbcType=VARCHAR} + + + delete from operating_log + + + + + + insert into operating_log (id, project_id, oper_method, + create_user, oper_user, source_id, + oper_type, oper_module, oper_title, + oper_path, oper_time, oper_content, + oper_params) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{operMethod,jdbcType=VARCHAR}, + #{createUser,jdbcType=VARCHAR}, #{operUser,jdbcType=VARCHAR}, #{sourceId,jdbcType=VARCHAR}, + #{operType,jdbcType=VARCHAR}, #{operModule,jdbcType=VARCHAR}, #{operTitle,jdbcType=VARCHAR}, + #{operPath,jdbcType=VARCHAR}, #{operTime,jdbcType=BIGINT}, #{operContent,jdbcType=LONGVARBINARY}, + #{operParams,jdbcType=LONGVARBINARY}) + + + insert into operating_log + + + id, + + + project_id, + + + oper_method, + + + create_user, + + + oper_user, + + + source_id, + + + oper_type, + + + oper_module, + + + oper_title, + + + oper_path, + + + oper_time, + + + oper_content, + + + oper_params, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{operMethod,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{operUser,jdbcType=VARCHAR}, + + + #{sourceId,jdbcType=VARCHAR}, + + + #{operType,jdbcType=VARCHAR}, + + + #{operModule,jdbcType=VARCHAR}, + + + #{operTitle,jdbcType=VARCHAR}, + + + #{operPath,jdbcType=VARCHAR}, + + + #{operTime,jdbcType=BIGINT}, + + + #{operContent,jdbcType=LONGVARBINARY}, + + + #{operParams,jdbcType=LONGVARBINARY}, + + + + + + update operating_log + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + oper_method = #{record.operMethod,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + oper_user = #{record.operUser,jdbcType=VARCHAR}, + + + source_id = #{record.sourceId,jdbcType=VARCHAR}, + + + oper_type = #{record.operType,jdbcType=VARCHAR}, + + + oper_module = #{record.operModule,jdbcType=VARCHAR}, + + + oper_title = #{record.operTitle,jdbcType=VARCHAR}, + + + oper_path = #{record.operPath,jdbcType=VARCHAR}, + + + oper_time = #{record.operTime,jdbcType=BIGINT}, + + + oper_content = #{record.operContent,jdbcType=LONGVARBINARY}, + + + oper_params = #{record.operParams,jdbcType=LONGVARBINARY}, + + + + + + + + update operating_log + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + oper_method = #{record.operMethod,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + oper_user = #{record.operUser,jdbcType=VARCHAR}, + source_id = #{record.sourceId,jdbcType=VARCHAR}, + oper_type = #{record.operType,jdbcType=VARCHAR}, + oper_module = #{record.operModule,jdbcType=VARCHAR}, + oper_title = #{record.operTitle,jdbcType=VARCHAR}, + oper_path = #{record.operPath,jdbcType=VARCHAR}, + oper_time = #{record.operTime,jdbcType=BIGINT}, + oper_content = #{record.operContent,jdbcType=LONGVARBINARY}, + oper_params = #{record.operParams,jdbcType=LONGVARBINARY} + + + + + + update operating_log + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + oper_method = #{record.operMethod,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + oper_user = #{record.operUser,jdbcType=VARCHAR}, + source_id = #{record.sourceId,jdbcType=VARCHAR}, + oper_type = #{record.operType,jdbcType=VARCHAR}, + oper_module = #{record.operModule,jdbcType=VARCHAR}, + oper_title = #{record.operTitle,jdbcType=VARCHAR}, + oper_path = #{record.operPath,jdbcType=VARCHAR}, + oper_time = #{record.operTime,jdbcType=BIGINT} + + + + + + update operating_log + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + oper_method = #{operMethod,jdbcType=VARCHAR}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + oper_user = #{operUser,jdbcType=VARCHAR}, + + + source_id = #{sourceId,jdbcType=VARCHAR}, + + + oper_type = #{operType,jdbcType=VARCHAR}, + + + oper_module = #{operModule,jdbcType=VARCHAR}, + + + oper_title = #{operTitle,jdbcType=VARCHAR}, + + + oper_path = #{operPath,jdbcType=VARCHAR}, + + + oper_time = #{operTime,jdbcType=BIGINT}, + + + oper_content = #{operContent,jdbcType=LONGVARBINARY}, + + + oper_params = #{operParams,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update operating_log + set project_id = #{projectId,jdbcType=VARCHAR}, + oper_method = #{operMethod,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + oper_user = #{operUser,jdbcType=VARCHAR}, + source_id = #{sourceId,jdbcType=VARCHAR}, + oper_type = #{operType,jdbcType=VARCHAR}, + oper_module = #{operModule,jdbcType=VARCHAR}, + oper_title = #{operTitle,jdbcType=VARCHAR}, + oper_path = #{operPath,jdbcType=VARCHAR}, + oper_time = #{operTime,jdbcType=BIGINT}, + oper_content = #{operContent,jdbcType=LONGVARBINARY}, + oper_params = #{operParams,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update operating_log + set project_id = #{projectId,jdbcType=VARCHAR}, + oper_method = #{operMethod,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + oper_user = #{operUser,jdbcType=VARCHAR}, + source_id = #{sourceId,jdbcType=VARCHAR}, + oper_type = #{operType,jdbcType=VARCHAR}, + oper_module = #{operModule,jdbcType=VARCHAR}, + oper_title = #{operTitle,jdbcType=VARCHAR}, + oper_path = #{operPath,jdbcType=VARCHAR}, + oper_time = #{operTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogResourceMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogResourceMapper.java new file mode 100644 index 0000000000..b7bc154a3e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogResourceMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.OperatingLogResource; +import io.metersphere.system.domain.OperatingLogResourceExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface OperatingLogResourceMapper { + long countByExample(OperatingLogResourceExample example); + + int deleteByExample(OperatingLogResourceExample example); + + int deleteByPrimaryKey(String id); + + int insert(OperatingLogResource record); + + int insertSelective(OperatingLogResource record); + + List selectByExample(OperatingLogResourceExample example); + + OperatingLogResource selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") OperatingLogResource record, @Param("example") OperatingLogResourceExample example); + + int updateByExample(@Param("record") OperatingLogResource record, @Param("example") OperatingLogResourceExample example); + + int updateByPrimaryKeySelective(OperatingLogResource record); + + int updateByPrimaryKey(OperatingLogResource record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogResourceMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogResourceMapper.xml new file mode 100644 index 0000000000..b974822dc4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OperatingLogResourceMapper.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, operating_log_id, source_id + + + + + delete from operating_log_resource + where id = #{id,jdbcType=VARCHAR} + + + delete from operating_log_resource + + + + + + insert into operating_log_resource (id, operating_log_id, source_id + ) + values (#{id,jdbcType=VARCHAR}, #{operatingLogId,jdbcType=VARCHAR}, #{sourceId,jdbcType=VARCHAR} + ) + + + insert into operating_log_resource + + + id, + + + operating_log_id, + + + source_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{operatingLogId,jdbcType=VARCHAR}, + + + #{sourceId,jdbcType=VARCHAR}, + + + + + + update operating_log_resource + + + id = #{record.id,jdbcType=VARCHAR}, + + + operating_log_id = #{record.operatingLogId,jdbcType=VARCHAR}, + + + source_id = #{record.sourceId,jdbcType=VARCHAR}, + + + + + + + + update operating_log_resource + set id = #{record.id,jdbcType=VARCHAR}, + operating_log_id = #{record.operatingLogId,jdbcType=VARCHAR}, + source_id = #{record.sourceId,jdbcType=VARCHAR} + + + + + + update operating_log_resource + + + operating_log_id = #{operatingLogId,jdbcType=VARCHAR}, + + + source_id = #{sourceId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update operating_log_resource + set operating_log_id = #{operatingLogId,jdbcType=VARCHAR}, + source_id = #{sourceId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginBlobMapper.java new file mode 100644 index 0000000000..5341d0c9d3 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginBlobMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.PluginBlob; +import io.metersphere.system.domain.PluginBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface PluginBlobMapper { + long countByExample(PluginBlobExample example); + + int deleteByExample(PluginBlobExample example); + + int deleteByPrimaryKey(String pluginId); + + int insert(PluginBlob record); + + int insertSelective(PluginBlob record); + + List selectByExampleWithBLOBs(PluginBlobExample example); + + List selectByExample(PluginBlobExample example); + + PluginBlob selectByPrimaryKey(String pluginId); + + int updateByExampleSelective(@Param("record") PluginBlob record, @Param("example") PluginBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") PluginBlob record, @Param("example") PluginBlobExample example); + + int updateByExample(@Param("record") PluginBlob record, @Param("example") PluginBlobExample example); + + int updateByPrimaryKeySelective(PluginBlob record); + + int updateByPrimaryKeyWithBLOBs(PluginBlob record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginBlobMapper.xml new file mode 100644 index 0000000000..dd568082a4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginBlobMapper.xml @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + plugin_id + + + form_option, form_script + + + + + + delete from plugin_blob + where plugin_id = #{pluginId,jdbcType=VARCHAR} + + + delete from plugin_blob + + + + + + insert into plugin_blob (plugin_id, form_option, form_script + ) + values (#{pluginId,jdbcType=VARCHAR}, #{formOption,jdbcType=LONGVARBINARY}, #{formScript,jdbcType=LONGVARBINARY} + ) + + + insert into plugin_blob + + + plugin_id, + + + form_option, + + + form_script, + + + + + #{pluginId,jdbcType=VARCHAR}, + + + #{formOption,jdbcType=LONGVARBINARY}, + + + #{formScript,jdbcType=LONGVARBINARY}, + + + + + + update plugin_blob + + + plugin_id = #{record.pluginId,jdbcType=VARCHAR}, + + + form_option = #{record.formOption,jdbcType=LONGVARBINARY}, + + + form_script = #{record.formScript,jdbcType=LONGVARBINARY}, + + + + + + + + update plugin_blob + set plugin_id = #{record.pluginId,jdbcType=VARCHAR}, + form_option = #{record.formOption,jdbcType=LONGVARBINARY}, + form_script = #{record.formScript,jdbcType=LONGVARBINARY} + + + + + + update plugin_blob + set plugin_id = #{record.pluginId,jdbcType=VARCHAR} + + + + + + update plugin_blob + + + form_option = #{formOption,jdbcType=LONGVARBINARY}, + + + form_script = #{formScript,jdbcType=LONGVARBINARY}, + + + where plugin_id = #{pluginId,jdbcType=VARCHAR} + + + update plugin_blob + set form_option = #{formOption,jdbcType=LONGVARBINARY}, + form_script = #{formScript,jdbcType=LONGVARBINARY} + where plugin_id = #{pluginId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginMapper.java new file mode 100644 index 0000000000..83b3c96803 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.Plugin; +import io.metersphere.system.domain.PluginExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface PluginMapper { + long countByExample(PluginExample example); + + int deleteByExample(PluginExample example); + + int deleteByPrimaryKey(String id); + + int insert(Plugin record); + + int insertSelective(Plugin record); + + List selectByExample(PluginExample example); + + Plugin selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Plugin record, @Param("example") PluginExample example); + + int updateByExample(@Param("record") Plugin record, @Param("example") PluginExample example); + + int updateByPrimaryKeySelective(Plugin record); + + int updateByPrimaryKey(Plugin record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginMapper.xml new file mode 100644 index 0000000000..5920ab45d0 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/PluginMapper.xml @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, plugin_id, script_id, clazz_name, jmeter_clazz, source_path, source_name, + exec_entry, create_time, update_time, create_user, xpack, scenario + + + + + delete from plugin + where id = #{id,jdbcType=VARCHAR} + + + delete from plugin + + + + + + insert into plugin (id, `name`, plugin_id, + script_id, clazz_name, jmeter_clazz, + source_path, source_name, exec_entry, + create_time, update_time, create_user, + xpack, scenario) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pluginId,jdbcType=VARCHAR}, + #{scriptId,jdbcType=VARCHAR}, #{clazzName,jdbcType=VARCHAR}, #{jmeterClazz,jdbcType=VARCHAR}, + #{sourcePath,jdbcType=VARCHAR}, #{sourceName,jdbcType=VARCHAR}, #{execEntry,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{xpack,jdbcType=BIT}, #{scenario,jdbcType=VARCHAR}) + + + insert into plugin + + + id, + + + `name`, + + + plugin_id, + + + script_id, + + + clazz_name, + + + jmeter_clazz, + + + source_path, + + + source_name, + + + exec_entry, + + + create_time, + + + update_time, + + + create_user, + + + xpack, + + + scenario, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{pluginId,jdbcType=VARCHAR}, + + + #{scriptId,jdbcType=VARCHAR}, + + + #{clazzName,jdbcType=VARCHAR}, + + + #{jmeterClazz,jdbcType=VARCHAR}, + + + #{sourcePath,jdbcType=VARCHAR}, + + + #{sourceName,jdbcType=VARCHAR}, + + + #{execEntry,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{xpack,jdbcType=BIT}, + + + #{scenario,jdbcType=VARCHAR}, + + + + + + update plugin + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + plugin_id = #{record.pluginId,jdbcType=VARCHAR}, + + + script_id = #{record.scriptId,jdbcType=VARCHAR}, + + + clazz_name = #{record.clazzName,jdbcType=VARCHAR}, + + + jmeter_clazz = #{record.jmeterClazz,jdbcType=VARCHAR}, + + + source_path = #{record.sourcePath,jdbcType=VARCHAR}, + + + source_name = #{record.sourceName,jdbcType=VARCHAR}, + + + exec_entry = #{record.execEntry,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + xpack = #{record.xpack,jdbcType=BIT}, + + + scenario = #{record.scenario,jdbcType=VARCHAR}, + + + + + + + + update plugin + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + plugin_id = #{record.pluginId,jdbcType=VARCHAR}, + script_id = #{record.scriptId,jdbcType=VARCHAR}, + clazz_name = #{record.clazzName,jdbcType=VARCHAR}, + jmeter_clazz = #{record.jmeterClazz,jdbcType=VARCHAR}, + source_path = #{record.sourcePath,jdbcType=VARCHAR}, + source_name = #{record.sourceName,jdbcType=VARCHAR}, + exec_entry = #{record.execEntry,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + xpack = #{record.xpack,jdbcType=BIT}, + scenario = #{record.scenario,jdbcType=VARCHAR} + + + + + + update plugin + + + `name` = #{name,jdbcType=VARCHAR}, + + + plugin_id = #{pluginId,jdbcType=VARCHAR}, + + + script_id = #{scriptId,jdbcType=VARCHAR}, + + + clazz_name = #{clazzName,jdbcType=VARCHAR}, + + + jmeter_clazz = #{jmeterClazz,jdbcType=VARCHAR}, + + + source_path = #{sourcePath,jdbcType=VARCHAR}, + + + source_name = #{sourceName,jdbcType=VARCHAR}, + + + exec_entry = #{execEntry,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + xpack = #{xpack,jdbcType=BIT}, + + + scenario = #{scenario,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update plugin + set `name` = #{name,jdbcType=VARCHAR}, + plugin_id = #{pluginId,jdbcType=VARCHAR}, + script_id = #{scriptId,jdbcType=VARCHAR}, + clazz_name = #{clazzName,jdbcType=VARCHAR}, + jmeter_clazz = #{jmeterClazz,jdbcType=VARCHAR}, + source_path = #{sourcePath,jdbcType=VARCHAR}, + source_name = #{sourceName,jdbcType=VARCHAR}, + exec_entry = #{execEntry,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + xpack = #{xpack,jdbcType=BIT}, + scenario = #{scenario,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.java new file mode 100644 index 0000000000..de407ff7c3 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.Quota; +import io.metersphere.system.domain.QuotaExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface QuotaMapper { + long countByExample(QuotaExample example); + + int deleteByExample(QuotaExample example); + + int deleteByPrimaryKey(String id); + + int insert(Quota record); + + int insertSelective(Quota record); + + List selectByExample(QuotaExample example); + + Quota selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Quota record, @Param("example") QuotaExample example); + + int updateByExample(@Param("record") Quota record, @Param("example") QuotaExample example); + + int updateByPrimaryKeySelective(Quota record); + + int updateByPrimaryKey(Quota record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.xml new file mode 100644 index 0000000000..84ccfc5975 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.xml @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, api, performance, max_threads, duration, resource_pool, workspace_id, use_default, + update_time, `member`, project, project_id, vum_total, vum_used + + + + + delete from quota + where id = #{id,jdbcType=VARCHAR} + + + delete from quota + + + + + + insert into quota (id, api, performance, + max_threads, duration, resource_pool, + workspace_id, use_default, update_time, + `member`, project, project_id, + vum_total, vum_used) + values (#{id,jdbcType=VARCHAR}, #{api,jdbcType=INTEGER}, #{performance,jdbcType=INTEGER}, + #{maxThreads,jdbcType=INTEGER}, #{duration,jdbcType=INTEGER}, #{resourcePool,jdbcType=VARCHAR}, + #{workspaceId,jdbcType=VARCHAR}, #{useDefault,jdbcType=BIT}, #{updateTime,jdbcType=BIGINT}, + #{member,jdbcType=INTEGER}, #{project,jdbcType=INTEGER}, #{projectId,jdbcType=VARCHAR}, + #{vumTotal,jdbcType=DECIMAL}, #{vumUsed,jdbcType=DECIMAL}) + + + insert into quota + + + id, + + + api, + + + performance, + + + max_threads, + + + duration, + + + resource_pool, + + + workspace_id, + + + use_default, + + + update_time, + + + `member`, + + + project, + + + project_id, + + + vum_total, + + + vum_used, + + + + + #{id,jdbcType=VARCHAR}, + + + #{api,jdbcType=INTEGER}, + + + #{performance,jdbcType=INTEGER}, + + + #{maxThreads,jdbcType=INTEGER}, + + + #{duration,jdbcType=INTEGER}, + + + #{resourcePool,jdbcType=VARCHAR}, + + + #{workspaceId,jdbcType=VARCHAR}, + + + #{useDefault,jdbcType=BIT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{member,jdbcType=INTEGER}, + + + #{project,jdbcType=INTEGER}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{vumTotal,jdbcType=DECIMAL}, + + + #{vumUsed,jdbcType=DECIMAL}, + + + + + + update quota + + + id = #{record.id,jdbcType=VARCHAR}, + + + api = #{record.api,jdbcType=INTEGER}, + + + performance = #{record.performance,jdbcType=INTEGER}, + + + max_threads = #{record.maxThreads,jdbcType=INTEGER}, + + + duration = #{record.duration,jdbcType=INTEGER}, + + + resource_pool = #{record.resourcePool,jdbcType=VARCHAR}, + + + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + + + use_default = #{record.useDefault,jdbcType=BIT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + `member` = #{record.member,jdbcType=INTEGER}, + + + project = #{record.project,jdbcType=INTEGER}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + vum_total = #{record.vumTotal,jdbcType=DECIMAL}, + + + vum_used = #{record.vumUsed,jdbcType=DECIMAL}, + + + + + + + + update quota + set id = #{record.id,jdbcType=VARCHAR}, + api = #{record.api,jdbcType=INTEGER}, + performance = #{record.performance,jdbcType=INTEGER}, + max_threads = #{record.maxThreads,jdbcType=INTEGER}, + duration = #{record.duration,jdbcType=INTEGER}, + resource_pool = #{record.resourcePool,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + use_default = #{record.useDefault,jdbcType=BIT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + `member` = #{record.member,jdbcType=INTEGER}, + project = #{record.project,jdbcType=INTEGER}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + vum_total = #{record.vumTotal,jdbcType=DECIMAL}, + vum_used = #{record.vumUsed,jdbcType=DECIMAL} + + + + + + update quota + + + api = #{api,jdbcType=INTEGER}, + + + performance = #{performance,jdbcType=INTEGER}, + + + max_threads = #{maxThreads,jdbcType=INTEGER}, + + + duration = #{duration,jdbcType=INTEGER}, + + + resource_pool = #{resourcePool,jdbcType=VARCHAR}, + + + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + + + use_default = #{useDefault,jdbcType=BIT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + `member` = #{member,jdbcType=INTEGER}, + + + project = #{project,jdbcType=INTEGER}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + vum_total = #{vumTotal,jdbcType=DECIMAL}, + + + vum_used = #{vumUsed,jdbcType=DECIMAL}, + + + where id = #{id,jdbcType=VARCHAR} + + + update quota + set api = #{api,jdbcType=INTEGER}, + performance = #{performance,jdbcType=INTEGER}, + max_threads = #{maxThreads,jdbcType=INTEGER}, + duration = #{duration,jdbcType=INTEGER}, + resource_pool = #{resourcePool,jdbcType=VARCHAR}, + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + use_default = #{useDefault,jdbcType=BIT}, + update_time = #{updateTime,jdbcType=BIGINT}, + `member` = #{member,jdbcType=INTEGER}, + project = #{project,jdbcType=INTEGER}, + project_id = #{projectId,jdbcType=VARCHAR}, + vum_total = #{vumTotal,jdbcType=DECIMAL}, + vum_used = #{vumUsed,jdbcType=DECIMAL} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ScheduleMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ScheduleMapper.java new file mode 100644 index 0000000000..5c9c668496 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ScheduleMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.Schedule; +import io.metersphere.system.domain.ScheduleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ScheduleMapper { + long countByExample(ScheduleExample example); + + int deleteByExample(ScheduleExample example); + + int deleteByPrimaryKey(String id); + + int insert(Schedule record); + + int insertSelective(Schedule record); + + List selectByExample(ScheduleExample example); + + Schedule selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Schedule record, @Param("example") ScheduleExample example); + + int updateByExample(@Param("record") Schedule record, @Param("example") ScheduleExample example); + + int updateByPrimaryKeySelective(Schedule record); + + int updateByPrimaryKey(Schedule record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ScheduleMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ScheduleMapper.xml new file mode 100644 index 0000000000..33597f18d4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ScheduleMapper.xml @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `key`, `type`, `value`, job, `enable`, resource_id, create_user, create_time, + update_time, project_id, `name`, config + + + + + delete from schedule + where id = #{id,jdbcType=VARCHAR} + + + delete from schedule + + + + + + insert into schedule (id, `key`, `type`, + `value`, job, `enable`, resource_id, + create_user, create_time, update_time, + project_id, `name`, config + ) + values (#{id,jdbcType=VARCHAR}, #{key,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{value,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{enable,jdbcType=BIT}, #{resourceId,jdbcType=VARCHAR}, + #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{config,jdbcType=VARCHAR} + ) + + + insert into schedule + + + id, + + + `key`, + + + `type`, + + + `value`, + + + job, + + + `enable`, + + + resource_id, + + + create_user, + + + create_time, + + + update_time, + + + project_id, + + + `name`, + + + config, + + + + + #{id,jdbcType=VARCHAR}, + + + #{key,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{value,jdbcType=VARCHAR}, + + + #{job,jdbcType=VARCHAR}, + + + #{enable,jdbcType=BIT}, + + + #{resourceId,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{config,jdbcType=VARCHAR}, + + + + + + update schedule + + + id = #{record.id,jdbcType=VARCHAR}, + + + `key` = #{record.key,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + `value` = #{record.value,jdbcType=VARCHAR}, + + + job = #{record.job,jdbcType=VARCHAR}, + + + `enable` = #{record.enable,jdbcType=BIT}, + + + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + config = #{record.config,jdbcType=VARCHAR}, + + + + + + + + update schedule + set id = #{record.id,jdbcType=VARCHAR}, + `key` = #{record.key,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + `value` = #{record.value,jdbcType=VARCHAR}, + job = #{record.job,jdbcType=VARCHAR}, + `enable` = #{record.enable,jdbcType=BIT}, + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + config = #{record.config,jdbcType=VARCHAR} + + + + + + update schedule + + + `key` = #{key,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + `value` = #{value,jdbcType=VARCHAR}, + + + job = #{job,jdbcType=VARCHAR}, + + + `enable` = #{enable,jdbcType=BIT}, + + + resource_id = #{resourceId,jdbcType=VARCHAR}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + config = #{config,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update schedule + set `key` = #{key,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + `value` = #{value,jdbcType=VARCHAR}, + job = #{job,jdbcType=VARCHAR}, + `enable` = #{enable,jdbcType=BIT}, + resource_id = #{resourceId,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + config = #{config,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ServiceIntegrationMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ServiceIntegrationMapper.java new file mode 100644 index 0000000000..efc798377f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ServiceIntegrationMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.ServiceIntegration; +import io.metersphere.system.domain.ServiceIntegrationExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ServiceIntegrationMapper { + long countByExample(ServiceIntegrationExample example); + + int deleteByExample(ServiceIntegrationExample example); + + int deleteByPrimaryKey(String id); + + int insert(ServiceIntegration record); + + int insertSelective(ServiceIntegration record); + + List selectByExampleWithBLOBs(ServiceIntegrationExample example); + + List selectByExample(ServiceIntegrationExample example); + + ServiceIntegration selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ServiceIntegration record, @Param("example") ServiceIntegrationExample example); + + int updateByExampleWithBLOBs(@Param("record") ServiceIntegration record, @Param("example") ServiceIntegrationExample example); + + int updateByExample(@Param("record") ServiceIntegration record, @Param("example") ServiceIntegrationExample example); + + int updateByPrimaryKeySelective(ServiceIntegration record); + + int updateByPrimaryKeyWithBLOBs(ServiceIntegration record); + + int updateByPrimaryKey(ServiceIntegration record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ServiceIntegrationMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ServiceIntegrationMapper.xml new file mode 100644 index 0000000000..dca95f5198 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ServiceIntegrationMapper.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, platform, workspace_id + + + configuration + + + + + + delete from service_integration + where id = #{id,jdbcType=VARCHAR} + + + delete from service_integration + + + + + + insert into service_integration (id, platform, workspace_id, + configuration) + values (#{id,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, + #{configuration,jdbcType=LONGVARBINARY}) + + + insert into service_integration + + + id, + + + platform, + + + workspace_id, + + + configuration, + + + + + #{id,jdbcType=VARCHAR}, + + + #{platform,jdbcType=VARCHAR}, + + + #{workspaceId,jdbcType=VARCHAR}, + + + #{configuration,jdbcType=LONGVARBINARY}, + + + + + + update service_integration + + + id = #{record.id,jdbcType=VARCHAR}, + + + platform = #{record.platform,jdbcType=VARCHAR}, + + + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + + + configuration = #{record.configuration,jdbcType=LONGVARBINARY}, + + + + + + + + update service_integration + set id = #{record.id,jdbcType=VARCHAR}, + platform = #{record.platform,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + configuration = #{record.configuration,jdbcType=LONGVARBINARY} + + + + + + update service_integration + set id = #{record.id,jdbcType=VARCHAR}, + platform = #{record.platform,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR} + + + + + + update service_integration + + + platform = #{platform,jdbcType=VARCHAR}, + + + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + + + configuration = #{configuration,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update service_integration + set platform = #{platform,jdbcType=VARCHAR}, + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + configuration = #{configuration,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update service_integration + set platform = #{platform,jdbcType=VARCHAR}, + workspace_id = #{workspaceId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/SystemParameterMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/SystemParameterMapper.java new file mode 100644 index 0000000000..55f01c4977 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/SystemParameterMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.SystemParameter; +import io.metersphere.system.domain.SystemParameterExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SystemParameterMapper { + long countByExample(SystemParameterExample example); + + int deleteByExample(SystemParameterExample example); + + int deleteByPrimaryKey(String paramKey); + + int insert(SystemParameter record); + + int insertSelective(SystemParameter record); + + List selectByExample(SystemParameterExample example); + + SystemParameter selectByPrimaryKey(String paramKey); + + int updateByExampleSelective(@Param("record") SystemParameter record, @Param("example") SystemParameterExample example); + + int updateByExample(@Param("record") SystemParameter record, @Param("example") SystemParameterExample example); + + int updateByPrimaryKeySelective(SystemParameter record); + + int updateByPrimaryKey(SystemParameter record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/SystemParameterMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/SystemParameterMapper.xml new file mode 100644 index 0000000000..61bf10222b --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/SystemParameterMapper.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + param_key, param_value, `type` + + + + + delete from system_parameter + where param_key = #{paramKey,jdbcType=VARCHAR} + + + delete from system_parameter + + + + + + insert into system_parameter (param_key, param_value, `type` + ) + values (#{paramKey,jdbcType=VARCHAR}, #{paramValue,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR} + ) + + + insert into system_parameter + + + param_key, + + + param_value, + + + `type`, + + + + + #{paramKey,jdbcType=VARCHAR}, + + + #{paramValue,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + + + + update system_parameter + + + param_key = #{record.paramKey,jdbcType=VARCHAR}, + + + param_value = #{record.paramValue,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + + + + + + update system_parameter + set param_key = #{record.paramKey,jdbcType=VARCHAR}, + param_value = #{record.paramValue,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR} + + + + + + update system_parameter + + + param_value = #{paramValue,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + where param_key = #{paramKey,jdbcType=VARCHAR} + + + update system_parameter + set param_value = #{paramValue,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR} + where param_key = #{paramKey,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourceMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourceMapper.java new file mode 100644 index 0000000000..1185a195e1 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourceMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.TestResource; +import io.metersphere.system.domain.TestResourceExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestResourceMapper { + long countByExample(TestResourceExample example); + + int deleteByExample(TestResourceExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestResource record); + + int insertSelective(TestResource record); + + List selectByExampleWithBLOBs(TestResourceExample example); + + List selectByExample(TestResourceExample example); + + TestResource selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestResource record, @Param("example") TestResourceExample example); + + int updateByExampleWithBLOBs(@Param("record") TestResource record, @Param("example") TestResourceExample example); + + int updateByExample(@Param("record") TestResource record, @Param("example") TestResourceExample example); + + int updateByPrimaryKeySelective(TestResource record); + + int updateByPrimaryKeyWithBLOBs(TestResource record); + + int updateByPrimaryKey(TestResource record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourceMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourceMapper.xml new file mode 100644 index 0000000000..7a3bef2845 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourceMapper.xml @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, test_resource_pool_id, `status`, create_time, update_time + + + configuration + + + + + + delete from test_resource + where id = #{id,jdbcType=VARCHAR} + + + delete from test_resource + + + + + + insert into test_resource (id, test_resource_pool_id, `status`, + create_time, update_time, configuration + ) + values (#{id,jdbcType=VARCHAR}, #{testResourcePoolId,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{configuration,jdbcType=LONGVARBINARY} + ) + + + insert into test_resource + + + id, + + + test_resource_pool_id, + + + `status`, + + + create_time, + + + update_time, + + + configuration, + + + + + #{id,jdbcType=VARCHAR}, + + + #{testResourcePoolId,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{configuration,jdbcType=LONGVARBINARY}, + + + + + + update test_resource + + + id = #{record.id,jdbcType=VARCHAR}, + + + test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + configuration = #{record.configuration,jdbcType=LONGVARBINARY}, + + + + + + + + update test_resource + set id = #{record.id,jdbcType=VARCHAR}, + test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + configuration = #{record.configuration,jdbcType=LONGVARBINARY} + + + + + + update test_resource + set id = #{record.id,jdbcType=VARCHAR}, + test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update test_resource + + + test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + configuration = #{configuration,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_resource + set test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + configuration = #{configuration,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update test_resource + set test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourcePoolMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourcePoolMapper.java new file mode 100644 index 0000000000..74f78ac89f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourcePoolMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.TestResourcePool; +import io.metersphere.system.domain.TestResourcePoolExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestResourcePoolMapper { + long countByExample(TestResourcePoolExample example); + + int deleteByExample(TestResourcePoolExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestResourcePool record); + + int insertSelective(TestResourcePool record); + + List selectByExample(TestResourcePoolExample example); + + TestResourcePool selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestResourcePool record, @Param("example") TestResourcePoolExample example); + + int updateByExample(@Param("record") TestResourcePool record, @Param("example") TestResourcePoolExample example); + + int updateByPrimaryKeySelective(TestResourcePool record); + + int updateByPrimaryKey(TestResourcePool record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourcePoolMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourcePoolMapper.xml new file mode 100644 index 0000000000..3ff6c2e318 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TestResourcePoolMapper.xml @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, `type`, description, `status`, create_time, update_time, image, `heap`, + gc_algo, create_user, api, performance + + + + + delete from test_resource_pool + where id = #{id,jdbcType=VARCHAR} + + + delete from test_resource_pool + + + + + + insert into test_resource_pool (id, `name`, `type`, + description, `status`, create_time, + update_time, image, `heap`, + gc_algo, create_user, api, + performance) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{image,jdbcType=VARCHAR}, #{heap,jdbcType=VARCHAR}, + #{gcAlgo,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{api,jdbcType=BIT}, + #{performance,jdbcType=BIT}) + + + insert into test_resource_pool + + + id, + + + `name`, + + + `type`, + + + description, + + + `status`, + + + create_time, + + + update_time, + + + image, + + + `heap`, + + + gc_algo, + + + create_user, + + + api, + + + performance, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{image,jdbcType=VARCHAR}, + + + #{heap,jdbcType=VARCHAR}, + + + #{gcAlgo,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{api,jdbcType=BIT}, + + + #{performance,jdbcType=BIT}, + + + + + + update test_resource_pool + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + image = #{record.image,jdbcType=VARCHAR}, + + + `heap` = #{record.heap,jdbcType=VARCHAR}, + + + gc_algo = #{record.gcAlgo,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + api = #{record.api,jdbcType=BIT}, + + + performance = #{record.performance,jdbcType=BIT}, + + + + + + + + update test_resource_pool + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + image = #{record.image,jdbcType=VARCHAR}, + `heap` = #{record.heap,jdbcType=VARCHAR}, + gc_algo = #{record.gcAlgo,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + api = #{record.api,jdbcType=BIT}, + performance = #{record.performance,jdbcType=BIT} + + + + + + update test_resource_pool + + + `name` = #{name,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + image = #{image,jdbcType=VARCHAR}, + + + `heap` = #{heap,jdbcType=VARCHAR}, + + + gc_algo = #{gcAlgo,jdbcType=VARCHAR}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + api = #{api,jdbcType=BIT}, + + + performance = #{performance,jdbcType=BIT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_resource_pool + set `name` = #{name,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + image = #{image,jdbcType=VARCHAR}, + `heap` = #{heap,jdbcType=VARCHAR}, + gc_algo = #{gcAlgo,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + api = #{api,jdbcType=BIT}, + performance = #{performance,jdbcType=BIT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserExtendMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserExtendMapper.java new file mode 100644 index 0000000000..5e902539bd --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserExtendMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.UserExtend; +import io.metersphere.system.domain.UserExtendExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface UserExtendMapper { + long countByExample(UserExtendExample example); + + int deleteByExample(UserExtendExample example); + + int deleteByPrimaryKey(String userId); + + int insert(UserExtend record); + + int insertSelective(UserExtend record); + + List selectByExampleWithBLOBs(UserExtendExample example); + + List selectByExample(UserExtendExample example); + + UserExtend selectByPrimaryKey(String userId); + + int updateByExampleSelective(@Param("record") UserExtend record, @Param("example") UserExtendExample example); + + int updateByExampleWithBLOBs(@Param("record") UserExtend record, @Param("example") UserExtendExample example); + + int updateByExample(@Param("record") UserExtend record, @Param("example") UserExtendExample example); + + int updateByPrimaryKeySelective(UserExtend record); + + int updateByPrimaryKeyWithBLOBs(UserExtend record); + + int updateByPrimaryKey(UserExtend record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserExtendMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserExtendMapper.xml new file mode 100644 index 0000000000..997bb82113 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserExtendMapper.xml @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + user_id, selenium_server + + + platform_info + + + + + + delete from user_extend + where user_id = #{userId,jdbcType=VARCHAR} + + + delete from user_extend + + + + + + insert into user_extend (user_id, selenium_server, platform_info + ) + values (#{userId,jdbcType=VARCHAR}, #{seleniumServer,jdbcType=VARCHAR}, #{platformInfo,jdbcType=LONGVARBINARY} + ) + + + insert into user_extend + + + user_id, + + + selenium_server, + + + platform_info, + + + + + #{userId,jdbcType=VARCHAR}, + + + #{seleniumServer,jdbcType=VARCHAR}, + + + #{platformInfo,jdbcType=LONGVARBINARY}, + + + + + + update user_extend + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + selenium_server = #{record.seleniumServer,jdbcType=VARCHAR}, + + + platform_info = #{record.platformInfo,jdbcType=LONGVARBINARY}, + + + + + + + + update user_extend + set user_id = #{record.userId,jdbcType=VARCHAR}, + selenium_server = #{record.seleniumServer,jdbcType=VARCHAR}, + platform_info = #{record.platformInfo,jdbcType=LONGVARBINARY} + + + + + + update user_extend + set user_id = #{record.userId,jdbcType=VARCHAR}, + selenium_server = #{record.seleniumServer,jdbcType=VARCHAR} + + + + + + update user_extend + + + selenium_server = #{seleniumServer,jdbcType=VARCHAR}, + + + platform_info = #{platformInfo,jdbcType=LONGVARBINARY}, + + + where user_id = #{userId,jdbcType=VARCHAR} + + + update user_extend + set selenium_server = #{seleniumServer,jdbcType=VARCHAR}, + platform_info = #{platformInfo,jdbcType=LONGVARBINARY} + where user_id = #{userId,jdbcType=VARCHAR} + + + update user_extend + set selenium_server = #{seleniumServer,jdbcType=VARCHAR} + where user_id = #{userId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserKeyMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserKeyMapper.java new file mode 100644 index 0000000000..6c8b266c6c --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserKeyMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.UserKey; +import io.metersphere.system.domain.UserKeyExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface UserKeyMapper { + long countByExample(UserKeyExample example); + + int deleteByExample(UserKeyExample example); + + int deleteByPrimaryKey(String id); + + int insert(UserKey record); + + int insertSelective(UserKey record); + + List selectByExample(UserKeyExample example); + + UserKey selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") UserKey record, @Param("example") UserKeyExample example); + + int updateByExample(@Param("record") UserKey record, @Param("example") UserKeyExample example); + + int updateByPrimaryKeySelective(UserKey record); + + int updateByPrimaryKey(UserKey record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserKeyMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserKeyMapper.xml new file mode 100644 index 0000000000..37058e09af --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserKeyMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_user, access_key, secret_key, create_time, `status` + + + + + delete from user_key + where id = #{id,jdbcType=VARCHAR} + + + delete from user_key + + + + + + insert into user_key (id, create_user, access_key, + secret_key, create_time, `status` + ) + values (#{id,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{accessKey,jdbcType=VARCHAR}, + #{secretKey,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR} + ) + + + insert into user_key + + + id, + + + create_user, + + + access_key, + + + secret_key, + + + create_time, + + + `status`, + + + + + #{id,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{accessKey,jdbcType=VARCHAR}, + + + #{secretKey,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{status,jdbcType=VARCHAR}, + + + + + + update user_key + + + id = #{record.id,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + access_key = #{record.accessKey,jdbcType=VARCHAR}, + + + secret_key = #{record.secretKey,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + + + + + + update user_key + set id = #{record.id,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + access_key = #{record.accessKey,jdbcType=VARCHAR}, + secret_key = #{record.secretKey,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + `status` = #{record.status,jdbcType=VARCHAR} + + + + + + update user_key + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + access_key = #{accessKey,jdbcType=VARCHAR}, + + + secret_key = #{secretKey,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update user_key + set create_user = #{createUser,jdbcType=VARCHAR}, + access_key = #{accessKey,jdbcType=VARCHAR}, + secret_key = #{secretKey,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + `status` = #{status,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserMapper.java new file mode 100644 index 0000000000..6aefbb9d80 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.User; +import io.metersphere.system.domain.UserExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface UserMapper { + long countByExample(UserExample example); + + int deleteByExample(UserExample example); + + int deleteByPrimaryKey(String id); + + int insert(User record); + + int insertSelective(User record); + + List selectByExample(UserExample example); + + User selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example); + + int updateByExample(@Param("record") User record, @Param("example") UserExample example); + + int updateByPrimaryKeySelective(User record); + + int updateByPrimaryKey(User record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserMapper.xml new file mode 100644 index 0000000000..027ad62248 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserMapper.xml @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, email, `password`, `status`, create_time, update_time, `language`, last_workspace_id, + phone, `source`, last_project_id, create_user + + + + + delete from user + where id = #{id,jdbcType=VARCHAR} + + + delete from user + + + + + + insert into user (id, `name`, email, + `password`, `status`, create_time, + update_time, `language`, last_workspace_id, + phone, `source`, last_project_id, + create_user) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, + #{password,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{language,jdbcType=VARCHAR}, #{lastWorkspaceId,jdbcType=VARCHAR}, + #{phone,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{lastProjectId,jdbcType=VARCHAR}, + #{createUser,jdbcType=VARCHAR}) + + + insert into user + + + id, + + + `name`, + + + email, + + + `password`, + + + `status`, + + + create_time, + + + update_time, + + + `language`, + + + last_workspace_id, + + + phone, + + + `source`, + + + last_project_id, + + + create_user, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{email,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{language,jdbcType=VARCHAR}, + + + #{lastWorkspaceId,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{source,jdbcType=VARCHAR}, + + + #{lastProjectId,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + + + + update user + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + email = #{record.email,jdbcType=VARCHAR}, + + + `password` = #{record.password,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + `language` = #{record.language,jdbcType=VARCHAR}, + + + last_workspace_id = #{record.lastWorkspaceId,jdbcType=VARCHAR}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + `source` = #{record.source,jdbcType=VARCHAR}, + + + last_project_id = #{record.lastProjectId,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + + + + + + update user + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + email = #{record.email,jdbcType=VARCHAR}, + `password` = #{record.password,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + `language` = #{record.language,jdbcType=VARCHAR}, + last_workspace_id = #{record.lastWorkspaceId,jdbcType=VARCHAR}, + phone = #{record.phone,jdbcType=VARCHAR}, + `source` = #{record.source,jdbcType=VARCHAR}, + last_project_id = #{record.lastProjectId,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR} + + + + + + update user + + + `name` = #{name,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + `password` = #{password,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + `language` = #{language,jdbcType=VARCHAR}, + + + last_workspace_id = #{lastWorkspaceId,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + `source` = #{source,jdbcType=VARCHAR}, + + + last_project_id = #{lastProjectId,jdbcType=VARCHAR}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update user + set `name` = #{name,jdbcType=VARCHAR}, + email = #{email,jdbcType=VARCHAR}, + `password` = #{password,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + `language` = #{language,jdbcType=VARCHAR}, + last_workspace_id = #{lastWorkspaceId,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + `source` = #{source,jdbcType=VARCHAR}, + last_project_id = #{lastProjectId,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleMapper.java new file mode 100644 index 0000000000..2c9207790f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.UserRole; +import io.metersphere.system.domain.UserRoleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface UserRoleMapper { + long countByExample(UserRoleExample example); + + int deleteByExample(UserRoleExample example); + + int deleteByPrimaryKey(String id); + + int insert(UserRole record); + + int insertSelective(UserRole record); + + List selectByExample(UserRoleExample example); + + UserRole selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") UserRole record, @Param("example") UserRoleExample example); + + int updateByExample(@Param("record") UserRole record, @Param("example") UserRoleExample example); + + int updateByPrimaryKeySelective(UserRole record); + + int updateByPrimaryKey(UserRole record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleMapper.xml new file mode 100644 index 0000000000..6936bcc3ad --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleMapper.xml @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, description, `system`, `type`, create_time, update_time, create_user, + scope_id + + + + + delete from user_role + where id = #{id,jdbcType=VARCHAR} + + + delete from user_role + + + + + + insert into user_role (id, `name`, description, + `system`, `type`, create_time, + update_time, create_user, scope_id + ) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{system,jdbcType=BIT}, #{type,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, #{scopeId,jdbcType=VARCHAR} + ) + + + insert into user_role + + + id, + + + `name`, + + + description, + + + `system`, + + + `type`, + + + create_time, + + + update_time, + + + create_user, + + + scope_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{system,jdbcType=BIT}, + + + #{type,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{scopeId,jdbcType=VARCHAR}, + + + + + + update user_role + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + `system` = #{record.system,jdbcType=BIT}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + scope_id = #{record.scopeId,jdbcType=VARCHAR}, + + + + + + + + update user_role + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + `system` = #{record.system,jdbcType=BIT}, + `type` = #{record.type,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + scope_id = #{record.scopeId,jdbcType=VARCHAR} + + + + + + update user_role + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + `system` = #{system,jdbcType=BIT}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + scope_id = #{scopeId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update user_role + set `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + `system` = #{system,jdbcType=BIT}, + `type` = #{type,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + scope_id = #{scopeId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRolePermissionMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRolePermissionMapper.java new file mode 100644 index 0000000000..178d4da89d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRolePermissionMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.UserRolePermission; +import io.metersphere.system.domain.UserRolePermissionExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface UserRolePermissionMapper { + long countByExample(UserRolePermissionExample example); + + int deleteByExample(UserRolePermissionExample example); + + int deleteByPrimaryKey(String id); + + int insert(UserRolePermission record); + + int insertSelective(UserRolePermission record); + + List selectByExample(UserRolePermissionExample example); + + UserRolePermission selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") UserRolePermission record, @Param("example") UserRolePermissionExample example); + + int updateByExample(@Param("record") UserRolePermission record, @Param("example") UserRolePermissionExample example); + + int updateByPrimaryKeySelective(UserRolePermission record); + + int updateByPrimaryKey(UserRolePermission record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRolePermissionMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRolePermissionMapper.xml new file mode 100644 index 0000000000..88902b7dd6 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRolePermissionMapper.xml @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, role_id, permission_id, module_id + + + + + delete from user_role_permission + where id = #{id,jdbcType=VARCHAR} + + + delete from user_role_permission + + + + + + insert into user_role_permission (id, role_id, permission_id, + module_id) + values (#{id,jdbcType=VARCHAR}, #{roleId,jdbcType=VARCHAR}, #{permissionId,jdbcType=VARCHAR}, + #{moduleId,jdbcType=VARCHAR}) + + + insert into user_role_permission + + + id, + + + role_id, + + + permission_id, + + + module_id, + + + + + #{id,jdbcType=VARCHAR}, + + + #{roleId,jdbcType=VARCHAR}, + + + #{permissionId,jdbcType=VARCHAR}, + + + #{moduleId,jdbcType=VARCHAR}, + + + + + + update user_role_permission + + + id = #{record.id,jdbcType=VARCHAR}, + + + role_id = #{record.roleId,jdbcType=VARCHAR}, + + + permission_id = #{record.permissionId,jdbcType=VARCHAR}, + + + module_id = #{record.moduleId,jdbcType=VARCHAR}, + + + + + + + + update user_role_permission + set id = #{record.id,jdbcType=VARCHAR}, + role_id = #{record.roleId,jdbcType=VARCHAR}, + permission_id = #{record.permissionId,jdbcType=VARCHAR}, + module_id = #{record.moduleId,jdbcType=VARCHAR} + + + + + + update user_role_permission + + + role_id = #{roleId,jdbcType=VARCHAR}, + + + permission_id = #{permissionId,jdbcType=VARCHAR}, + + + module_id = #{moduleId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update user_role_permission + set role_id = #{roleId,jdbcType=VARCHAR}, + permission_id = #{permissionId,jdbcType=VARCHAR}, + module_id = #{moduleId,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleRelationMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleRelationMapper.java new file mode 100644 index 0000000000..dc5c970cd0 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleRelationMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.UserRoleRelation; +import io.metersphere.system.domain.UserRoleRelationExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface UserRoleRelationMapper { + long countByExample(UserRoleRelationExample example); + + int deleteByExample(UserRoleRelationExample example); + + int deleteByPrimaryKey(String id); + + int insert(UserRoleRelation record); + + int insertSelective(UserRoleRelation record); + + List selectByExample(UserRoleRelationExample example); + + UserRoleRelation selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") UserRoleRelation record, @Param("example") UserRoleRelationExample example); + + int updateByExample(@Param("record") UserRoleRelation record, @Param("example") UserRoleRelationExample example); + + int updateByPrimaryKeySelective(UserRoleRelation record); + + int updateByPrimaryKey(UserRoleRelation record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleRelationMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleRelationMapper.xml new file mode 100644 index 0000000000..ef148d35b2 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/UserRoleRelationMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, role_id, source_id, create_time, update_time + + + + + delete from user_role_relation + where id = #{id,jdbcType=VARCHAR} + + + delete from user_role_relation + + + + + + insert into user_role_relation (id, user_id, role_id, + source_id, create_time, update_time + ) + values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{roleId,jdbcType=VARCHAR}, + #{sourceId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT} + ) + + + insert into user_role_relation + + + id, + + + user_id, + + + role_id, + + + source_id, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + #{roleId,jdbcType=VARCHAR}, + + + #{sourceId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update user_role_relation + + + id = #{record.id,jdbcType=VARCHAR}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + role_id = #{record.roleId,jdbcType=VARCHAR}, + + + source_id = #{record.sourceId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update user_role_relation + set id = #{record.id,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR}, + role_id = #{record.roleId,jdbcType=VARCHAR}, + source_id = #{record.sourceId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update user_role_relation + + + user_id = #{userId,jdbcType=VARCHAR}, + + + role_id = #{roleId,jdbcType=VARCHAR}, + + + source_id = #{sourceId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update user_role_relation + set user_id = #{userId,jdbcType=VARCHAR}, + role_id = #{roleId,jdbcType=VARCHAR}, + source_id = #{sourceId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/WorkspaceMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/WorkspaceMapper.java new file mode 100644 index 0000000000..d22166743f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/WorkspaceMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.Workspace; +import io.metersphere.system.domain.WorkspaceExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface WorkspaceMapper { + long countByExample(WorkspaceExample example); + + int deleteByExample(WorkspaceExample example); + + int deleteByPrimaryKey(String id); + + int insert(Workspace record); + + int insertSelective(Workspace record); + + List selectByExample(WorkspaceExample example); + + Workspace selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Workspace record, @Param("example") WorkspaceExample example); + + int updateByExample(@Param("record") Workspace record, @Param("example") WorkspaceExample example); + + int updateByPrimaryKeySelective(Workspace record); + + int updateByPrimaryKey(Workspace record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/WorkspaceMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/WorkspaceMapper.xml new file mode 100644 index 0000000000..cc0eccf56b --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/WorkspaceMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, description, create_time, update_time, create_user + + + + + delete from workspace + where id = #{id,jdbcType=VARCHAR} + + + delete from workspace + + + + + + insert into workspace (id, `name`, description, + create_time, update_time, create_user + ) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR} + ) + + + insert into workspace + + + id, + + + `name`, + + + description, + + + create_time, + + + update_time, + + + create_user, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + + + + update workspace + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + + + + + + update workspace + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR} + + + + + + update workspace + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update workspace + set `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file 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 deleted file mode 100644 index 4c2ae1b50c..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommand.java +++ /dev/null @@ -1,149 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "自定义指令") -@Table("ui_custom_command") -@Data -public class UiCustomCommand implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_custom_command.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "场景ID", required = true, allowableValues="range[1, 255]") - private String id; - - @Size(min = 1, max = 50, message = "{ui_custom_command.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - - - @ApiModelProperty(name = "标签", required = false, allowableValues="range[1, 2000]") - private String tags; - - @Size(min = 1, max = 64, message = "{ui_custom_command.module_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.module_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块ID", required = true, allowableValues="range[1, 64]") - private String moduleId; - - @Size(min = 1, max = 1000, message = "{ui_custom_command.module_path.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.module_path.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块路径", required = true, allowableValues="range[1, 1000]") - private String modulePath; - - @Size(min = 1, max = 255, message = "{ui_custom_command.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景名称", required = true, allowableValues="range[1, 255]") - private String name; - - @Size(min = 1, max = 100, message = "{ui_custom_command.level.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.level.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用例等级", required = true, allowableValues="range[1, 100]") - private String level; - - @Size(min = 1, max = 100, message = "{ui_custom_command.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "状态", required = true, allowableValues="range[1, 100]") - private String status; - - @Size(min = 1, max = 100, message = "{ui_custom_command.principal.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.principal.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "责任人", required = true, allowableValues="range[1, 100]") - private String principal; - - - @ApiModelProperty(name = "步骤总数", required = true, dataType = "Integer") - private Integer stepTotal; - - - @ApiModelProperty(name = "定时任务的表达式", required = false, allowableValues="range[1, 255]") - private String schedule; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") - private Long updateTime; - - - @ApiModelProperty(name = "通过率", required = false, allowableValues="range[1, 100]") - private String passRate; - - - @ApiModelProperty(name = "最后执行结果", required = false, allowableValues="range[1, 100]") - private String lastResult; - - - @ApiModelProperty(name = "最后执行结果的报告ID", required = false, allowableValues="range[1, 50]") - private String reportId; - - - @ApiModelProperty(name = "num", required = true, dataType = "Integer") - private Integer num; - - @Size(min = 1, max = 1, message = "{ui_custom_command.deleted.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.deleted.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "删除状态", required = true, allowableValues="range[1, 1]") - private Boolean deleted; - - - @ApiModelProperty(name = "自定义num", required = false, allowableValues="range[1, 64]") - private String customNum; - - @Size(min = 1, max = 100, message = "{ui_custom_command.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 100]") - private String createUser; - - - @ApiModelProperty(name = "删除时间", required = false, dataType = "Long") - private Long deleteTime; - - - @ApiModelProperty(name = "删除人", required = false, allowableValues="range[1, 64]") - private String deleteUser; - - - @ApiModelProperty(name = "执行次数", required = false, dataType = "Integer") - private Integer executeTimes; - - - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") - private Long pos; - - - @ApiModelProperty(name = "环境类型(环境,环境组)", required = false, allowableValues="range[1, 20]") - private String environmentType; - - - @ApiModelProperty(name = "环境组ID", required = false, allowableValues="range[1, 50]") - private String environmentGroupId; - - @Size(min = 1, max = 50, message = "{ui_custom_command.version_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.version_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "版本ID", required = true, allowableValues="range[1, 50]") - private String versionId; - - @Size(min = 1, max = 255, message = "{ui_custom_command.ref_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.ref_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "指向初始版本ID", required = true, allowableValues="range[1, 255]") - private String refId; - - @Size(min = 1, max = 1, message = "{ui_custom_command.latest.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command.latest.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否为最新版本 0:否,1:是", required = true, allowableValues="range[1, 1]") - private Boolean latest; - - -} \ No newline at end of file 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 deleted file mode 100644 index 8fe651fc35..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java +++ /dev/null @@ -1,44 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; - -@ApiModel(value = "自定义指令大字段") -@Table("ui_custom_command_blob") -@Data -@EqualsAndHashCode(callSuper=false) -public class UiCustomCommandBlob implements Serializable { - private static final long serialVersionUID = 1L; - @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; - - - @ApiModelProperty(name = "场景定义", required = false, allowableValues="range[1, ]") - private byte[] scenarioDefinition; - - - @ApiModelProperty(name = "描述", required = false, allowableValues="range[1, ]") - private byte[] description; - - - @ApiModelProperty(name = "环境", required = false, allowableValues="range[1, ]") - private byte[] environmentJson; - - - @ApiModelProperty(name = "自定义结构", required = false, allowableValues="range[1, 255]") - private byte[] commandViewStruct; - - -} \ No newline at end of file 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 deleted file mode 100644 index 36d99513a2..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java +++ /dev/null @@ -1,62 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "自定义指令模块") -@Table("ui_custom_command_module") -@Data -public class UiCustomCommandModule implements Serializable { - private static final long serialVersionUID = 1L; - @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; - - @Size(min = 1, max = 50, message = "{ui_custom_command_module.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command_module.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - - @Size(min = 1, max = 64, message = "{ui_custom_command_module.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command_module.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块名称", required = true, allowableValues="range[1, 64]") - private String name; - - @Size(min = 1, max = 50, message = "{ui_custom_command_module.parent_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command_module.parent_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "父级ID", required = true, allowableValues="range[1, 50]") - private String parentId; - - - @ApiModelProperty(name = "模块等级", required = true, dataType = "Integer") - private Integer level; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") - private Long updateTime; - - @Size(min = 1, max = 22, message = "{ui_custom_command_module.pos.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command_module.pos.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "自定义排序", required = true, allowableValues="range[1, 22]") - private Double pos; - - @Size(min = 1, max = 100, message = "{ui_custom_command_module.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_custom_command_module.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 100]") - private String createUser; - - -} \ No newline at end of file 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 deleted file mode 100644 index 0e2a28249d..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElement.java +++ /dev/null @@ -1,95 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "元素") -@Table("ui_element") -@Data -public class UiElement implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_element.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "元素id", required = true, allowableValues="range[1, 50]") - private String id; - - - @ApiModelProperty(name = "元素num", required = true, dataType = "Integer") - private Integer num; - - @Size(min = 1, max = 50, message = "{ui_element.module_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.module_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "元素所属模块id", required = true, allowableValues="range[1, 50]") - private String moduleId; - - @Size(min = 1, max = 50, message = "{ui_element.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目id", required = true, allowableValues="range[1, 50]") - private String projectId; - - @Size(min = 1, max = 255, message = "{ui_element.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "名称", required = true, allowableValues="range[1, 255]") - private String name; - - @Size(min = 1, max = 30, message = "{ui_element.location_type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.location_type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "定位类型", required = true, allowableValues="range[1, 30]") - private String locationType; - - @Size(min = 1, max = 300, message = "{ui_element.location.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.location.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "元素定位", required = true, allowableValues="range[1, 300]") - private String location; - - @Size(min = 1, max = 100, message = "{ui_element.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 100]") - private String createUser; - - @Size(min = 1, max = 100, message = "{ui_element.update_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.update_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "更新人", required = true, allowableValues="range[1, 100]") - private String updateUser; - - @Size(min = 1, max = 50, message = "{ui_element.version_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.version_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "版本ID", required = true, allowableValues="range[1, 50]") - private String versionId; - - @Size(min = 1, max = 50, message = "{ui_element.ref_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.ref_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "指向初始版本ID", required = true, allowableValues="range[1, 50]") - private String refId; - - - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") - private Long pos; - - @Size(min = 1, max = 1, message = "{ui_element.latest.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element.latest.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否为最新版本 0:否,1:是", required = true, allowableValues="range[1, 1]") - private Boolean latest; - - - @ApiModelProperty(name = "元素描述", required = false, allowableValues="range[1, 1000]") - private String description; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") - private Long updateTime; - - -} \ No newline at end of file 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 deleted file mode 100644 index bbfc506e31..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementModule.java +++ /dev/null @@ -1,62 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "元素模块") -@Table("ui_element_module") -@Data -public class UiElementModule implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_element_module.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "模块ID", required = true, allowableValues="range[1, 50]") - private String id; - - @Size(min = 1, max = 50, message = "{ui_element_module.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element_module.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - - @Size(min = 1, max = 64, message = "{ui_element_module.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element_module.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块名称", required = true, allowableValues="range[1, 64]") - private String name; - - @Size(min = 1, max = 50, message = "{ui_element_module.parent_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element_module.parent_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "父级ID", required = true, allowableValues="range[1, 50]") - private String parentId; - - - @ApiModelProperty(name = "模块等级", required = true, dataType = "Integer") - private Integer level; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") - private Long updateTime; - - @Size(min = 1, max = 22, message = "{ui_element_module.pos.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element_module.pos.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "自定义排序", required = true, allowableValues="range[1, 22]") - private Double pos; - - @Size(min = 1, max = 100, message = "{ui_element_module.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element_module.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 100]") - private String createUser; - - -} \ No newline at end of file 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 deleted file mode 100644 index 9527122830..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiElementReference.java +++ /dev/null @@ -1,45 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "元素关系表") -@Table("ui_element_reference") -@Data -public class UiElementReference implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_element_reference.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") - private String id; - - @Size(min = 1, max = 255, message = "{ui_element_reference.element_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element_reference.element_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "元素ID", required = true, allowableValues="range[1, 255]") - private String elementId; - - @Size(min = 1, max = 255, message = "{ui_element_reference.element_module_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element_reference.element_module_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "元素模块ID", required = true, allowableValues="range[1, 255]") - private String elementModuleId; - - @Size(min = 1, max = 255, message = "{ui_element_reference.scenario_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element_reference.scenario_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景ID", required = true, allowableValues="range[1, 255]") - private String scenarioId; - - @Size(min = 1, max = 50, message = "{ui_element_reference.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_element_reference.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - - -} \ No newline at end of file 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 deleted file mode 100644 index c7df5eacd4..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenario.java +++ /dev/null @@ -1,145 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "场景") -@Table("ui_scenario") -@Data -public class UiScenario implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_scenario.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "场景ID", required = true, allowableValues="range[1, 255]") - private String id; - - @Size(min = 1, max = 50, message = "{ui_scenario.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - - - @ApiModelProperty(name = "标签", required = false, allowableValues="range[1, 2000]") - private String tags; - - @Size(min = 1, max = 64, message = "{ui_scenario.module_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.module_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块ID", required = true, allowableValues="range[1, 64]") - private String moduleId; - - @Size(min = 1, max = 1000, message = "{ui_scenario.module_path.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.module_path.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块路径", required = true, allowableValues="range[1, 1000]") - private String modulePath; - - @Size(min = 1, max = 255, message = "{ui_scenario.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景名称", required = true, allowableValues="range[1, 255]") - private String name; - - @Size(min = 1, max = 100, message = "{ui_scenario.level.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.level.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "用例等级", required = true, allowableValues="range[1, 100]") - private String level; - - @Size(min = 1, max = 100, message = "{ui_scenario.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "状态", required = true, allowableValues="range[1, 100]") - private String status; - - @Size(min = 1, max = 100, message = "{ui_scenario.principal.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.principal.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "责任人", required = true, allowableValues="range[1, 100]") - private String principal; - - - @ApiModelProperty(name = "步骤总数", required = true, dataType = "Integer") - private Integer stepTotal; - - - @ApiModelProperty(name = "定时任务的表达式", required = false, allowableValues="range[1, 255]") - private String schedule; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") - private Long updateTime; - - - @ApiModelProperty(name = "最后执行结果", required = false, allowableValues="range[1, 100]") - private String lastResult; - - - @ApiModelProperty(name = "最后执行结果的报告ID", required = false, allowableValues="range[1, 50]") - private String reportId; - - - @ApiModelProperty(name = "num", required = true, dataType = "Integer") - private Integer num; - - @Size(min = 1, max = 1, message = "{ui_scenario.deleted.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.deleted.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "删除状态", required = true, allowableValues="range[1, 1]") - private Boolean deleted; - - - @ApiModelProperty(name = "自定义num", required = false, allowableValues="range[1, 64]") - private String customNum; - - @Size(min = 1, max = 100, message = "{ui_scenario.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 100]") - private String createUser; - - - @ApiModelProperty(name = "删除时间", required = false, dataType = "Long") - private Long deleteTime; - - - @ApiModelProperty(name = "删除人", required = false, allowableValues="range[1, 64]") - private String deleteUser; - - - @ApiModelProperty(name = "执行次数", required = true, dataType = "Integer") - private Integer executeTimes; - - - @ApiModelProperty(name = "自定义排序,间隔5000", required = true, dataType = "Long") - private Long pos; - - - @ApiModelProperty(name = "环境类型(环境,环境组)", required = false, allowableValues="range[1, 20]") - private String environmentType; - - - @ApiModelProperty(name = "环境组ID", required = false, allowableValues="range[1, 50]") - private String environmentGroupId; - - @Size(min = 1, max = 50, message = "{ui_scenario.version_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.version_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "版本ID", required = true, allowableValues="range[1, 50]") - private String versionId; - - @Size(min = 1, max = 255, message = "{ui_scenario.ref_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.ref_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "指向初始版本ID", required = true, allowableValues="range[1, 255]") - private String refId; - - @Size(min = 1, max = 1, message = "{ui_scenario.latest.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario.latest.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "是否为最新版本 0:否,1:是", required = true, allowableValues="range[1, 1]") - private Boolean latest; - - -} \ No newline at end of file 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 deleted file mode 100644 index 79e76890f7..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioBlob.java +++ /dev/null @@ -1,40 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; - -@ApiModel(value = "场景大字段") -@Table("ui_scenario_blob") -@Data -@EqualsAndHashCode(callSuper=false) -public class UiScenarioBlob implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_scenario_blob.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "场景ID", required = true, allowableValues = "range[1, 50]") - private String id; - - - @ApiModelProperty(name = "场景定义", required = false, allowableValues = "range[1, ]") - private byte[] scenarioDefinition; - - - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, ]") - private byte[] description; - - - @ApiModelProperty(name = "环境", required = false, allowableValues = "range[1, ]") - private byte[] environmentJson; - - -} \ No newline at end of file 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 deleted file mode 100644 index fdc2fbbf64..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioExecutionInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "执行步骤基础信息(待讨论)") -@Table("ui_scenario_execution_info") -@Data -public class UiScenarioExecutionInfo implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_scenario_execution_info.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "", required = true, allowableValues="range[1, 50]") - private String id; - - @Size(min = 1, max = 255, message = "{ui_scenario_execution_info.source_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_execution_info.source_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "api scenario id", required = true, allowableValues="range[1, 255]") - private String sourceId; - - @Size(min = 1, max = 50, message = "{ui_scenario_execution_info.result.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_execution_info.result.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "", required = true, allowableValues="range[1, 50]") - private String result; - - - @ApiModelProperty(name = "", required = false, allowableValues="range[1, 50]") - private String triggerMode; - - - @ApiModelProperty(name = "Create timestamp", required = true, dataType = "Long") - private Long createTime; - - -} \ No newline at end of file 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 deleted file mode 100644 index e990e0853b..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioModule.java +++ /dev/null @@ -1,62 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "场景模块") -@Table("ui_scenario_module") -@Data -public class UiScenarioModule implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_scenario_module.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "模块ID", required = true, allowableValues="range[1, 50]") - private String id; - - @Size(min = 1, max = 50, message = "{ui_scenario_module.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_module.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - - @Size(min = 1, max = 64, message = "{ui_scenario_module.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_module.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "模块名称", required = true, allowableValues="range[1, 64]") - private String name; - - @Size(min = 1, max = 50, message = "{ui_scenario_module.parent_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_module.parent_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "父级ID", required = true, allowableValues="range[1, 50]") - private String parentId; - - - @ApiModelProperty(name = "模块等级", required = true, dataType = "Integer") - private Integer level; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") - private Long updateTime; - - @Size(min = 1, max = 22, message = "{ui_scenario_module.pos.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_module.pos.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "自定义排序", required = true, allowableValues="range[1, 22]") - private Double pos; - - @Size(min = 1, max = 100, message = "{ui_scenario_module.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_module.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 100]") - private String createUser; - - -} \ No newline at end of file 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 deleted file mode 100644 index 1437d04713..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReference.java +++ /dev/null @@ -1,49 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "场景引用关系") -@Table("ui_scenario_reference") -@Data -public class UiScenarioReference implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_scenario_reference.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "ID", required = true, allowableValues="range[1, 50]") - private String id; - - @Size(min = 1, max = 255, message = "{ui_scenario_reference.ui_scenario_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_reference.ui_scenario_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "场景ID", required = true, allowableValues="range[1, 255]") - private String uiScenarioId; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - @Size(min = 1, max = 64, message = "{ui_scenario_reference.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_reference.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 64]") - private String createUser; - - @Size(min = 1, max = 255, message = "{ui_scenario_reference.reference_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_reference.reference_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "被引用的ID", required = true, allowableValues="range[1, 255]") - private String referenceId; - - @Size(min = 1, max = 255, message = "{ui_scenario_reference.data_type.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_reference.data_type.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "引用的数据类型(场景,指令)", required = true, allowableValues="range[1, 255]") - private String dataType; - - -} \ No newline at end of file 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 deleted file mode 100644 index 2eb3fd07d8..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReport.java +++ /dev/null @@ -1,86 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "场景报告") -@Table("ui_scenario_report") -@Data -public class UiScenarioReport implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @NotBlank(message = "{ui_scenario_report.id.not_blank}", groups = {Updated.class}) - @ApiModelProperty(name = "报告ID", required = true, allowableValues="range[1, 50]") - private String id; - - @Size(min = 1, max = 50, message = "{ui_scenario_report.project_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_report.project_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "项目ID", required = true, allowableValues="range[1, 50]") - private String projectId; - - @Size(min = 1, max = 3000, message = "{ui_scenario_report.name.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_report.name.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告名称", required = true, allowableValues="range[1, 3000]") - private String name; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - - @ApiModelProperty(name = "更新时间", required = true, dataType = "Long") - private Long updateTime; - - @Size(min = 1, max = 64, message = "{ui_scenario_report.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_report.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告状态", required = true, allowableValues="range[1, 64]") - private String status; - - @Size(min = 1, max = 64, message = "{ui_scenario_report.trigger_mode.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_report.trigger_mode.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "触发模式(手动,定时,批量,测试计划)", required = true, allowableValues="range[1, 64]") - private String triggerMode; - - - @ApiModelProperty(name = "执行类型(并行,串行)", required = false, allowableValues="range[1, 200]") - private String executeType; - - - @ApiModelProperty(name = "场景名称", required = false, allowableValues="range[1, 3000]") - private String scenarioName; - - - @ApiModelProperty(name = "场景ID", required = false, allowableValues="range[1, 3000]") - private String scenarioId; - - @Size(min = 1, max = 100, message = "{ui_scenario_report.create_user.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_report.create_user.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "创建人", required = true, allowableValues="range[1, 100]") - private String createUser; - - - @ApiModelProperty(name = "执行器", required = false, allowableValues="range[1, 100]") - private String actuator; - - - @ApiModelProperty(name = "结束时间", required = true, dataType = "Long") - private Long endTime; - - - @ApiModelProperty(name = "报告类型(集合,独立)", required = false, allowableValues="range[1, 100]") - private String reportType; - - - @ApiModelProperty(name = "关联的测试计划报告ID(可以为空)", required = false, allowableValues="range[1, 50]") - private String relevanceTestPlanReportId; - - -} \ No newline at end of file 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 deleted file mode 100644 index 72e55d0944..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportBlob.java +++ /dev/null @@ -1,34 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; - -@ApiModel(value = "场景报告大字段") -@Table("ui_scenario_report_blob") -@Data -@EqualsAndHashCode(callSuper=false) -public class UiScenarioReportBlob implements Serializable { - private static final long serialVersionUID = 1L; - @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; - - - @ApiModelProperty(name = "描述", required = false, allowableValues = "range[1, ]") - private byte[] description; - - - @ApiModelProperty(name = "执行环境配置", required = false, allowableValues = "range[1, ]") - private byte[] envConfig; - - -} \ No newline at end of file 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 deleted file mode 100644 index 8f226fb968..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportResult.java +++ /dev/null @@ -1,64 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "报告结果") -@Table("ui_scenario_report_result") -@Data -public class UiScenarioReportResult implements Serializable { - private static final long serialVersionUID = 1L; - @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; - - @Size(min = 1, max = 200, message = "{ui_scenario_report_result.resource_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_report_result.resource_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "请求资源 id", required = true, allowableValues="range[1, 200]") - private String resourceId; - - @Size(min = 1, max = 50, message = "{ui_scenario_report_result.report_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_report_result.report_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "报告 id", required = true, allowableValues="range[1, 50]") - private String reportId; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - @Size(min = 1, max = 100, message = "{ui_scenario_report_result.status.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_report_result.status.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "结果状态", required = true, allowableValues="range[1, 100]") - private String status; - - - @ApiModelProperty(name = "请求时间", required = true, dataType = "Long") - private Long requestTime; - - - @ApiModelProperty(name = "总断言数", required = false, dataType = "Long") - private Long totalAssertions; - - - @ApiModelProperty(name = "失败断言数", required = false, dataType = "Long") - private Long passAssertions; - - - @ApiModelProperty(name = "执行结果", required = true, allowableValues="range[1, ]") - private byte[] content; - - - @ApiModelProperty(name = "记录截图断言等结果", required = false, allowableValues="range[1, ]") - private byte[] baseInfo; - - -} \ No newline at end of file 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 deleted file mode 100644 index e1fadc0a14..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioReportStructure.java +++ /dev/null @@ -1,42 +0,0 @@ -package io.metersphere.ui.domain; - -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; -import io.swagger.annotations.ApiModelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import java.io.Serializable; - -@ApiModel(value = "报告结构") -@Table("ui_scenario_report_structure") -@Data -public class UiScenarioReportStructure implements Serializable { - private static final long serialVersionUID = 1L; - @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; - - @Size(min = 1, max = 50, message = "{ui_scenario_report_structure.report_id.length_range}", groups = {Created.class, Updated.class}) - @NotBlank(message = "{ui_scenario_report_structure.report_id.not_blank}", groups = {Created.class}) - @ApiModelProperty(name = "请求资源 id", required = true, allowableValues="range[1, 50]") - private String reportId; - - - @ApiModelProperty(name = "创建时间", required = true, dataType = "Long") - private Long createTime; - - - @ApiModelProperty(name = "资源步骤结构树", required = true, allowableValues="range[1, ]") - private byte[] resourceTree; - - - @ApiModelProperty(name = "执行日志", required = true, allowableValues="range[1, ]") - private byte[] console; - - -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/resources/generatorConfig.xml b/backend/framework/domain/src/main/resources/generatorConfig.xml new file mode 100644 index 0000000000..faaa86f506 --- /dev/null +++ b/backend/framework/domain/src/main/resources/generatorConfig.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + diff --git a/backend/framework/sdk/pom.xml b/backend/framework/sdk/pom.xml index 3c05227317..91d5cd49c4 100644 --- a/backend/framework/sdk/pom.xml +++ b/backend/framework/sdk/pom.xml @@ -113,10 +113,6 @@ org.springframework.bootspring-boot-starter-rsocket - - org.springframework.data - spring-data-jdbc - 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 006eb27390..f3fb3b6d9b 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,7 +17,6 @@ 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; @@ -27,7 +26,6 @@ import java.util.Properties; @Configuration @MapperScan(basePackages = {"io.metersphere.*.mapper"}, sqlSessionFactoryRef = "sqlSessionFactory") -@EnableJdbcRepositories @EnableTransactionManagement public class MybatisConfig { @Bean diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/OpenApiConfig.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/OpenApiConfig.java new file mode 100644 index 0000000000..313e119968 --- /dev/null +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/config/OpenApiConfig.java @@ -0,0 +1,32 @@ +package io.metersphere.sdk.config; + + +import io.metersphere.sdk.constants.SessionConstants; +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Info; +import io.swagger.v3.oas.annotations.servers.Server; +import io.swagger.v3.oas.models.parameters.Parameter; +import org.springdoc.core.customizers.OperationCustomizer; +import org.springframework.context.annotation.Bean; + +@OpenAPIDefinition( + info = @Info( + title = "${spring.application.name}", + version = "3.0" + ), + servers = @Server(url = "/") +) +public class OpenApiConfig { + + @Bean + public OperationCustomizer customize() { + return (operation, handlerMethod) -> { + if (!"login".equals(handlerMethod.getMethod().getName())) { + return operation + .addParametersItem(new Parameter().in("header").required(true).name(SessionConstants.CSRF_TOKEN)) + .addParametersItem(new Parameter().in("header").required(true).name(SessionConstants.HEADER_TOKEN)); + } + return operation; + }; + } +} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/SessionConstants.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/SessionConstants.java new file mode 100644 index 0000000000..a9ab75682f --- /dev/null +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/SessionConstants.java @@ -0,0 +1,15 @@ +package io.metersphere.sdk.constants; + +public class SessionConstants { + public static final String ATTR_USER = "user"; + public static final String AUTHENTICATION_STATUS = "Authentication-Status"; + public static final String AUTHENTICATION_INVALID = "invalid"; + + public final static String HEADER_TOKEN = "X-AUTH-TOKEN"; + public final static String CSRF_TOKEN = "CSRF-TOKEN"; + public final static String SSO_TOKEN = "SSO-TOKEN"; + public final static String CURRENT_PROJECT = "PROJECT"; + public final static String CURRENT_WORKSPACE = "WORKSPACE"; + public final static String ACCESS_KEY = "accessKey"; + public final static String SIGNATURE = "signature"; +} diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/UserDTO.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/UserDTO.java index 0b1cd93663..e43057de1a 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/UserDTO.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/dto/UserDTO.java @@ -1,7 +1,7 @@ package io.metersphere.sdk.dto; import io.metersphere.system.domain.User; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -9,9 +9,9 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = false) public class UserDTO extends User { - @ApiModelProperty(name = "其他平台对接信息", required = false, allowableValues = "range[1, 2000]") + @Schema(title = "其他平台对接信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 2000]") private byte[] platformInfo; - @ApiModelProperty(name = "UI本地调试地址", required = false, allowableValues = "range[1, 255]") + @Schema(title = "UI本地调试地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED, allowableValues = "range[1, 255]") private String seleniumServer; } 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/BaseUserMapper.java similarity index 90% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserMapper.java rename to backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseUserMapper.java index f2b59777ec..f059c0acb5 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/BaseUserMapper.java @@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; -public interface UserMapper { +public interface BaseUserMapper { UserDTO selectById(String id); List findAll(); diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserMapper.xml b/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseUserMapper.xml similarity index 95% rename from backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserMapper.xml rename to backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseUserMapper.xml index dbec8c27c2..c17282cfbf 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/UserMapper.xml +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/mapper/BaseUserMapper.xml @@ -1,6 +1,6 @@ - + - SELECT * FROM project_application WHERE project_id = #{projectId,jdbcType=VARCHAR} - - \ No newline at end of file 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 index a8eadb0739..11b30f437b 100644 --- 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 @@ -1,12 +1,9 @@ package io.metersphere.project.service; import io.metersphere.project.domain.ProjectApplication; +import io.metersphere.project.domain.ProjectApplicationExample; 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; @@ -15,8 +12,6 @@ import java.util.List; @Service @Transactional public class ProjectApplicationService { - @Resource - private JdbcAggregateTemplate jdbcAggregateTemplate; @Resource private ProjectApplicationMapper projectApplicationMapper; @@ -26,13 +21,13 @@ public class ProjectApplicationService { } public ProjectApplication update(ProjectApplication application) { - projectApplicationMapper.update(application); + projectApplicationMapper.updateByPrimaryKey(application); return application; } public List list(String projectId) { -// Query query = Query.query(Criteria.where("project_id").is(projectId)); - - return projectApplicationMapper.listByProjectId(projectId); + ProjectApplicationExample example = new ProjectApplicationExample(); + example.createCriteria().andProjectIdEqualTo(projectId); + return projectApplicationMapper.selectByExample(example); } } 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 6d1e130a72..7fe823810f 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,8 +1,9 @@ package io.metersphere.project.service; import io.metersphere.project.domain.Project; +import io.metersphere.project.domain.ProjectExample; +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; @@ -12,10 +13,9 @@ import java.util.List; @Transactional(rollbackFor = Exception.class) public class ProjectService { @Resource - private JdbcAggregateTemplate jdbcAggregateTemplate; + private ProjectMapper projectMapper; public List list() { - jdbcAggregateTemplate.findAll(Project.class); - return null; + return projectMapper.selectByExample(new ProjectExample()); } } 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 2e00567fee..793c8f8463 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 @@ -32,11 +32,6 @@ public class UserController { return userService.save(user); } - @PostMapping("/batch-add") - public boolean batchSaveUser(@Validated({Created.class}) @RequestBody List user) { - return userService.batchSave(user); - } - @PostMapping("/batch-add2") public boolean batchSaveUser2(@Validated({Created.class}) @RequestBody List user) { return userService.batchSave2(user); 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 873dd26a9e..8e6285fd76 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,15 +1,16 @@ package io.metersphere.system.service; import io.metersphere.sdk.dto.UserDTO; -import io.metersphere.sdk.mapper.UserMapper; +import io.metersphere.sdk.mapper.BaseUserMapper; import io.metersphere.sdk.util.BeanUtils; import io.metersphere.system.domain.User; +import io.metersphere.system.domain.UserExample; import io.metersphere.system.domain.UserExtend; -import io.metersphere.system.util.BatchSaveUtils; +import io.metersphere.system.mapper.UserExtendMapper; +import io.metersphere.system.mapper.UserMapper; import jakarta.annotation.Resource; import org.apache.ibatis.session.SqlSession; import org.apache.ibatis.session.SqlSessionFactory; -import org.springframework.data.jdbc.core.JdbcAggregateTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -18,44 +19,37 @@ import java.util.List; @Service @Transactional(rollbackFor = Exception.class) public class UserService { + @Resource + private BaseUserMapper baseUserMapper; @Resource private UserMapper userMapper; @Resource - private JdbcAggregateTemplate jdbcAggregateTemplate; + private UserExtendMapper userExtendMapper; @Resource private SqlSessionFactory sqlSessionFactory; public boolean save(UserDTO entity) { - User user = new User(); - BeanUtils.copyBean(user, entity); - jdbcAggregateTemplate.insert(user); + userMapper.insert(entity); UserExtend userExtend = new UserExtend(); BeanUtils.copyBean(userExtend, entity); - jdbcAggregateTemplate.insert(userExtend); + userExtendMapper.insert(userExtend); return true; } public UserDTO getById(String id) { - return userMapper.selectById(id); + return baseUserMapper.selectById(id); } public List list() { - return userMapper.findAll(); - } - - public boolean batchSave(List users) { - long start = System.currentTimeMillis(); - BatchSaveUtils.batchSave(users); - System.out.println("batch save cost: " + (System.currentTimeMillis() - start) + "ms"); - return true; + return baseUserMapper.findAll(); } public boolean batchSave2(List users) { long start = System.currentTimeMillis(); try (SqlSession sqlSession = sqlSessionFactory.openSession()) { - UserMapper mapper = sqlSession.getMapper(UserMapper.class); + BaseUserMapper mapper = sqlSession.getMapper(BaseUserMapper.class); for (int i = 0, size = users.size(); i < size; i++) { mapper.insert(users.get(i)); if (i % 100 == 0) { @@ -75,7 +69,7 @@ public class UserService { int size = users.size(); int pageSize = size / batchSize; if (pageSize == 0) { - userMapper.batchSave(users); + baseUserMapper.batchSave(users); System.out.println("batch save cost: " + (System.currentTimeMillis() - start) + "ms"); return true; } @@ -83,20 +77,20 @@ public class UserService { for (int i = 0; i < pageSize; i++) { int startIndex = i * batchSize; List sub = users.subList(startIndex, startIndex + batchSize); - userMapper.batchSave(sub); + baseUserMapper.batchSave(sub); } if (size % batchSize != 0) { int startIndex = pageSize * batchSize; List sub = users.subList(startIndex, size); - userMapper.batchSave(sub); + baseUserMapper.batchSave(sub); } System.out.println("batch save cost: " + (System.currentTimeMillis() - start) + "ms"); return true; } public long count() { - return jdbcAggregateTemplate.count(User.class); + return userMapper.countByExample(new UserExample()); } } diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/util/BatchSaveUtils.java b/backend/services/system-setting/src/main/java/io/metersphere/system/util/BatchSaveUtils.java deleted file mode 100644 index f3a9c42d9b..0000000000 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/util/BatchSaveUtils.java +++ /dev/null @@ -1,48 +0,0 @@ -package io.metersphere.system.util; - -import com.google.common.base.CaseFormat; -import io.metersphere.system.domain.User; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.reflect.FieldUtils; -import org.springframework.jdbc.core.namedparam.BeanPropertySqlParameterSource; -import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; -import org.springframework.stereotype.Component; - -import java.lang.reflect.Field; -import java.util.Arrays; -import java.util.List; - -@Component -public class BatchSaveUtils { - private static NamedParameterJdbcTemplate namedParameterJdbcTemplate; - - public BatchSaveUtils(NamedParameterJdbcTemplate namedParameterJdbcTemplate) { - BatchSaveUtils.namedParameterJdbcTemplate = namedParameterJdbcTemplate; - } - - - public static void batchSave(List dtos) { - if (CollectionUtils.isEmpty(dtos)) { - return; - } - // 表名 - String table = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dtos.get(0).getClass().getSimpleName().toLowerCase()); - - BeanPropertySqlParameterSource[] args = dtos.stream() - .map(BeanPropertySqlParameterSource::new) - .toArray(BeanPropertySqlParameterSource[]::new); - - List fields = Arrays.stream(FieldUtils.getAllFields(User.class)) - .map(Field::getName) - .filter(name -> !"serialVersionUID".equalsIgnoreCase(name)) - .toList(); - // 列名 - String columns = StringUtils.join(fields.stream().map(name -> CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name)).toList(), ","); - // 值 - String values = StringUtils.join(fields, ",:"); - - String sql = "INSERT INTO " + table + "(" + columns + ") VALUES (:" + values + ")"; - namedParameterJdbcTemplate.batchUpdate(sql, args); - } -} diff --git a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/UserControllerTests.java b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/UserControllerTests.java index 8599296cf7..6aa391eb19 100644 --- a/backend/services/system-setting/src/test/java/io/metersphere/system/controller/UserControllerTests.java +++ b/backend/services/system-setting/src/test/java/io/metersphere/system/controller/UserControllerTests.java @@ -84,31 +84,7 @@ public class UserControllerTests { } -// @Test - @Order(5) - public void testBatchAddUser() throws Exception { - var users = new ArrayList(); - for (int i = 0; i < 1000; i++) { - User user = new User(); - user.setId("batch1_" + i); - user.setName("batch1_" + i); - user.setCreateUser("system"); - user.setSource("LOCAL"); - user.setEmail("bin@fit2cloud.com"); - user.setStatus("enabled"); - user.setCreateTime(System.currentTimeMillis()); - user.setUpdateTime(System.currentTimeMillis()); - users.add(user); - } - - mockMvc.perform(MockMvcRequestBuilders.post("/user/batch-add") - .content(JSON.toJSONString(users)) - .contentType(MediaType.APPLICATION_JSON)) - .andExpect(status().isOk()) - .andExpect(content().contentType(MediaType.APPLICATION_JSON)); - } - -// @Test + // @Test @Order(6) public void testBatchAddUser2() throws Exception { var users = new ArrayList(); @@ -132,7 +108,7 @@ public class UserControllerTests { .andExpect(content().contentType(MediaType.APPLICATION_JSON)); } -// @Test + // @Test @Order(7) public void testBatchAddUser3() throws Exception { var users = new ArrayList(); @@ -156,7 +132,7 @@ public class UserControllerTests { .andExpect(content().contentType(MediaType.APPLICATION_JSON)); } -// @Test + // @Test @Order(8) public void testCount() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/user/count") diff --git a/pom.xml b/pom.xml index 1cb74d7dee..34755b61b0 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 3.1.0 2.1.12 2.2.8 - 2.0.4 + 2.1.0 1.7.14 1.15.3 0.19.0