From 51aa7e88b423a6c3109446536ba3890760eb82da Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 6 May 2020 14:40:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8lombok?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pom.xml | 6 + .../io/metersphere/base/domain/ApiTest.java | 59 +-------- .../metersphere/base/domain/ApiTestFile.java | 19 +-- .../base/domain/ApiTestReport.java | 67 +--------- .../base/domain/ApiTestWithBLOBs.java | 23 +--- .../metersphere/base/domain/FileContent.java | 19 +-- .../metersphere/base/domain/FileMetadata.java | 51 +------- .../io/metersphere/base/domain/LoadTest.java | 67 +--------- .../metersphere/base/domain/LoadTestFile.java | 19 +-- .../base/domain/LoadTestReport.java | 51 +------- .../base/domain/LoadTestReportDetail.java | 19 +-- .../base/domain/LoadTestReportLog.java | 35 +---- .../base/domain/LoadTestReportResult.java | 35 +---- .../base/domain/LoadTestReportWithBLOBs.java | 23 +--- .../base/domain/LoadTestWithBLOBs.java | 31 +---- .../metersphere/base/domain/Organization.java | 43 +------ .../io/metersphere/base/domain/Project.java | 51 +------- .../java/io/metersphere/base/domain/Role.java | 51 +------- .../base/domain/SystemParameter.java | 35 +---- .../io/metersphere/base/domain/TestCase.java | 99 +-------------- .../metersphere/base/domain/TestCaseNode.java | 59 +-------- .../base/domain/TestCaseReport.java | 39 +----- .../base/domain/TestCaseReportExample.java | 120 ++++++++++++++++++ .../base/domain/TestCaseReportTemplate.java | 39 +----- .../domain/TestCaseReportTemplateExample.java | 120 ++++++++++++++++++ .../base/domain/TestCaseWithBLOBs.java | 23 +--- .../io/metersphere/base/domain/TestPlan.java | 107 +--------------- .../base/domain/TestPlanTestCase.java | 75 +---------- .../metersphere/base/domain/TestResource.java | 51 +------- .../base/domain/TestResourcePool.java | 59 +-------- .../java/io/metersphere/base/domain/User.java | 91 +------------ .../io/metersphere/base/domain/UserRole.java | 51 +------- .../io/metersphere/base/domain/Workspace.java | 51 +------- .../base/mapper/TestCaseNodeMapper.xml | 24 ++-- .../base/mapper/TestCaseReportMapper.xml | 58 +++++++-- .../mapper/TestCaseReportTemplateMapper.xml | 58 +++++++-- .../src/main/resources/generatorConfig.xml | 38 +++++- 37 files changed, 503 insertions(+), 1363 deletions(-) diff --git a/backend/pom.xml b/backend/pom.xml index 10ee9e77a..75b67f5b2 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -66,6 +66,7 @@ org.projectlombok lombok + provided @@ -255,6 +256,11 @@ mysql-connector-java 5.1.41 + + com.itfsw + mybatis-generator-plugin + 1.3.8 + diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTest.java b/backend/src/main/java/io/metersphere/base/domain/ApiTest.java index 0e38a14f5..181e99a34 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTest.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTest.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class ApiTest implements Serializable { private String id; @@ -18,60 +21,4 @@ public class ApiTest implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestFile.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestFile.java index 217223617..f465702ba 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestFile.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTestFile.java @@ -1,27 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class ApiTestFile implements Serializable { private String testId; private String fileId; private static final long serialVersionUID = 1L; - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId == null ? null : testId.trim(); - } - - public String getFileId() { - return fileId; - } - - public void setFileId(String fileId) { - this.fileId = fileId == null ? null : fileId.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestReport.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestReport.java index 4f5813887..87b1e7aeb 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestReport.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTestReport.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class ApiTestReport implements Serializable { private String id; @@ -20,68 +23,4 @@ public class ApiTestReport implements Serializable { private String content; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId == null ? null : testId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content == null ? null : content.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestWithBLOBs.java index 8e9bb95b4..04d3109a6 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTestWithBLOBs.java @@ -1,27 +1,18 @@ package io.metersphere.base.domain; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.io.Serializable; +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public class ApiTestWithBLOBs extends ApiTest implements Serializable { private String scenarioDefinition; private String schedule; private static final long serialVersionUID = 1L; - - public String getScenarioDefinition() { - return scenarioDefinition; - } - - public void setScenarioDefinition(String scenarioDefinition) { - this.scenarioDefinition = scenarioDefinition == null ? null : scenarioDefinition.trim(); - } - - public String getSchedule() { - return schedule; - } - - public void setSchedule(String schedule) { - this.schedule = schedule == null ? null : schedule.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/FileContent.java b/backend/src/main/java/io/metersphere/base/domain/FileContent.java index 3efd11373..a69373005 100644 --- a/backend/src/main/java/io/metersphere/base/domain/FileContent.java +++ b/backend/src/main/java/io/metersphere/base/domain/FileContent.java @@ -1,27 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class FileContent implements Serializable { private String fileId; private byte[] file; private static final long serialVersionUID = 1L; - - public String getFileId() { - return fileId; - } - - public void setFileId(String fileId) { - this.fileId = fileId == null ? null : fileId.trim(); - } - - public byte[] getFile() { - return file; - } - - public void setFile(byte[] file) { - this.file = file; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java b/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java index 29792982f..ee799a3fc 100644 --- a/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java +++ b/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class FileMetadata implements Serializable { private String id; @@ -16,52 +19,4 @@ public class FileMetadata implements Serializable { private Long size; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public Long getSize() { - return size; - } - - public void setSize(Long size) { - this.size = size; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTest.java b/backend/src/main/java/io/metersphere/base/domain/LoadTest.java index 0bf8f5601..8c8c89a1a 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTest.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTest.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTest implements Serializable { private String id; @@ -20,68 +23,4 @@ public class LoadTest implements Serializable { private String testResourcePoolId; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public String getTestResourcePoolId() { - return testResourcePoolId; - } - - public void setTestResourcePoolId(String testResourcePoolId) { - this.testResourcePoolId = testResourcePoolId == null ? null : testResourcePoolId.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestFile.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestFile.java index cc243ec08..0fc212656 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestFile.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestFile.java @@ -1,27 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestFile implements Serializable { private String testId; private String fileId; private static final long serialVersionUID = 1L; - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId == null ? null : testId.trim(); - } - - public String getFileId() { - return fileId; - } - - public void setFileId(String fileId) { - this.fileId = fileId == null ? null : fileId.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReport.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReport.java index 4b5a36376..c0d76f67c 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReport.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReport.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestReport implements Serializable { private String id; @@ -16,52 +19,4 @@ public class LoadTestReport implements Serializable { private String status; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId == null ? null : testId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportDetail.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportDetail.java index 80425ac52..442ce74b0 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportDetail.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportDetail.java @@ -1,27 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestReportDetail implements Serializable { private String reportId; private String content; private static final long serialVersionUID = 1L; - - public String getReportId() { - return reportId; - } - - public void setReportId(String reportId) { - this.reportId = reportId == null ? null : reportId.trim(); - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content == null ? null : content.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java index 5f49329f1..6221094d7 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestReportLog implements Serializable { private Long id; @@ -12,36 +15,4 @@ public class LoadTestReportLog implements Serializable { private String content; private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getReportId() { - return reportId; - } - - public void setReportId(String reportId) { - this.reportId = reportId == null ? null : reportId.trim(); - } - - public String getResourceId() { - return resourceId; - } - - public void setResourceId(String resourceId) { - this.resourceId = resourceId == null ? null : resourceId.trim(); - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content == null ? null : content.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportResult.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportResult.java index 65c62c6e6..f22100b72 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportResult.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportResult.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestReportResult implements Serializable { private Long id; @@ -12,36 +15,4 @@ public class LoadTestReportResult implements Serializable { private String reportValue; private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getReportId() { - return reportId; - } - - public void setReportId(String reportId) { - this.reportId = reportId == null ? null : reportId.trim(); - } - - public String getReportKey() { - return reportKey; - } - - public void setReportKey(String reportKey) { - this.reportKey = reportKey == null ? null : reportKey.trim(); - } - - public String getReportValue() { - return reportValue; - } - - public void setReportValue(String reportValue) { - this.reportValue = reportValue == null ? null : reportValue.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportWithBLOBs.java index bb6360123..3e8d33d57 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportWithBLOBs.java @@ -1,27 +1,18 @@ package io.metersphere.base.domain; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.io.Serializable; +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public class LoadTestReportWithBLOBs extends LoadTestReport implements Serializable { private String description; private String content; private static final long serialVersionUID = 1L; - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content == null ? null : content.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestWithBLOBs.java index 70b0a75b9..7af18545e 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestWithBLOBs.java @@ -1,7 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.io.Serializable; +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public class LoadTestWithBLOBs extends LoadTest implements Serializable { private String loadConfiguration; @@ -10,28 +17,4 @@ public class LoadTestWithBLOBs extends LoadTest implements Serializable { private String schedule; private static final long serialVersionUID = 1L; - - public String getLoadConfiguration() { - return loadConfiguration; - } - - public void setLoadConfiguration(String loadConfiguration) { - this.loadConfiguration = loadConfiguration == null ? null : loadConfiguration.trim(); - } - - public String getAdvancedConfiguration() { - return advancedConfiguration; - } - - public void setAdvancedConfiguration(String advancedConfiguration) { - this.advancedConfiguration = advancedConfiguration == null ? null : advancedConfiguration.trim(); - } - - public String getSchedule() { - return schedule; - } - - public void setSchedule(String schedule) { - this.schedule = schedule == null ? null : schedule.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/Organization.java b/backend/src/main/java/io/metersphere/base/domain/Organization.java index e792ed3c8..cfc5ae3a7 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Organization.java +++ b/backend/src/main/java/io/metersphere/base/domain/Organization.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class Organization implements Serializable { private String id; @@ -14,44 +17,4 @@ public class Organization implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/Project.java b/backend/src/main/java/io/metersphere/base/domain/Project.java index 4d6a8f8ad..f1af671f4 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Project.java +++ b/backend/src/main/java/io/metersphere/base/domain/Project.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class Project implements Serializable { private String id; @@ -16,52 +19,4 @@ public class Project implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId == null ? null : workspaceId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/Role.java b/backend/src/main/java/io/metersphere/base/domain/Role.java index 3a44d8b1d..b2ecae0b9 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Role.java +++ b/backend/src/main/java/io/metersphere/base/domain/Role.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class Role implements Serializable { private String id; @@ -16,52 +19,4 @@ public class Role implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/SystemParameter.java b/backend/src/main/java/io/metersphere/base/domain/SystemParameter.java index 6c71ccead..719d7c1a7 100644 --- a/backend/src/main/java/io/metersphere/base/domain/SystemParameter.java +++ b/backend/src/main/java/io/metersphere/base/domain/SystemParameter.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class SystemParameter implements Serializable { private String paramKey; @@ -12,36 +15,4 @@ public class SystemParameter implements Serializable { private Integer sort; private static final long serialVersionUID = 1L; - - public String getParamKey() { - return paramKey; - } - - public void setParamKey(String paramKey) { - this.paramKey = paramKey == null ? null : paramKey.trim(); - } - - public String getParamValue() { - return paramValue; - } - - public void setParamValue(String paramValue) { - this.paramValue = paramValue == null ? null : paramValue.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public Integer getSort() { - return sort; - } - - public void setSort(Integer sort) { - this.sort = sort; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestCase.java index f78dbe133..121b99d8c 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCase.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCase.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestCase implements Serializable { private String id; @@ -28,100 +31,4 @@ public class TestCase implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public Integer getNodeId() { - return nodeId; - } - - public void setNodeId(Integer nodeId) { - this.nodeId = nodeId; - } - - public String getNodePath() { - return nodePath; - } - - public void setNodePath(String nodePath) { - this.nodePath = nodePath == null ? null : nodePath.trim(); - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public String getMaintainer() { - return maintainer; - } - - public void setMaintainer(String maintainer) { - this.maintainer = maintainer == null ? null : maintainer.trim(); - } - - public String getPriority() { - return priority; - } - - public void setPriority(String priority) { - this.priority = priority == null ? null : priority.trim(); - } - - public String getMethod() { - return method; - } - - public void setMethod(String method) { - this.method = method == null ? null : method.trim(); - } - - public String getPrerequisite() { - return prerequisite; - } - - public void setPrerequisite(String prerequisite) { - this.prerequisite = prerequisite == null ? null : prerequisite.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java index 1c4b37032..6237c938e 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestCaseNode implements Serializable { private Integer id; @@ -18,60 +21,4 @@ public class TestCaseNode implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public Integer getpId() { - return pId; - } - - public void setpId(Integer pId) { - this.pId = pId; - } - - public Integer getLevel() { - return level; - } - - public void setLevel(Integer level) { - this.level = level; - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java index b70e93cbf..4f20d531c 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestCaseReport implements Serializable { private Long id; @@ -9,39 +12,11 @@ public class TestCaseReport implements Serializable { private String planId; - private String content; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } + private Long startTime; - public String getName() { - return name; - } + private Long endTime; - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getPlanId() { - return planId; - } - - public void setPlanId(String planId) { - this.planId = planId == null ? null : planId.trim(); - } - - public String getContent() { - return content; - } + private String content; - public void setContent(String content) { - this.content = content == null ? null : content.trim(); - } + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReportExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportExample.java index f43ff0744..840e65ac1 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseReportExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportExample.java @@ -303,6 +303,126 @@ public class TestCaseReportExample { addCriterion("plan_id not between", value1, value2, "planId"); 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 static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java index 05220801f..29b66e90f 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestCaseReportTemplate implements Serializable { private Long id; @@ -9,39 +12,11 @@ public class TestCaseReportTemplate implements Serializable { private String workspaceId; - private String content; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } + private Long startTime; - public String getName() { - return name; - } + private Long endTime; - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId == null ? null : workspaceId.trim(); - } - - public String getContent() { - return content; - } + private String content; - public void setContent(String content) { - this.content = content == null ? null : content.trim(); - } + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplateExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplateExample.java index a0c5b96a6..03b3616d6 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplateExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplateExample.java @@ -303,6 +303,126 @@ public class TestCaseReportTemplateExample { addCriterion("workspace_id not between", value1, value2, "workspaceId"); 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 static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java index df325d67b..a07a2e628 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java @@ -1,27 +1,18 @@ package io.metersphere.base.domain; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.io.Serializable; +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public class TestCaseWithBLOBs extends TestCase implements Serializable { private String remark; private String steps; private static final long serialVersionUID = 1L; - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark == null ? null : remark.trim(); - } - - public String getSteps() { - return steps; - } - - public void setSteps(String steps) { - this.steps = steps == null ? null : steps.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java index e19aeba2b..c968eff1c 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestPlan implements Serializable { private String id; @@ -30,108 +33,4 @@ public class TestPlan implements Serializable { private String tags; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId == null ? null : workspaceId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public String getStage() { - return stage; - } - - public void setStage(String stage) { - this.stage = stage == null ? null : stage.trim(); - } - - public String getPrincipal() { - return principal; - } - - public void setPrincipal(String principal) { - this.principal = principal == null ? null : principal.trim(); - } - - public String getTestCaseMatchRule() { - return testCaseMatchRule; - } - - public void setTestCaseMatchRule(String testCaseMatchRule) { - this.testCaseMatchRule = testCaseMatchRule == null ? null : testCaseMatchRule.trim(); - } - - public String getExecutorMatchRule() { - return executorMatchRule; - } - - public void setExecutorMatchRule(String executorMatchRule) { - this.executorMatchRule = executorMatchRule == null ? null : executorMatchRule.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getTags() { - return tags; - } - - public void setTags(String tags) { - this.tags = tags == null ? null : tags.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java index c1fe14991..cc6851718 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestPlanTestCase implements Serializable { private Integer id; @@ -22,76 +25,4 @@ public class TestPlanTestCase implements Serializable { private String results; private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getPlanId() { - return planId; - } - - public void setPlanId(String planId) { - this.planId = planId == null ? null : planId.trim(); - } - - public String getCaseId() { - return caseId; - } - - public void setCaseId(String caseId) { - this.caseId = caseId == null ? null : caseId.trim(); - } - - public String getExecutor() { - return executor; - } - - public void setExecutor(String executor) { - this.executor = executor == null ? null : executor.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark == null ? null : remark.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getResults() { - return results; - } - - public void setResults(String results) { - this.results = results == null ? null : results.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestResource.java b/backend/src/main/java/io/metersphere/base/domain/TestResource.java index b20b15820..89925a154 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestResource.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestResource.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestResource implements Serializable { private String id; @@ -16,52 +19,4 @@ public class TestResource implements Serializable { private String configuration; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getTestResourcePoolId() { - return testResourcePoolId; - } - - public void setTestResourcePoolId(String testResourcePoolId) { - this.testResourcePoolId = testResourcePoolId == null ? null : testResourcePoolId.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getConfiguration() { - return configuration; - } - - public void setConfiguration(String configuration) { - this.configuration = configuration == null ? null : configuration.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestResourcePool.java b/backend/src/main/java/io/metersphere/base/domain/TestResourcePool.java index c2eb38d5d..de2a5800a 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestResourcePool.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestResourcePool.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestResourcePool implements Serializable { private String id; @@ -18,60 +21,4 @@ public class TestResourcePool implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/User.java b/backend/src/main/java/io/metersphere/base/domain/User.java index d72db65c0..2236965d7 100644 --- a/backend/src/main/java/io/metersphere/base/domain/User.java +++ b/backend/src/main/java/io/metersphere/base/domain/User.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class User implements Serializable { private String id; @@ -26,92 +29,4 @@ public class User implements Serializable { private String phone; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email == null ? null : email.trim(); - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password == null ? null : password.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language == null ? null : language.trim(); - } - - public String getLastWorkspaceId() { - return lastWorkspaceId; - } - - public void setLastWorkspaceId(String lastWorkspaceId) { - this.lastWorkspaceId = lastWorkspaceId == null ? null : lastWorkspaceId.trim(); - } - - public String getLastOrganizationId() { - return lastOrganizationId; - } - - public void setLastOrganizationId(String lastOrganizationId) { - this.lastOrganizationId = lastOrganizationId == null ? null : lastOrganizationId.trim(); - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone == null ? null : phone.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/UserRole.java b/backend/src/main/java/io/metersphere/base/domain/UserRole.java index 7fad77029..9b1353175 100644 --- a/backend/src/main/java/io/metersphere/base/domain/UserRole.java +++ b/backend/src/main/java/io/metersphere/base/domain/UserRole.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class UserRole implements Serializable { private String id; @@ -16,52 +19,4 @@ public class UserRole implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId == null ? null : userId.trim(); - } - - public String getRoleId() { - return roleId; - } - - public void setRoleId(String roleId) { - this.roleId = roleId == null ? null : roleId.trim(); - } - - public String getSourceId() { - return sourceId; - } - - public void setSourceId(String sourceId) { - this.sourceId = sourceId == null ? null : sourceId.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/Workspace.java b/backend/src/main/java/io/metersphere/base/domain/Workspace.java index f2d9b56ce..f7a881792 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Workspace.java +++ b/backend/src/main/java/io/metersphere/base/domain/Workspace.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class Workspace implements Serializable { private String id; @@ -16,52 +19,4 @@ public class Workspace implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getOrganizationId() { - return organizationId; - } - - public void setOrganizationId(String organizationId) { - this.organizationId = organizationId == null ? null : organizationId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml index 23b4d55ca..e6b29932c 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml @@ -102,22 +102,19 @@ - - SELECT LAST_INSERT_ID() - - insert into test_case_node (project_id, name, p_id, - level, create_time, update_time - ) - values (#{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pId,jdbcType=INTEGER}, - #{level,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT} - ) + insert into test_case_node (id, project_id, name, + p_id, level, create_time, + update_time) + values (#{id,jdbcType=INTEGER}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{pId,jdbcType=INTEGER}, #{level,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}) - - SELECT LAST_INSERT_ID() - insert into test_case_node + + id, + project_id, @@ -138,6 +135,9 @@ + + #{id,jdbcType=INTEGER}, + #{projectId,jdbcType=VARCHAR}, diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.xml index 83b9a9843..af3fc3e53 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.xml @@ -5,6 +5,8 @@ + + @@ -68,7 +70,7 @@ - id, name, plan_id + id, name, plan_id, start_time, end_time content @@ -122,37 +124,51 @@ - - SELECT LAST_INSERT_ID() - - insert into test_case_report (name, plan_id, content + insert into test_case_report (id, name, plan_id, + start_time, end_time, content ) - values (#{name,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR} + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, + #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR} ) - - SELECT LAST_INSERT_ID() - insert into test_case_report + + id, + name, plan_id, + + start_time, + + + end_time, + content, + + #{id,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + #{content,jdbcType=LONGVARCHAR}, @@ -176,6 +192,12 @@ plan_id = #{record.planId,jdbcType=VARCHAR}, + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + content = #{record.content,jdbcType=LONGVARCHAR}, @@ -189,6 +211,8 @@ set id = #{record.id,jdbcType=BIGINT}, name = #{record.name,jdbcType=VARCHAR}, plan_id = #{record.planId,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, content = #{record.content,jdbcType=LONGVARCHAR} @@ -198,7 +222,9 @@ update test_case_report set id = #{record.id,jdbcType=BIGINT}, name = #{record.name,jdbcType=VARCHAR}, - plan_id = #{record.planId,jdbcType=VARCHAR} + plan_id = #{record.planId,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT} @@ -212,6 +238,12 @@ plan_id = #{planId,jdbcType=VARCHAR}, + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + content = #{content,jdbcType=LONGVARCHAR}, @@ -222,13 +254,17 @@ update test_case_report set name = #{name,jdbcType=VARCHAR}, plan_id = #{planId,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, content = #{content,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=BIGINT} update test_case_report set name = #{name,jdbcType=VARCHAR}, - plan_id = #{planId,jdbcType=VARCHAR} + plan_id = #{planId,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.xml index 69175ac67..3aa0188d1 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.xml @@ -5,6 +5,8 @@ + + @@ -68,7 +70,7 @@ - id, name, workspace_id + id, name, workspace_id, start_time, end_time content @@ -122,37 +124,51 @@ - - SELECT LAST_INSERT_ID() - - insert into test_case_report_template (name, workspace_id, content + insert into test_case_report_template (id, name, workspace_id, + start_time, end_time, content ) - values (#{name,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR} + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, + #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR} ) - - SELECT LAST_INSERT_ID() - insert into test_case_report_template + + id, + name, workspace_id, + + start_time, + + + end_time, + content, + + #{id,jdbcType=BIGINT}, + #{name,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + #{content,jdbcType=LONGVARCHAR}, @@ -176,6 +192,12 @@ workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + content = #{record.content,jdbcType=LONGVARCHAR}, @@ -189,6 +211,8 @@ set id = #{record.id,jdbcType=BIGINT}, name = #{record.name,jdbcType=VARCHAR}, workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, content = #{record.content,jdbcType=LONGVARCHAR} @@ -198,7 +222,9 @@ update test_case_report_template set id = #{record.id,jdbcType=BIGINT}, name = #{record.name,jdbcType=VARCHAR}, - workspace_id = #{record.workspaceId,jdbcType=VARCHAR} + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT} @@ -212,6 +238,12 @@ workspace_id = #{workspaceId,jdbcType=VARCHAR}, + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + content = #{content,jdbcType=LONGVARCHAR}, @@ -222,13 +254,17 @@ update test_case_report_template set name = #{name,jdbcType=VARCHAR}, workspace_id = #{workspaceId,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, content = #{content,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=BIGINT} update test_case_report_template set name = #{name,jdbcType=VARCHAR}, - workspace_id = #{workspaceId,jdbcType=VARCHAR} + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/backend/src/main/resources/generatorConfig.xml b/backend/src/main/resources/generatorConfig.xml index 80aa980bc..2ac449c9b 100644 --- a/backend/src/main/resources/generatorConfig.xml +++ b/backend/src/main/resources/generatorConfig.xml @@ -10,7 +10,20 @@ - + + + + + + + + + + + + + + @@ -49,6 +62,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-- GitLab