diff --git a/backend/app/pom.xml b/backend/app/pom.xml index 47f746ccae..3a3d2406c3 100644 --- a/backend/app/pom.xml +++ b/backend/app/pom.xml @@ -46,7 +46,7 @@ io.metersphere - metersphere-functional-test + metersphere-case-management ${revision} @@ -61,7 +61,7 @@ io.metersphere - metersphere-issue-management + metersphere-bug-management ${revision} diff --git a/backend/app/src/main/resources/commons.properties b/backend/app/src/main/resources/commons.properties index 8de3c6da0a..6bbfbd0907 100644 --- a/backend/app/src/main/resources/commons.properties +++ b/backend/app/src/main/resources/commons.properties @@ -70,7 +70,7 @@ jmeter.home=/opt/jmeter spring.servlet.multipart.max-file-size=500MB spring.servlet.multipart.max-request-size=500MB # i18n -spring.messages.basename=i18n/commons,i18n/api,i18n/issue,i18n/load,i18n/project,i18n/system,i18n/plan,i18n/functional,i18n/ui,i18n/workstation +spring.messages.basename=i18n/commons,i18n/api,i18n/bug,i18n/load,i18n/project,i18n/system,i18n/plan,i18n/case,i18n/ui,i18n/workstation # actuator management.endpoints.web.exposure.include=* management.endpoints.enabled-by-default=false @@ -80,4 +80,4 @@ spring.redis.redisson.file=file:/opt/metersphere/conf/redisson.yml spring.session.redis.repository-type=indexed # spring.freemarker.check-template-location=false -spring.groovy.template.check-template-location=false \ No newline at end of file +spring.groovy.template.check-template-location=false diff --git a/backend/app/src/main/resources/logback-spring.xml b/backend/app/src/main/resources/logback-spring.xml index 4c75905c79..b658f2c728 100644 --- a/backend/app/src/main/resources/logback-spring.xml +++ b/backend/app/src/main/resources/logback-spring.xml @@ -269,15 +269,15 @@ - + INFO - ${logging.file.path}/functional-test.log + ${logging.file.path}/case-management.log - ${logging.file.path}/history/functional-test.%d{yyyyMMdd}-%i.log + ${logging.file.path}/history/case-management.%d{yyyyMMdd}-%i.log ${logger.max.history:-30} 50MB @@ -355,15 +355,15 @@ - - + INFO - ${logging.file.path}/issue.log + ${logging.file.path}/bug.log - ${logging.file.path}/history/issue.%d{yyyyMMdd}-%i.log + ${logging.file.path}/history/bug.%d{yyyyMMdd}-%i.log ${logger.max.history:-30} 50MB @@ -372,15 +372,15 @@ %d %t %-5level %logger{36} %line - %msg%n - + INFO 10000 - + - - + + @@ -436,4 +436,4 @@ - \ No newline at end of file + diff --git a/backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_ddl.sql b/backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__case_ddl.sql similarity index 100% rename from backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_ddl.sql rename to backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__case_ddl.sql diff --git a/backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__issue_ddl.sql b/backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__bug_ddl.sql similarity index 86% rename from backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__issue_ddl.sql rename to backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__bug_ddl.sql index 9bfd5b2919..d977ea7eb4 100644 --- a/backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__issue_ddl.sql +++ b/backend/app/src/main/resources/migration/3.0.0/ddl/V3.0.0_12__bug_ddl.sql @@ -1,7 +1,8 @@ -- set innodb lock wait timeout SET SESSION innodb_lock_wait_timeout = 7200; -CREATE TABLE IF NOT EXISTS issue( +DROP TABLE IF EXISTS bug; +CREATE TABLE IF NOT EXISTS bug( `id` VARCHAR(50) NOT NULL COMMENT 'ID' , `num` INT NOT NULL COMMENT '业务ID' , `title` VARCHAR(300) NOT NULL COMMENT '缺陷标题' , @@ -14,9 +15,7 @@ CREATE TABLE IF NOT EXISTS issue( `platform_status` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '第三方平台状态' , `platform_id` VARCHAR(50) COMMENT '第三方平台缺陷ID' , PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '缺陷'; + ) COMMENT = '缺陷'; -- set innodb lock wait timeout to default diff --git a/backend/framework/domain/pom.xml b/backend/framework/domain/pom.xml index 0d70789371..3ad4ca8180 100644 --- a/backend/framework/domain/pom.xml +++ b/backend/framework/domain/pom.xml @@ -49,7 +49,9 @@ src/main/resources/loadGeneratorConfig.xml src/main/resources/sdkGeneratorConfig.xml src/main/resources/projectGeneratorConfig.xml - src/main/resources/systemGeneratorConfig.xml + + + diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/Issue.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/Bug.java similarity index 57% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/Issue.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/Bug.java index 82ec835266..dbecbcfd74 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/Issue.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/Bug.java @@ -1,4 +1,4 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -7,19 +7,19 @@ import java.io.Serializable; import lombok.Data; @Data -public class Issue implements Serializable { +public class Bug implements Serializable { @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{issue.id.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{bug.id.length_range}", groups = {Created.class, Updated.class}) private String id; @Schema(title = "业务ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "{issue.num.not_blank}", groups = {Created.class}) + @NotNull(message = "{bug.num.not_blank}", groups = {Created.class}) private Integer num; @Schema(title = "缺陷标题", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue.title.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 300, message = "{issue.title.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug.title.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 300, message = "{bug.title.length_range}", groups = {Created.class, Updated.class}) private String title; @Schema(title = "创建时间") @@ -29,13 +29,13 @@ public class Issue implements Serializable { private Long updateTime; @Schema(title = "缺陷平台", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue.platform.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issue.platform.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug.platform.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug.platform.length_range}", groups = {Created.class, Updated.class}) private String platform; @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue.project_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issue.project_id.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug.project_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug.project_id.length_range}", groups = {Created.class, Updated.class}) private String projectId; @Schema(title = "创建人") @@ -45,8 +45,8 @@ public class Issue implements Serializable { private String sourceId; @Schema(title = "第三方平台状态", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue.platform_status.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issue.platform_status.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug.platform_status.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug.platform_status.length_range}", groups = {Created.class, Updated.class}) private String platformStatus; @Schema(title = "第三方平台缺陷ID") diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueFollow.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugAttachment.java similarity index 51% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueFollow.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugAttachment.java index cee7e40918..f4eee92952 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueFollow.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugAttachment.java @@ -1,4 +1,4 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -7,16 +7,16 @@ import java.io.Serializable; import lombok.Data; @Data -public class IssueFollow implements Serializable { +public class BugAttachment implements Serializable { @Schema(title = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_follow.issue_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issue_follow.issue_id.length_range}", groups = {Created.class, Updated.class}) - private String issueId; + @NotBlank(message = "{bug_attachment.bug_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_attachment.bug_id.length_range}", groups = {Created.class, Updated.class}) + private String bugId; - @Schema(title = "关注人ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_follow.follow_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issue_follow.follow_id.length_range}", groups = {Created.class, Updated.class}) - private String followId; + @Schema(title = "文件的ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_attachment.file_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_attachment.file_id.length_range}", groups = {Created.class, Updated.class}) + private String fileId; private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueAttachmentExample.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugAttachmentExample.java similarity index 81% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueAttachmentExample.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugAttachmentExample.java index 6b50851649..b225d508d4 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueAttachmentExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugAttachmentExample.java @@ -1,16 +1,16 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import java.util.ArrayList; import java.util.List; -public class IssueAttachmentExample { +public class BugAttachmentExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public IssueAttachmentExample() { + public BugAttachmentExample() { oredCriteria = new ArrayList(); } @@ -104,73 +104,73 @@ public class IssueAttachmentExample { criteria.add(new Criterion(condition, value1, value2)); } - public Criteria andIssueIdIsNull() { - addCriterion("issue_id is null"); + public Criteria andBugIdIsNull() { + addCriterion("bug_id is null"); return (Criteria) this; } - public Criteria andIssueIdIsNotNull() { - addCriterion("issue_id is not null"); + public Criteria andBugIdIsNotNull() { + addCriterion("bug_id is not null"); return (Criteria) this; } - public Criteria andIssueIdEqualTo(String value) { - addCriterion("issue_id =", value, "issueId"); + public Criteria andBugIdEqualTo(String value) { + addCriterion("bug_id =", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotEqualTo(String value) { - addCriterion("issue_id <>", value, "issueId"); + public Criteria andBugIdNotEqualTo(String value) { + addCriterion("bug_id <>", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdGreaterThan(String value) { - addCriterion("issue_id >", value, "issueId"); + public Criteria andBugIdGreaterThan(String value) { + addCriterion("bug_id >", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdGreaterThanOrEqualTo(String value) { - addCriterion("issue_id >=", value, "issueId"); + public Criteria andBugIdGreaterThanOrEqualTo(String value) { + addCriterion("bug_id >=", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdLessThan(String value) { - addCriterion("issue_id <", value, "issueId"); + public Criteria andBugIdLessThan(String value) { + addCriterion("bug_id <", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdLessThanOrEqualTo(String value) { - addCriterion("issue_id <=", value, "issueId"); + public Criteria andBugIdLessThanOrEqualTo(String value) { + addCriterion("bug_id <=", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdLike(String value) { - addCriterion("issue_id like", value, "issueId"); + public Criteria andBugIdLike(String value) { + addCriterion("bug_id like", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotLike(String value) { - addCriterion("issue_id not like", value, "issueId"); + public Criteria andBugIdNotLike(String value) { + addCriterion("bug_id not like", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdIn(List values) { - addCriterion("issue_id in", values, "issueId"); + public Criteria andBugIdIn(List values) { + addCriterion("bug_id in", values, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotIn(List values) { - addCriterion("issue_id not in", values, "issueId"); + public Criteria andBugIdNotIn(List values) { + addCriterion("bug_id not in", values, "bugId"); return (Criteria) this; } - public Criteria andIssueIdBetween(String value1, String value2) { - addCriterion("issue_id between", value1, value2, "issueId"); + public Criteria andBugIdBetween(String value1, String value2) { + addCriterion("bug_id between", value1, value2, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotBetween(String value1, String value2) { - addCriterion("issue_id not between", value1, value2, "issueId"); + public Criteria andBugIdNotBetween(String value1, String value2) { + addCriterion("bug_id not between", value1, value2, "bugId"); return (Criteria) this; } diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueBlob.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugBlob.java similarity index 59% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueBlob.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugBlob.java index abf3652072..cb0a81aacd 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugBlob.java @@ -1,4 +1,4 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; @@ -7,10 +7,10 @@ import java.io.Serializable; import lombok.Data; @Data -public class IssueBlob implements Serializable { +public class BugBlob implements Serializable { @Schema(title = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_blob.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{issue_blob.id.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug_blob.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{bug_blob.id.length_range}", groups = {Created.class, Updated.class}) private String id; @Schema(title = "缺陷描述") diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugBlobExample.java similarity index 98% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueBlobExample.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugBlobExample.java index 62b9c1e96e..f9c3c8408a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueBlobExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugBlobExample.java @@ -1,16 +1,16 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import java.util.ArrayList; import java.util.List; -public class IssueBlobExample { +public class BugBlobExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public IssueBlobExample() { + public BugBlobExample() { oredCriteria = new ArrayList(); } diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugComment.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugComment.java new file mode 100644 index 0000000000..4a3768c330 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugComment.java @@ -0,0 +1,36 @@ +package io.metersphere.bug.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import lombok.Data; + +@Data +public class BugComment implements Serializable { + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_comment.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 64, message = "{bug_comment.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(title = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_comment.bug_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 64, message = "{bug_comment.bug_id.length_range}", groups = {Created.class, Updated.class}) + private String bugId; + + @Schema(title = "评论人") + private String createUser; + + @Schema(title = "创建时间") + private Long createTime; + + @Schema(title = "更新时间") + private Long updateTime; + + @Schema(title = "内容", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_comment.description.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 65535, message = "{bug_comment.description.length_range}", groups = {Created.class, Updated.class}) + private String description; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueCommentExample.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCommentExample.java similarity index 88% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueCommentExample.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCommentExample.java index 9bb517a18e..2b0177b2f9 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueCommentExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCommentExample.java @@ -1,16 +1,16 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import java.util.ArrayList; import java.util.List; -public class IssueCommentExample { +public class BugCommentExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public IssueCommentExample() { + public BugCommentExample() { oredCriteria = new ArrayList(); } @@ -174,73 +174,73 @@ public class IssueCommentExample { return (Criteria) this; } - public Criteria andIssueIdIsNull() { - addCriterion("issue_id is null"); + public Criteria andBugIdIsNull() { + addCriterion("bug_id is null"); return (Criteria) this; } - public Criteria andIssueIdIsNotNull() { - addCriterion("issue_id is not null"); + public Criteria andBugIdIsNotNull() { + addCriterion("bug_id is not null"); return (Criteria) this; } - public Criteria andIssueIdEqualTo(String value) { - addCriterion("issue_id =", value, "issueId"); + public Criteria andBugIdEqualTo(String value) { + addCriterion("bug_id =", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotEqualTo(String value) { - addCriterion("issue_id <>", value, "issueId"); + public Criteria andBugIdNotEqualTo(String value) { + addCriterion("bug_id <>", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdGreaterThan(String value) { - addCriterion("issue_id >", value, "issueId"); + public Criteria andBugIdGreaterThan(String value) { + addCriterion("bug_id >", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdGreaterThanOrEqualTo(String value) { - addCriterion("issue_id >=", value, "issueId"); + public Criteria andBugIdGreaterThanOrEqualTo(String value) { + addCriterion("bug_id >=", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdLessThan(String value) { - addCriterion("issue_id <", value, "issueId"); + public Criteria andBugIdLessThan(String value) { + addCriterion("bug_id <", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdLessThanOrEqualTo(String value) { - addCriterion("issue_id <=", value, "issueId"); + public Criteria andBugIdLessThanOrEqualTo(String value) { + addCriterion("bug_id <=", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdLike(String value) { - addCriterion("issue_id like", value, "issueId"); + public Criteria andBugIdLike(String value) { + addCriterion("bug_id like", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotLike(String value) { - addCriterion("issue_id not like", value, "issueId"); + public Criteria andBugIdNotLike(String value) { + addCriterion("bug_id not like", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdIn(List values) { - addCriterion("issue_id in", values, "issueId"); + public Criteria andBugIdIn(List values) { + addCriterion("bug_id in", values, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotIn(List values) { - addCriterion("issue_id not in", values, "issueId"); + public Criteria andBugIdNotIn(List values) { + addCriterion("bug_id not in", values, "bugId"); return (Criteria) this; } - public Criteria andIssueIdBetween(String value1, String value2) { - addCriterion("issue_id between", value1, value2, "issueId"); + public Criteria andBugIdBetween(String value1, String value2) { + addCriterion("bug_id between", value1, value2, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotBetween(String value1, String value2) { - addCriterion("issue_id not between", value1, value2, "issueId"); + public Criteria andBugIdNotBetween(String value1, String value2) { + addCriterion("bug_id not between", value1, value2, "bugId"); return (Criteria) this; } diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCustomField.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCustomField.java new file mode 100644 index 0000000000..e5636e4f51 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCustomField.java @@ -0,0 +1,28 @@ +package io.metersphere.bug.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import lombok.Data; + +@Data +public class BugCustomField implements Serializable { + @Schema(title = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_custom_field.bug_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_custom_field.bug_id.length_range}", groups = {Created.class, Updated.class}) + private String bugId; + + @Schema(title = "字段ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_custom_field.field_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_custom_field.field_id.length_range}", groups = {Created.class, Updated.class}) + private String fieldId; + + @Schema(title = "字段值") + private String value; + + @Schema(title = "文本类型字段值") + private byte[] textValue; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/CustomFieldIssuesExample.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCustomFieldExample.java similarity index 84% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/CustomFieldIssuesExample.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCustomFieldExample.java index 12b58351fe..4d56bdcb2e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/CustomFieldIssuesExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCustomFieldExample.java @@ -1,16 +1,16 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import java.util.ArrayList; import java.util.List; -public class CustomFieldIssuesExample { +public class BugCustomFieldExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public CustomFieldIssuesExample() { + public BugCustomFieldExample() { oredCriteria = new ArrayList(); } @@ -104,73 +104,73 @@ public class CustomFieldIssuesExample { criteria.add(new Criterion(condition, value1, value2)); } - public Criteria andResourceIdIsNull() { - addCriterion("resource_id is null"); + public Criteria andBugIdIsNull() { + addCriterion("bug_id is null"); return (Criteria) this; } - public Criteria andResourceIdIsNotNull() { - addCriterion("resource_id is not null"); + public Criteria andBugIdIsNotNull() { + addCriterion("bug_id is not null"); return (Criteria) this; } - public Criteria andResourceIdEqualTo(String value) { - addCriterion("resource_id =", value, "resourceId"); + public Criteria andBugIdEqualTo(String value) { + addCriterion("bug_id =", value, "bugId"); return (Criteria) this; } - public Criteria andResourceIdNotEqualTo(String value) { - addCriterion("resource_id <>", value, "resourceId"); + public Criteria andBugIdNotEqualTo(String value) { + addCriterion("bug_id <>", value, "bugId"); return (Criteria) this; } - public Criteria andResourceIdGreaterThan(String value) { - addCriterion("resource_id >", value, "resourceId"); + public Criteria andBugIdGreaterThan(String value) { + addCriterion("bug_id >", value, "bugId"); return (Criteria) this; } - public Criteria andResourceIdGreaterThanOrEqualTo(String value) { - addCriterion("resource_id >=", value, "resourceId"); + public Criteria andBugIdGreaterThanOrEqualTo(String value) { + addCriterion("bug_id >=", value, "bugId"); return (Criteria) this; } - public Criteria andResourceIdLessThan(String value) { - addCriterion("resource_id <", value, "resourceId"); + public Criteria andBugIdLessThan(String value) { + addCriterion("bug_id <", value, "bugId"); return (Criteria) this; } - public Criteria andResourceIdLessThanOrEqualTo(String value) { - addCriterion("resource_id <=", value, "resourceId"); + public Criteria andBugIdLessThanOrEqualTo(String value) { + addCriterion("bug_id <=", value, "bugId"); return (Criteria) this; } - public Criteria andResourceIdLike(String value) { - addCriterion("resource_id like", value, "resourceId"); + public Criteria andBugIdLike(String value) { + addCriterion("bug_id like", value, "bugId"); return (Criteria) this; } - public Criteria andResourceIdNotLike(String value) { - addCriterion("resource_id not like", value, "resourceId"); + public Criteria andBugIdNotLike(String value) { + addCriterion("bug_id not like", value, "bugId"); return (Criteria) this; } - public Criteria andResourceIdIn(List values) { - addCriterion("resource_id in", values, "resourceId"); + public Criteria andBugIdIn(List values) { + addCriterion("bug_id in", values, "bugId"); return (Criteria) this; } - public Criteria andResourceIdNotIn(List values) { - addCriterion("resource_id not in", values, "resourceId"); + public Criteria andBugIdNotIn(List values) { + addCriterion("bug_id not in", values, "bugId"); return (Criteria) this; } - public Criteria andResourceIdBetween(String value1, String value2) { - addCriterion("resource_id between", value1, value2, "resourceId"); + public Criteria andBugIdBetween(String value1, String value2) { + addCriterion("bug_id between", value1, value2, "bugId"); return (Criteria) this; } - public Criteria andResourceIdNotBetween(String value1, String value2) { - addCriterion("resource_id not between", value1, value2, "resourceId"); + public Criteria andBugIdNotBetween(String value1, String value2) { + addCriterion("bug_id not between", value1, value2, "bugId"); return (Criteria) this; } diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueExample.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugExample.java similarity index 99% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueExample.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugExample.java index 24fac12eec..db02318075 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugExample.java @@ -1,16 +1,16 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import java.util.ArrayList; import java.util.List; -public class IssueExample { +public class BugExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public IssueExample() { + public BugExample() { oredCriteria = new ArrayList(); } diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFollower.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFollower.java new file mode 100644 index 0000000000..8fd88e8154 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFollower.java @@ -0,0 +1,22 @@ +package io.metersphere.bug.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import lombok.Data; + +@Data +public class BugFollower implements Serializable { + @Schema(title = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_follower.bug_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_follower.bug_id.length_range}", groups = {Created.class, Updated.class}) + private String bugId; + + @Schema(title = "关注人ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_follower.user_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_follower.user_id.length_range}", groups = {Created.class, Updated.class}) + private String userId; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueFollowExample.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFollowerExample.java similarity index 64% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueFollowExample.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFollowerExample.java index 297b2b682c..c309a601ed 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueFollowExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFollowerExample.java @@ -1,16 +1,16 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import java.util.ArrayList; import java.util.List; -public class IssueFollowExample { +public class BugFollowerExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public IssueFollowExample() { + public BugFollowerExample() { oredCriteria = new ArrayList(); } @@ -104,143 +104,143 @@ public class IssueFollowExample { criteria.add(new Criterion(condition, value1, value2)); } - public Criteria andIssueIdIsNull() { - addCriterion("issue_id is null"); + public Criteria andBugIdIsNull() { + addCriterion("bug_id is null"); return (Criteria) this; } - public Criteria andIssueIdIsNotNull() { - addCriterion("issue_id is not null"); + public Criteria andBugIdIsNotNull() { + addCriterion("bug_id is not null"); return (Criteria) this; } - public Criteria andIssueIdEqualTo(String value) { - addCriterion("issue_id =", value, "issueId"); + public Criteria andBugIdEqualTo(String value) { + addCriterion("bug_id =", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotEqualTo(String value) { - addCriterion("issue_id <>", value, "issueId"); + public Criteria andBugIdNotEqualTo(String value) { + addCriterion("bug_id <>", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdGreaterThan(String value) { - addCriterion("issue_id >", value, "issueId"); + public Criteria andBugIdGreaterThan(String value) { + addCriterion("bug_id >", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdGreaterThanOrEqualTo(String value) { - addCriterion("issue_id >=", value, "issueId"); + public Criteria andBugIdGreaterThanOrEqualTo(String value) { + addCriterion("bug_id >=", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdLessThan(String value) { - addCriterion("issue_id <", value, "issueId"); + public Criteria andBugIdLessThan(String value) { + addCriterion("bug_id <", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdLessThanOrEqualTo(String value) { - addCriterion("issue_id <=", value, "issueId"); + public Criteria andBugIdLessThanOrEqualTo(String value) { + addCriterion("bug_id <=", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdLike(String value) { - addCriterion("issue_id like", value, "issueId"); + public Criteria andBugIdLike(String value) { + addCriterion("bug_id like", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotLike(String value) { - addCriterion("issue_id not like", value, "issueId"); + public Criteria andBugIdNotLike(String value) { + addCriterion("bug_id not like", value, "bugId"); return (Criteria) this; } - public Criteria andIssueIdIn(List values) { - addCriterion("issue_id in", values, "issueId"); + public Criteria andBugIdIn(List values) { + addCriterion("bug_id in", values, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotIn(List values) { - addCriterion("issue_id not in", values, "issueId"); + public Criteria andBugIdNotIn(List values) { + addCriterion("bug_id not in", values, "bugId"); return (Criteria) this; } - public Criteria andIssueIdBetween(String value1, String value2) { - addCriterion("issue_id between", value1, value2, "issueId"); + public Criteria andBugIdBetween(String value1, String value2) { + addCriterion("bug_id between", value1, value2, "bugId"); return (Criteria) this; } - public Criteria andIssueIdNotBetween(String value1, String value2) { - addCriterion("issue_id not between", value1, value2, "issueId"); + public Criteria andBugIdNotBetween(String value1, String value2) { + addCriterion("bug_id not between", value1, value2, "bugId"); return (Criteria) this; } - public Criteria andFollowIdIsNull() { - addCriterion("follow_id is null"); + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); return (Criteria) this; } - public Criteria andFollowIdIsNotNull() { - addCriterion("follow_id is not null"); + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); return (Criteria) this; } - public Criteria andFollowIdEqualTo(String value) { - addCriterion("follow_id =", value, "followId"); + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotEqualTo(String value) { - addCriterion("follow_id <>", value, "followId"); + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdGreaterThan(String value) { - addCriterion("follow_id >", value, "followId"); + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdGreaterThanOrEqualTo(String value) { - addCriterion("follow_id >=", value, "followId"); + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLessThan(String value) { - addCriterion("follow_id <", value, "followId"); + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLessThanOrEqualTo(String value) { - addCriterion("follow_id <=", value, "followId"); + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLike(String value) { - addCriterion("follow_id like", value, "followId"); + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotLike(String value) { - addCriterion("follow_id not like", value, "followId"); + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdIn(List values) { - addCriterion("follow_id in", values, "followId"); + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotIn(List values) { - addCriterion("follow_id not in", values, "followId"); + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); return (Criteria) this; } - public Criteria andFollowIdBetween(String value1, String value2) { - addCriterion("follow_id between", value1, value2, "followId"); + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotBetween(String value1, String value2) { - addCriterion("follow_id not between", value1, value2, "followId"); + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); return (Criteria) this; } } diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFunctionalCase.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFunctionalCase.java new file mode 100644 index 0000000000..2edf0736a9 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFunctionalCase.java @@ -0,0 +1,43 @@ +package io.metersphere.bug.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import lombok.Data; + +@Data +public class BugFunctionalCase implements Serializable { + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_functional_case.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{bug_functional_case.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(title = "功能用例或测试计划功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_functional_case.resource_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_functional_case.resource_id.length_range}", groups = {Created.class, Updated.class}) + private String resourceId; + + @Schema(title = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_functional_case.bug_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_functional_case.bug_id.length_range}", groups = {Created.class, Updated.class}) + private String bugId; + + @Schema(title = "关联的类型:关联功能用例/关联测试计划功能用例", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_functional_case.ref_type.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 64, message = "{bug_functional_case.ref_type.length_range}", groups = {Created.class, Updated.class}) + private String refType; + + @Schema(title = "测试计划的用例所指向的用例的id", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{bug_functional_case.ref_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_functional_case.ref_id.length_range}", groups = {Created.class, Updated.class}) + private String refId; + + @Schema(title = "创建时间") + private Long createTime; + + @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/issue/domain/IssuesFunctionalCaseExample.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFunctionalCaseExample.java similarity index 91% rename from backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssuesFunctionalCaseExample.java rename to backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFunctionalCaseExample.java index 90e17e3959..1b45a38185 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssuesFunctionalCaseExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugFunctionalCaseExample.java @@ -1,16 +1,16 @@ -package io.metersphere.issue.domain; +package io.metersphere.bug.domain; import java.util.ArrayList; import java.util.List; -public class IssuesFunctionalCaseExample { +public class BugFunctionalCaseExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public IssuesFunctionalCaseExample() { + public BugFunctionalCaseExample() { oredCriteria = new ArrayList(); } @@ -244,73 +244,73 @@ public class IssuesFunctionalCaseExample { return (Criteria) this; } - public Criteria andIssuesIdIsNull() { - addCriterion("issues_id is null"); + public Criteria andBugIdIsNull() { + addCriterion("bug_id is null"); return (Criteria) this; } - public Criteria andIssuesIdIsNotNull() { - addCriterion("issues_id is not null"); + public Criteria andBugIdIsNotNull() { + addCriterion("bug_id is not null"); return (Criteria) this; } - public Criteria andIssuesIdEqualTo(String value) { - addCriterion("issues_id =", value, "issuesId"); + public Criteria andBugIdEqualTo(String value) { + addCriterion("bug_id =", value, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdNotEqualTo(String value) { - addCriterion("issues_id <>", value, "issuesId"); + public Criteria andBugIdNotEqualTo(String value) { + addCriterion("bug_id <>", value, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdGreaterThan(String value) { - addCriterion("issues_id >", value, "issuesId"); + public Criteria andBugIdGreaterThan(String value) { + addCriterion("bug_id >", value, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdGreaterThanOrEqualTo(String value) { - addCriterion("issues_id >=", value, "issuesId"); + public Criteria andBugIdGreaterThanOrEqualTo(String value) { + addCriterion("bug_id >=", value, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdLessThan(String value) { - addCriterion("issues_id <", value, "issuesId"); + public Criteria andBugIdLessThan(String value) { + addCriterion("bug_id <", value, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdLessThanOrEqualTo(String value) { - addCriterion("issues_id <=", value, "issuesId"); + public Criteria andBugIdLessThanOrEqualTo(String value) { + addCriterion("bug_id <=", value, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdLike(String value) { - addCriterion("issues_id like", value, "issuesId"); + public Criteria andBugIdLike(String value) { + addCriterion("bug_id like", value, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdNotLike(String value) { - addCriterion("issues_id not like", value, "issuesId"); + public Criteria andBugIdNotLike(String value) { + addCriterion("bug_id not like", value, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdIn(List values) { - addCriterion("issues_id in", values, "issuesId"); + public Criteria andBugIdIn(List values) { + addCriterion("bug_id in", values, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdNotIn(List values) { - addCriterion("issues_id not in", values, "issuesId"); + public Criteria andBugIdNotIn(List values) { + addCriterion("bug_id not in", values, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdBetween(String value1, String value2) { - addCriterion("issues_id between", value1, value2, "issuesId"); + public Criteria andBugIdBetween(String value1, String value2) { + addCriterion("bug_id between", value1, value2, "bugId"); return (Criteria) this; } - public Criteria andIssuesIdNotBetween(String value1, String value2) { - addCriterion("issues_id not between", value1, value2, "issuesId"); + public Criteria andBugIdNotBetween(String value1, String value2) { + addCriterion("bug_id not between", value1, value2, "bugId"); return (Criteria) this; } diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugAttachmentMapper.java b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugAttachmentMapper.java new file mode 100644 index 0000000000..1bc5a90680 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugAttachmentMapper.java @@ -0,0 +1,24 @@ +package io.metersphere.bug.mapper; + +import io.metersphere.bug.domain.BugAttachment; +import io.metersphere.bug.domain.BugAttachmentExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface BugAttachmentMapper { + long countByExample(BugAttachmentExample example); + + int deleteByExample(BugAttachmentExample example); + + int deleteByPrimaryKey(@Param("bugId") String bugId, @Param("fileId") String fileId); + + int insert(BugAttachment record); + + int insertSelective(BugAttachment record); + + List selectByExample(BugAttachmentExample example); + + int updateByExampleSelective(@Param("record") BugAttachment record, @Param("example") BugAttachmentExample example); + + int updateByExample(@Param("record") BugAttachment record, @Param("example") BugAttachmentExample example); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueAttachmentMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugAttachmentMapper.xml similarity index 73% rename from backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueAttachmentMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugAttachmentMapper.xml index 1e4e82a081..153ede1098 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueAttachmentMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugAttachmentMapper.xml @@ -1,8 +1,8 @@ - - - + + + @@ -64,15 +64,15 @@ - issue_id, file_id + bug_id, file_id - select distinct - from issue_attachment + from bug_attachment @@ -81,50 +81,50 @@ - delete from issue_attachment - where issue_id = #{issueId,jdbcType=VARCHAR} + delete from bug_attachment + where bug_id = #{bugId,jdbcType=VARCHAR} and file_id = #{fileId,jdbcType=VARCHAR} - - delete from issue_attachment + + delete from bug_attachment - - insert into issue_attachment (issue_id, file_id) - values (#{issueId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR}) + + insert into bug_attachment (bug_id, file_id) + values (#{bugId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR}) - - insert into issue_attachment + + insert into bug_attachment - - issue_id, + + bug_id, file_id, - - #{issueId,jdbcType=VARCHAR}, + + #{bugId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR}, - + select count(*) from bug_attachment - update issue_attachment + update bug_attachment - - issue_id = #{record.issueId,jdbcType=VARCHAR}, + + bug_id = #{record.bugId,jdbcType=VARCHAR}, file_id = #{record.fileId,jdbcType=VARCHAR}, @@ -135,8 +135,8 @@ - update issue_attachment - set issue_id = #{record.issueId,jdbcType=VARCHAR}, + update bug_attachment + set bug_id = #{record.bugId,jdbcType=VARCHAR}, file_id = #{record.fileId,jdbcType=VARCHAR} diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugBlobMapper.java new file mode 100644 index 0000000000..18722e6e6f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugBlobMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.bug.mapper; + +import io.metersphere.bug.domain.BugBlob; +import io.metersphere.bug.domain.BugBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface BugBlobMapper { + long countByExample(BugBlobExample example); + + int deleteByExample(BugBlobExample example); + + int deleteByPrimaryKey(String id); + + int insert(BugBlob record); + + int insertSelective(BugBlob record); + + List selectByExampleWithBLOBs(BugBlobExample example); + + List selectByExample(BugBlobExample example); + + BugBlob selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") BugBlob record, @Param("example") BugBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") BugBlob record, @Param("example") BugBlobExample example); + + int updateByExample(@Param("record") BugBlob record, @Param("example") BugBlobExample example); + + int updateByPrimaryKeySelective(BugBlob record); + + int updateByPrimaryKeyWithBLOBs(BugBlob record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugBlobMapper.xml similarity index 83% rename from backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueBlobMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugBlobMapper.xml index 00ec4b271f..7c51f0dfb9 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueBlobMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugBlobMapper.xml @@ -1,10 +1,10 @@ - - + + - + @@ -71,7 +71,7 @@ description - select distinct @@ -79,7 +79,7 @@ , - from issue_blob + from bug_blob @@ -87,13 +87,13 @@ order by ${orderByClause} - select distinct - from issue_blob + from bug_blob @@ -106,25 +106,25 @@ , - from issue_blob + from bug_blob where id = #{id,jdbcType=VARCHAR} - delete from issue_blob + delete from bug_blob where id = #{id,jdbcType=VARCHAR} - - delete from issue_blob + + delete from bug_blob - - insert into issue_blob (id, description) + + insert into bug_blob (id, description) values (#{id,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}) - - insert into issue_blob + + insert into bug_blob id, @@ -142,14 +142,14 @@ - + select count(*) from bug_blob - update issue_blob + update bug_blob id = #{record.id,jdbcType=VARCHAR}, @@ -163,7 +163,7 @@ - update issue_blob + update bug_blob set id = #{record.id,jdbcType=VARCHAR}, description = #{record.description,jdbcType=LONGVARCHAR} @@ -171,14 +171,14 @@ - update issue_blob + update bug_blob set id = #{record.id,jdbcType=VARCHAR} - - update issue_blob + + update bug_blob description = #{description,jdbcType=LONGVARCHAR}, @@ -186,8 +186,8 @@ where id = #{id,jdbcType=VARCHAR} - - update issue_blob + + update bug_blob set description = #{description,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCommentMapper.java b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCommentMapper.java new file mode 100644 index 0000000000..d2fe69d444 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCommentMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.bug.mapper; + +import io.metersphere.bug.domain.BugComment; +import io.metersphere.bug.domain.BugCommentExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface BugCommentMapper { + long countByExample(BugCommentExample example); + + int deleteByExample(BugCommentExample example); + + int deleteByPrimaryKey(String id); + + int insert(BugComment record); + + int insertSelective(BugComment record); + + List selectByExampleWithBLOBs(BugCommentExample example); + + List selectByExample(BugCommentExample example); + + BugComment selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") BugComment record, @Param("example") BugCommentExample example); + + int updateByExampleWithBLOBs(@Param("record") BugComment record, @Param("example") BugCommentExample example); + + int updateByExample(@Param("record") BugComment record, @Param("example") BugCommentExample example); + + int updateByPrimaryKeySelective(BugComment record); + + int updateByPrimaryKeyWithBLOBs(BugComment record); + + int updateByPrimaryKey(BugComment record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueCommentMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCommentMapper.xml similarity index 80% rename from backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueCommentMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCommentMapper.xml index a5391c7c01..1c3f2e7b3e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueCommentMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCommentMapper.xml @@ -1,14 +1,14 @@ - - + + - + - + @@ -70,12 +70,12 @@ - id, issue_id, create_user, create_time, update_time + id, bug_id, create_user, create_time, update_time description - select distinct @@ -83,7 +83,7 @@ , - from issue_comment + from bug_comment @@ -91,13 +91,13 @@ order by ${orderByClause} - select distinct - from issue_comment + from bug_comment @@ -110,35 +110,35 @@ , - from issue_comment + from bug_comment where id = #{id,jdbcType=VARCHAR} - delete from issue_comment + delete from bug_comment where id = #{id,jdbcType=VARCHAR} - - delete from issue_comment + + delete from bug_comment - - insert into issue_comment (id, issue_id, create_user, + + insert into bug_comment (id, bug_id, create_user, create_time, update_time, description ) - values (#{id,jdbcType=VARCHAR}, #{issueId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, + values (#{id,jdbcType=VARCHAR}, #{bugId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR} ) - - insert into issue_comment + + insert into bug_comment id, - - issue_id, + + bug_id, create_user, @@ -157,8 +157,8 @@ #{id,jdbcType=VARCHAR}, - - #{issueId,jdbcType=VARCHAR}, + + #{bugId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, @@ -174,20 +174,20 @@ - + select count(*) from bug_comment - update issue_comment + update bug_comment id = #{record.id,jdbcType=VARCHAR}, - - issue_id = #{record.issueId,jdbcType=VARCHAR}, + + bug_id = #{record.bugId,jdbcType=VARCHAR}, create_user = #{record.createUser,jdbcType=VARCHAR}, @@ -207,9 +207,9 @@ - update issue_comment + update bug_comment set id = #{record.id,jdbcType=VARCHAR}, - issue_id = #{record.issueId,jdbcType=VARCHAR}, + bug_id = #{record.bugId,jdbcType=VARCHAR}, create_user = #{record.createUser,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, update_time = #{record.updateTime,jdbcType=BIGINT}, @@ -219,9 +219,9 @@ - update issue_comment + update bug_comment set id = #{record.id,jdbcType=VARCHAR}, - issue_id = #{record.issueId,jdbcType=VARCHAR}, + bug_id = #{record.bugId,jdbcType=VARCHAR}, create_user = #{record.createUser,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, update_time = #{record.updateTime,jdbcType=BIGINT} @@ -229,11 +229,11 @@ - - update issue_comment + + update bug_comment - - issue_id = #{issueId,jdbcType=VARCHAR}, + + bug_id = #{bugId,jdbcType=VARCHAR}, create_user = #{createUser,jdbcType=VARCHAR}, @@ -250,18 +250,18 @@ where id = #{id,jdbcType=VARCHAR} - - update issue_comment - set issue_id = #{issueId,jdbcType=VARCHAR}, + + update bug_comment + set bug_id = #{bugId,jdbcType=VARCHAR}, create_user = #{createUser,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, update_time = #{updateTime,jdbcType=BIGINT}, description = #{description,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} - - update issue_comment - set issue_id = #{issueId,jdbcType=VARCHAR}, + + update bug_comment + set bug_id = #{bugId,jdbcType=VARCHAR}, create_user = #{createUser,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, update_time = #{updateTime,jdbcType=BIGINT} diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCustomFieldMapper.java b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCustomFieldMapper.java new file mode 100644 index 0000000000..9c862ee0f2 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCustomFieldMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.bug.mapper; + +import io.metersphere.bug.domain.BugCustomField; +import io.metersphere.bug.domain.BugCustomFieldExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface BugCustomFieldMapper { + long countByExample(BugCustomFieldExample example); + + int deleteByExample(BugCustomFieldExample example); + + int deleteByPrimaryKey(@Param("bugId") String bugId, @Param("fieldId") String fieldId); + + int insert(BugCustomField record); + + int insertSelective(BugCustomField record); + + List selectByExampleWithBLOBs(BugCustomFieldExample example); + + List selectByExample(BugCustomFieldExample example); + + BugCustomField selectByPrimaryKey(@Param("bugId") String bugId, @Param("fieldId") String fieldId); + + int updateByExampleSelective(@Param("record") BugCustomField record, @Param("example") BugCustomFieldExample example); + + int updateByExampleWithBLOBs(@Param("record") BugCustomField record, @Param("example") BugCustomFieldExample example); + + int updateByExample(@Param("record") BugCustomField record, @Param("example") BugCustomFieldExample example); + + int updateByPrimaryKeySelective(BugCustomField record); + + int updateByPrimaryKeyWithBLOBs(BugCustomField record); + + int updateByPrimaryKey(BugCustomField record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/CustomFieldIssuesMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCustomFieldMapper.xml similarity index 74% rename from backend/framework/domain/src/main/java/io/metersphere/issue/mapper/CustomFieldIssuesMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCustomFieldMapper.xml index 8b6094623a..3bd899ffa9 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/CustomFieldIssuesMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugCustomFieldMapper.xml @@ -1,12 +1,12 @@ - - - + + + - + @@ -68,12 +68,12 @@ - resource_id, field_id, `value` + bug_id, field_id, `value` text_value - select distinct @@ -81,7 +81,7 @@ , - from custom_field_issues + from bug_custom_field @@ -89,13 +89,13 @@ order by ${orderByClause} - select distinct - from custom_field_issues + from bug_custom_field @@ -108,32 +108,32 @@ , - from custom_field_issues - where resource_id = #{resourceId,jdbcType=VARCHAR} + from bug_custom_field + where bug_id = #{bugId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} - delete from custom_field_issues - where resource_id = #{resourceId,jdbcType=VARCHAR} + delete from bug_custom_field + where bug_id = #{bugId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} - - delete from custom_field_issues + + delete from bug_custom_field - - insert into custom_field_issues (resource_id, field_id, `value`, + + insert into bug_custom_field (bug_id, field_id, `value`, text_value) - values (#{resourceId,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR}, + values (#{bugId,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR}, #{textValue,jdbcType=LONGVARBINARY}) - - insert into custom_field_issues + + insert into bug_custom_field - - resource_id, + + bug_id, field_id, @@ -146,8 +146,8 @@ - - #{resourceId,jdbcType=VARCHAR}, + + #{bugId,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, @@ -160,17 +160,17 @@ - + select count(*) from bug_custom_field - update custom_field_issues + update bug_custom_field - - resource_id = #{record.resourceId,jdbcType=VARCHAR}, + + bug_id = #{record.bugId,jdbcType=VARCHAR}, field_id = #{record.fieldId,jdbcType=VARCHAR}, @@ -187,8 +187,8 @@ - update custom_field_issues - set resource_id = #{record.resourceId,jdbcType=VARCHAR}, + update bug_custom_field + set bug_id = #{record.bugId,jdbcType=VARCHAR}, field_id = #{record.fieldId,jdbcType=VARCHAR}, `value` = #{record.value,jdbcType=VARCHAR}, text_value = #{record.textValue,jdbcType=LONGVARBINARY} @@ -197,16 +197,16 @@ - update custom_field_issues - set resource_id = #{record.resourceId,jdbcType=VARCHAR}, + update bug_custom_field + set bug_id = #{record.bugId,jdbcType=VARCHAR}, field_id = #{record.fieldId,jdbcType=VARCHAR}, `value` = #{record.value,jdbcType=VARCHAR} - - update custom_field_issues + + update bug_custom_field `value` = #{value,jdbcType=VARCHAR}, @@ -215,20 +215,20 @@ text_value = #{textValue,jdbcType=LONGVARBINARY}, - where resource_id = #{resourceId,jdbcType=VARCHAR} + where bug_id = #{bugId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} - - update custom_field_issues + + update bug_custom_field set `value` = #{value,jdbcType=VARCHAR}, text_value = #{textValue,jdbcType=LONGVARBINARY} - where resource_id = #{resourceId,jdbcType=VARCHAR} + where bug_id = #{bugId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} - - update custom_field_issues + + update bug_custom_field set `value` = #{value,jdbcType=VARCHAR} - where resource_id = #{resourceId,jdbcType=VARCHAR} + where bug_id = #{bugId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFollowerMapper.java b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFollowerMapper.java new file mode 100644 index 0000000000..66d260bf6b --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFollowerMapper.java @@ -0,0 +1,24 @@ +package io.metersphere.bug.mapper; + +import io.metersphere.bug.domain.BugFollower; +import io.metersphere.bug.domain.BugFollowerExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface BugFollowerMapper { + long countByExample(BugFollowerExample example); + + int deleteByExample(BugFollowerExample example); + + int deleteByPrimaryKey(@Param("bugId") String bugId, @Param("userId") String userId); + + int insert(BugFollower record); + + int insertSelective(BugFollower record); + + List selectByExample(BugFollowerExample example); + + int updateByExampleSelective(@Param("record") BugFollower record, @Param("example") BugFollowerExample example); + + int updateByExample(@Param("record") BugFollower record, @Param("example") BugFollowerExample example); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueFollowMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFollowerMapper.xml similarity index 67% rename from backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueFollowMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFollowerMapper.xml index 44488e2127..eaaca742a8 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueFollowMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFollowerMapper.xml @@ -1,9 +1,9 @@ - - - - + + + + @@ -64,15 +64,15 @@ - issue_id, follow_id + bug_id, user_id - select distinct - from issue_follow + from bug_follower @@ -81,53 +81,53 @@ - delete from issue_follow - where issue_id = #{issueId,jdbcType=VARCHAR} - and follow_id = #{followId,jdbcType=VARCHAR} + delete from bug_follower + where bug_id = #{bugId,jdbcType=VARCHAR} + and user_id = #{userId,jdbcType=VARCHAR} - - delete from issue_follow + + delete from bug_follower - - insert into issue_follow (issue_id, follow_id) - values (#{issueId,jdbcType=VARCHAR}, #{followId,jdbcType=VARCHAR}) + + insert into bug_follower (bug_id, user_id) + values (#{bugId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}) - - insert into issue_follow + + insert into bug_follower - - issue_id, + + bug_id, - - follow_id, + + user_id, - - #{issueId,jdbcType=VARCHAR}, + + #{bugId,jdbcType=VARCHAR}, - - #{followId,jdbcType=VARCHAR}, + + #{userId,jdbcType=VARCHAR}, - + select count(*) from bug_follower - update issue_follow + update bug_follower - - issue_id = #{record.issueId,jdbcType=VARCHAR}, + + bug_id = #{record.bugId,jdbcType=VARCHAR}, - - follow_id = #{record.followId,jdbcType=VARCHAR}, + + user_id = #{record.userId,jdbcType=VARCHAR}, @@ -135,9 +135,9 @@ - update issue_follow - set issue_id = #{record.issueId,jdbcType=VARCHAR}, - follow_id = #{record.followId,jdbcType=VARCHAR} + update bug_follower + set bug_id = #{record.bugId,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR} diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFunctionalCaseMapper.java b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFunctionalCaseMapper.java new file mode 100644 index 0000000000..f728068c6c --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFunctionalCaseMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.bug.mapper; + +import io.metersphere.bug.domain.BugFunctionalCase; +import io.metersphere.bug.domain.BugFunctionalCaseExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface BugFunctionalCaseMapper { + long countByExample(BugFunctionalCaseExample example); + + int deleteByExample(BugFunctionalCaseExample example); + + int deleteByPrimaryKey(String id); + + int insert(BugFunctionalCase record); + + int insertSelective(BugFunctionalCase record); + + List selectByExample(BugFunctionalCaseExample example); + + BugFunctionalCase selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") BugFunctionalCase record, @Param("example") BugFunctionalCaseExample example); + + int updateByExample(@Param("record") BugFunctionalCase record, @Param("example") BugFunctionalCaseExample example); + + int updateByPrimaryKeySelective(BugFunctionalCase record); + + int updateByPrimaryKey(BugFunctionalCase record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssuesFunctionalCaseMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFunctionalCaseMapper.xml similarity index 80% rename from backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssuesFunctionalCaseMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFunctionalCaseMapper.xml index b5e27359c4..ca61e40a1e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssuesFunctionalCaseMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugFunctionalCaseMapper.xml @@ -1,10 +1,10 @@ - - + + - + @@ -69,15 +69,15 @@ - id, resource_id, issues_id, ref_type, ref_id, create_time, update_time + id, resource_id, bug_id, ref_type, ref_id, create_time, update_time - select distinct - from issues_functional_case + from bug_functional_case @@ -88,29 +88,29 @@ - delete from issues_functional_case + delete from bug_functional_case where id = #{id,jdbcType=VARCHAR} - - delete from issues_functional_case + + delete from bug_functional_case - - insert into issues_functional_case (id, resource_id, issues_id, + + insert into bug_functional_case (id, resource_id, bug_id, ref_type, ref_id, create_time, update_time) - values (#{id,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, #{issuesId,jdbcType=VARCHAR}, + values (#{id,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, #{bugId,jdbcType=VARCHAR}, #{refType,jdbcType=VARCHAR}, #{refId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}) - - insert into issues_functional_case + + insert into bug_functional_case id, @@ -118,8 +118,8 @@ resource_id, - - issues_id, + + bug_id, ref_type, @@ -141,8 +141,8 @@ #{resourceId,jdbcType=VARCHAR}, - - #{issuesId,jdbcType=VARCHAR}, + + #{bugId,jdbcType=VARCHAR}, #{refType,jdbcType=VARCHAR}, @@ -158,14 +158,14 @@ - + select count(*) from bug_functional_case - update issues_functional_case + update bug_functional_case id = #{record.id,jdbcType=VARCHAR}, @@ -173,8 +173,8 @@ resource_id = #{record.resourceId,jdbcType=VARCHAR}, - - issues_id = #{record.issuesId,jdbcType=VARCHAR}, + + bug_id = #{record.bugId,jdbcType=VARCHAR}, ref_type = #{record.refType,jdbcType=VARCHAR}, @@ -194,10 +194,10 @@ - update issues_functional_case + update bug_functional_case set id = #{record.id,jdbcType=VARCHAR}, resource_id = #{record.resourceId,jdbcType=VARCHAR}, - issues_id = #{record.issuesId,jdbcType=VARCHAR}, + bug_id = #{record.bugId,jdbcType=VARCHAR}, ref_type = #{record.refType,jdbcType=VARCHAR}, ref_id = #{record.refId,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, @@ -206,14 +206,14 @@ - - update issues_functional_case + + update bug_functional_case resource_id = #{resourceId,jdbcType=VARCHAR}, - - issues_id = #{issuesId,jdbcType=VARCHAR}, + + bug_id = #{bugId,jdbcType=VARCHAR}, ref_type = #{refType,jdbcType=VARCHAR}, @@ -230,10 +230,10 @@ where id = #{id,jdbcType=VARCHAR} - - update issues_functional_case + + update bug_functional_case set resource_id = #{resourceId,jdbcType=VARCHAR}, - issues_id = #{issuesId,jdbcType=VARCHAR}, + bug_id = #{bugId,jdbcType=VARCHAR}, ref_type = #{refType,jdbcType=VARCHAR}, ref_id = #{refId,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.java b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.java new file mode 100644 index 0000000000..f9969630d7 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.bug.mapper; + +import io.metersphere.bug.domain.Bug; +import io.metersphere.bug.domain.BugExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface BugMapper { + long countByExample(BugExample example); + + int deleteByExample(BugExample example); + + int deleteByPrimaryKey(String id); + + int insert(Bug record); + + int insertSelective(Bug record); + + List selectByExample(BugExample example); + + Bug selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Bug record, @Param("example") BugExample example); + + int updateByExample(@Param("record") Bug record, @Param("example") BugExample example); + + int updateByPrimaryKeySelective(Bug record); + + int updateByPrimaryKey(Bug record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.xml similarity index 92% rename from backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.xml index ab12cf1bd3..1a66f66d42 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -76,13 +76,13 @@ id, num, title, create_time, update_time, platform, project_id, create_user, source_id, platform_status, platform_id - select distinct - from issue + from bug @@ -93,21 +93,21 @@ - delete from issue + delete from bug where id = #{id,jdbcType=VARCHAR} - - delete from issue + + delete from bug - - insert into issue (id, num, title, + + insert into bug (id, num, title, create_time, update_time, platform, project_id, create_user, source_id, platform_status, platform_id) @@ -116,8 +116,8 @@ #{projectId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{sourceId,jdbcType=VARCHAR}, #{platformStatus,jdbcType=VARCHAR}, #{platformId,jdbcType=VARCHAR}) - - insert into issue + + insert into bug id, @@ -189,14 +189,14 @@ - + select count(*) from bug - update issue + update bug id = #{record.id,jdbcType=VARCHAR}, @@ -237,7 +237,7 @@ - update issue + update bug set id = #{record.id,jdbcType=VARCHAR}, num = #{record.num,jdbcType=INTEGER}, title = #{record.title,jdbcType=VARCHAR}, @@ -253,8 +253,8 @@ - - update issue + + update bug num = #{num,jdbcType=INTEGER}, @@ -289,8 +289,8 @@ where id = #{id,jdbcType=VARCHAR} - - update issue + + update bug set num = #{num,jdbcType=INTEGER}, title = #{title,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, 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 4a46482a41..373ab96b94 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -32,6 +30,7 @@ public class CaseReview implements Serializable { private Long updateTime; @Schema(title = "评审结束时间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{case_review.end_time.not_blank}", groups = {Created.class}) private Long endTime; @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) 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 deleted file mode 100644 index 00f3dc8b78..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollow.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.metersphere.functional.domain; - -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; -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; - -@Data -public class CaseReviewFollow implements Serializable { - @Schema(title = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{case_review_follow.review_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{case_review_follow.review_id.length_range}", groups = {Created.class, Updated.class}) - private String reviewId; - - @Schema(title = "关注人", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{case_review_follow.follow_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{case_review_follow.follow_id.length_range}", groups = {Created.class, Updated.class}) - 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/functional/domain/CaseReviewFollower.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollower.java new file mode 100644 index 0000000000..d0afe0922b --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollower.java @@ -0,0 +1,22 @@ +package io.metersphere.functional.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import lombok.Data; + +@Data +public class CaseReviewFollower implements Serializable { + @Schema(title = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review_follower.review_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{case_review_follower.review_id.length_range}", groups = {Created.class, Updated.class}) + private String reviewId; + + @Schema(title = "关注人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review_follower.user_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{case_review_follower.user_id.length_range}", groups = {Created.class, Updated.class}) + private String userId; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollowExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollowerExample.java similarity index 81% rename from backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollowExample.java rename to backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollowerExample.java index aa3346fd74..aeadb1631e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollowExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFollowerExample.java @@ -3,14 +3,14 @@ package io.metersphere.functional.domain; import java.util.ArrayList; import java.util.List; -public class CaseReviewFollowExample { +public class CaseReviewFollowerExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public CaseReviewFollowExample() { + public CaseReviewFollowerExample() { oredCriteria = new ArrayList(); } @@ -174,73 +174,73 @@ public class CaseReviewFollowExample { return (Criteria) this; } - public Criteria andFollowIdIsNull() { - addCriterion("follow_id is null"); + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); return (Criteria) this; } - public Criteria andFollowIdIsNotNull() { - addCriterion("follow_id is not null"); + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); return (Criteria) this; } - public Criteria andFollowIdEqualTo(String value) { - addCriterion("follow_id =", value, "followId"); + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotEqualTo(String value) { - addCriterion("follow_id <>", value, "followId"); + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdGreaterThan(String value) { - addCriterion("follow_id >", value, "followId"); + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdGreaterThanOrEqualTo(String value) { - addCriterion("follow_id >=", value, "followId"); + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLessThan(String value) { - addCriterion("follow_id <", value, "followId"); + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLessThanOrEqualTo(String value) { - addCriterion("follow_id <=", value, "followId"); + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLike(String value) { - addCriterion("follow_id like", value, "followId"); + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotLike(String value) { - addCriterion("follow_id not like", value, "followId"); + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdIn(List values) { - addCriterion("follow_id in", values, "followId"); + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotIn(List values) { - addCriterion("follow_id not in", values, "followId"); + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); return (Criteria) this; } - public Criteria andFollowIdBetween(String value1, String value2) { - addCriterion("follow_id between", value1, value2, "followId"); + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotBetween(String value1, String value2) { - addCriterion("follow_id not between", value1, value2, "followId"); + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); return (Criteria) this; } } 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 34926e655a..3b07eee796 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -40,11 +38,11 @@ public class CaseReviewFunctionalCase implements Serializable { private String createUser; @Schema(title = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{case_review_functional_case.pos.not_blank}", groups = {Created.class}) + @NotNull(message = "{case_review_functional_case.pos.not_blank}", groups = {Created.class}) private Long pos; @Schema(title = "关联的用例是否放入回收站", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{case_review_functional_case.deleted.not_blank}", groups = {Created.class}) + @NotNull(message = "{case_review_functional_case.deleted.not_blank}", groups = {Created.class}) private Boolean deleted; private static final long serialVersionUID = 1L; 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 715095ba1e..17bc3a3c55 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseUser.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseUser.java @@ -1,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; 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 253a53e11c..f769712ca8 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; 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 deleted file mode 100644 index c6209db7d2..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CustomFieldTestCase.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.metersphere.functional.domain; - -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; -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; - -@Data -public class CustomFieldTestCase implements Serializable { - @Schema(title = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{custom_field_test_case.resource_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{custom_field_test_case.resource_id.length_range}", groups = {Created.class, Updated.class}) - private String resourceId; - - @Schema(title = "字段ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{custom_field_test_case.field_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{custom_field_test_case.field_id.length_range}", groups = {Created.class, Updated.class}) - private String fieldId; - - @Schema(title = "字段值") - private String value; - - @Schema(title = "") - private String textValue; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file 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 ee2334d241..5fecb983e2 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -16,7 +14,7 @@ public class FunctionalCase implements Serializable { private String id; @Schema(title = "业务ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.num.not_blank}", groups = {Created.class}) + @NotNull(message = "{functional_case.num.not_blank}", groups = {Created.class}) private Integer num; @Schema(title = "自定义业务ID", requiredMode = Schema.RequiredMode.REQUIRED) @@ -53,7 +51,7 @@ public class FunctionalCase implements Serializable { private String stepModel; @Schema(title = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.pos.not_blank}", groups = {Created.class}) + @NotNull(message = "{functional_case.pos.not_blank}", groups = {Created.class}) private Long pos; @Schema(title = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED) @@ -72,15 +70,15 @@ public class FunctionalCase implements Serializable { private String lastExecuteResult; @Schema(title = "是否在回收站:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.deleted.not_blank}", groups = {Created.class}) + @NotNull(message = "{functional_case.deleted.not_blank}", groups = {Created.class}) private Boolean deleted; @Schema(title = "是否是公共用例:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.public_case.not_blank}", groups = {Created.class}) + @NotNull(message = "{functional_case.public_case.not_blank}", groups = {Created.class}) private Boolean publicCase; @Schema(title = "是否为最新版本:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.latest.not_blank}", groups = {Created.class}) + @NotNull(message = "{functional_case.latest.not_blank}", groups = {Created.class}) private Boolean latest; @Schema(title = "创建人") 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 587273ec08..63f53924dc 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; 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 3197708c0f..5a5df7f109 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; 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 c3e107c72a..c88edbe72b 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseCustomField.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseCustomField.java new file mode 100644 index 0000000000..4eeae4c817 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseCustomField.java @@ -0,0 +1,28 @@ +package io.metersphere.functional.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import lombok.Data; + +@Data +public class FunctionalCaseCustomField implements Serializable { + @Schema(title = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_case_custom_field.case_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{functional_case_custom_field.case_id.length_range}", groups = {Created.class, Updated.class}) + private String caseId; + + @Schema(title = "字段ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_case_custom_field.field_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{functional_case_custom_field.field_id.length_range}", groups = {Created.class, Updated.class}) + private String fieldId; + + @Schema(title = "字段值") + private String value; + + @Schema(title = "") + private String textValue; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CustomFieldTestCaseExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseCustomFieldExample.java similarity index 84% rename from backend/framework/domain/src/main/java/io/metersphere/functional/domain/CustomFieldTestCaseExample.java rename to backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseCustomFieldExample.java index 7d1e52e648..d64f3aeb9a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CustomFieldTestCaseExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseCustomFieldExample.java @@ -3,14 +3,14 @@ package io.metersphere.functional.domain; import java.util.ArrayList; import java.util.List; -public class CustomFieldTestCaseExample { +public class FunctionalCaseCustomFieldExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public CustomFieldTestCaseExample() { + public FunctionalCaseCustomFieldExample() { oredCriteria = new ArrayList(); } @@ -104,73 +104,73 @@ public class CustomFieldTestCaseExample { criteria.add(new Criterion(condition, value1, value2)); } - public Criteria andResourceIdIsNull() { - addCriterion("resource_id is null"); + public Criteria andCaseIdIsNull() { + addCriterion("case_id is null"); return (Criteria) this; } - public Criteria andResourceIdIsNotNull() { - addCriterion("resource_id is not null"); + public Criteria andCaseIdIsNotNull() { + addCriterion("case_id is not null"); return (Criteria) this; } - public Criteria andResourceIdEqualTo(String value) { - addCriterion("resource_id =", value, "resourceId"); + public Criteria andCaseIdEqualTo(String value) { + addCriterion("case_id =", value, "caseId"); return (Criteria) this; } - public Criteria andResourceIdNotEqualTo(String value) { - addCriterion("resource_id <>", value, "resourceId"); + public Criteria andCaseIdNotEqualTo(String value) { + addCriterion("case_id <>", value, "caseId"); return (Criteria) this; } - public Criteria andResourceIdGreaterThan(String value) { - addCriterion("resource_id >", value, "resourceId"); + public Criteria andCaseIdGreaterThan(String value) { + addCriterion("case_id >", value, "caseId"); return (Criteria) this; } - public Criteria andResourceIdGreaterThanOrEqualTo(String value) { - addCriterion("resource_id >=", value, "resourceId"); + public Criteria andCaseIdGreaterThanOrEqualTo(String value) { + addCriterion("case_id >=", value, "caseId"); return (Criteria) this; } - public Criteria andResourceIdLessThan(String value) { - addCriterion("resource_id <", value, "resourceId"); + public Criteria andCaseIdLessThan(String value) { + addCriterion("case_id <", value, "caseId"); return (Criteria) this; } - public Criteria andResourceIdLessThanOrEqualTo(String value) { - addCriterion("resource_id <=", value, "resourceId"); + public Criteria andCaseIdLessThanOrEqualTo(String value) { + addCriterion("case_id <=", value, "caseId"); return (Criteria) this; } - public Criteria andResourceIdLike(String value) { - addCriterion("resource_id like", value, "resourceId"); + public Criteria andCaseIdLike(String value) { + addCriterion("case_id like", value, "caseId"); return (Criteria) this; } - public Criteria andResourceIdNotLike(String value) { - addCriterion("resource_id not like", value, "resourceId"); + public Criteria andCaseIdNotLike(String value) { + addCriterion("case_id not like", value, "caseId"); return (Criteria) this; } - public Criteria andResourceIdIn(List values) { - addCriterion("resource_id in", values, "resourceId"); + public Criteria andCaseIdIn(List values) { + addCriterion("case_id in", values, "caseId"); return (Criteria) this; } - public Criteria andResourceIdNotIn(List values) { - addCriterion("resource_id not in", values, "resourceId"); + public Criteria andCaseIdNotIn(List values) { + addCriterion("case_id not in", values, "caseId"); return (Criteria) this; } - public Criteria andResourceIdBetween(String value1, String value2) { - addCriterion("resource_id between", value1, value2, "resourceId"); + public Criteria andCaseIdBetween(String value1, String value2) { + addCriterion("case_id between", value1, value2, "caseId"); return (Criteria) this; } - public Criteria andResourceIdNotBetween(String value1, String value2) { - addCriterion("resource_id not between", value1, value2, "resourceId"); + public Criteria andCaseIdNotBetween(String value1, String value2) { + addCriterion("case_id not between", value1, value2, "caseId"); return (Criteria) this; } 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 deleted file mode 100644 index 7a71d36b72..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollow.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.metersphere.functional.domain; - -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; -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; - -@Data -public class FunctionalCaseFollow implements Serializable { - @Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_follow.case_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{functional_case_follow.case_id.length_range}", groups = {Created.class, Updated.class}) - private String caseId; - - @Schema(title = "关注人ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_follow.follow_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{functional_case_follow.follow_id.length_range}", groups = {Created.class, Updated.class}) - 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/functional/domain/FunctionalCaseFollower.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollower.java new file mode 100644 index 0000000000..aa063c4019 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollower.java @@ -0,0 +1,22 @@ +package io.metersphere.functional.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import lombok.Data; + +@Data +public class FunctionalCaseFollower implements Serializable { + @Schema(title = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_case_follower.case_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{functional_case_follower.case_id.length_range}", groups = {Created.class, Updated.class}) + private String caseId; + + @Schema(title = "关注人ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_case_follower.user_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{functional_case_follower.user_id.length_range}", groups = {Created.class, Updated.class}) + private String userId; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollowExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollowerExample.java similarity index 81% rename from backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollowExample.java rename to backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollowerExample.java index bab420df0b..ffed9a7302 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollowExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseFollowerExample.java @@ -3,14 +3,14 @@ package io.metersphere.functional.domain; import java.util.ArrayList; import java.util.List; -public class FunctionalCaseFollowExample { +public class FunctionalCaseFollowerExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public FunctionalCaseFollowExample() { + public FunctionalCaseFollowerExample() { oredCriteria = new ArrayList(); } @@ -174,73 +174,73 @@ public class FunctionalCaseFollowExample { return (Criteria) this; } - public Criteria andFollowIdIsNull() { - addCriterion("follow_id is null"); + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); return (Criteria) this; } - public Criteria andFollowIdIsNotNull() { - addCriterion("follow_id is not null"); + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); return (Criteria) this; } - public Criteria andFollowIdEqualTo(String value) { - addCriterion("follow_id =", value, "followId"); + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotEqualTo(String value) { - addCriterion("follow_id <>", value, "followId"); + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdGreaterThan(String value) { - addCriterion("follow_id >", value, "followId"); + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdGreaterThanOrEqualTo(String value) { - addCriterion("follow_id >=", value, "followId"); + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLessThan(String value) { - addCriterion("follow_id <", value, "followId"); + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLessThanOrEqualTo(String value) { - addCriterion("follow_id <=", value, "followId"); + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdLike(String value) { - addCriterion("follow_id like", value, "followId"); + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotLike(String value) { - addCriterion("follow_id not like", value, "followId"); + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); return (Criteria) this; } - public Criteria andFollowIdIn(List values) { - addCriterion("follow_id in", values, "followId"); + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotIn(List values) { - addCriterion("follow_id not in", values, "followId"); + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); return (Criteria) this; } - public Criteria andFollowIdBetween(String value1, String value2) { - addCriterion("follow_id between", value1, value2, "followId"); + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); return (Criteria) this; } - public Criteria andFollowIdNotBetween(String value1, String value2) { - addCriterion("follow_id not between", value1, value2, "followId"); + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); return (Criteria) this; } } 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 c19aa2b03c..9c708f330f 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @@ -29,7 +27,7 @@ public class FunctionalCaseModule implements Serializable { private String parentId; @Schema(title = "节点的层级", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_module.level.not_blank}", groups = {Created.class}) + @NotNull(message = "{functional_case_module.level.not_blank}", groups = {Created.class}) private Integer level; @Schema(title = "创建时间") @@ -39,7 +37,7 @@ public class FunctionalCaseModule implements Serializable { private Long updateTime; @Schema(title = "同一节点下的顺序", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case_module.pos.not_blank}", groups = {Created.class}) + @NotNull(message = "{functional_case_module.pos.not_blank}", groups = {Created.class}) private Long pos; @Schema(title = "创建人") 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 e5d3598ab6..1fb192f6ff 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; 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 2ac6f835cd..4e9a7be189 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,10 +1,8 @@ package io.metersphere.functional.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalMinderExtraNode.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalMinderExtraNode.java new file mode 100644 index 0000000000..ef46bfd294 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalMinderExtraNode.java @@ -0,0 +1,32 @@ +package io.metersphere.functional.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import lombok.Data; + +@Data +public class FunctionalMinderExtraNode implements Serializable { + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_minder_extra_node.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{functional_minder_extra_node.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(title = "父节点的ID,即模块ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_minder_extra_node.parent_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{functional_minder_extra_node.parent_id.length_range}", groups = {Created.class, Updated.class}) + private String parentId; + + @Schema(title = "项目ID,可扩展为其他资源ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_minder_extra_node.group_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{functional_minder_extra_node.group_id.length_range}", groups = {Created.class, Updated.class}) + private String groupId; + + @Schema(title = "存储脑图节点额外信息", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_minder_extra_node.node_data.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 2147483647, message = "{functional_minder_extra_node.node_data.length_range}", groups = {Created.class, Updated.class}) + private String nodeData; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/MinderExtraNodeExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalMinderExtraNodeExample.java similarity index 83% rename from backend/framework/domain/src/main/java/io/metersphere/functional/domain/MinderExtraNodeExample.java rename to backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalMinderExtraNodeExample.java index a55cc001ec..e2dfec56b9 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/MinderExtraNodeExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalMinderExtraNodeExample.java @@ -3,14 +3,14 @@ package io.metersphere.functional.domain; import java.util.ArrayList; import java.util.List; -public class MinderExtraNodeExample { +public class FunctionalMinderExtraNodeExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public MinderExtraNodeExample() { + public FunctionalMinderExtraNodeExample() { oredCriteria = new ArrayList(); } @@ -313,76 +313,6 @@ public class MinderExtraNodeExample { addCriterion("group_id not between", value1, value2, "groupId"); 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 { 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 deleted file mode 100644 index f722c3442e..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/MinderExtraNode.java +++ /dev/null @@ -1,39 +0,0 @@ -package io.metersphere.functional.domain; - -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; -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; - -@Data -public class MinderExtraNode implements Serializable { - @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{minder_extra_node.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{minder_extra_node.id.length_range}", groups = {Created.class, Updated.class}) - private String id; - - @Schema(title = "父节点的ID,即模块ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{minder_extra_node.parent_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{minder_extra_node.parent_id.length_range}", groups = {Created.class, Updated.class}) - private String parentId; - - @Schema(title = "项目ID,可扩展为其他资源ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{minder_extra_node.group_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{minder_extra_node.group_id.length_range}", groups = {Created.class, Updated.class}) - private String groupId; - - @Schema(title = "类型,如:用例编辑脑图", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{minder_extra_node.type.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 30, message = "{minder_extra_node.type.length_range}", groups = {Created.class, Updated.class}) - private String type; - - @Schema(title = "存储脑图节点额外信息", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{minder_extra_node.node_data.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 2147483647, message = "{minder_extra_node.node_data.length_range}", groups = {Created.class, Updated.class}) - private String nodeData; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.java deleted file mode 100644 index 86811103fd..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.metersphere.functional.mapper; - -import io.metersphere.functional.domain.CaseReviewFollow; -import io.metersphere.functional.domain.CaseReviewFollowExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface CaseReviewFollowMapper { - long countByExample(CaseReviewFollowExample example); - - int deleteByExample(CaseReviewFollowExample example); - - int deleteByPrimaryKey(@Param("reviewId") String reviewId, @Param("followId") String followId); - - int insert(CaseReviewFollow record); - - int insertSelective(CaseReviewFollow record); - - List selectByExample(CaseReviewFollowExample example); - - int updateByExampleSelective(@Param("record") CaseReviewFollow record, @Param("example") CaseReviewFollowExample example); - - int updateByExample(@Param("record") CaseReviewFollow record, @Param("example") CaseReviewFollowExample example); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowerMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowerMapper.java new file mode 100644 index 0000000000..17239c76cc --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowerMapper.java @@ -0,0 +1,24 @@ +package io.metersphere.functional.mapper; + +import io.metersphere.functional.domain.CaseReviewFollower; +import io.metersphere.functional.domain.CaseReviewFollowerExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CaseReviewFollowerMapper { + long countByExample(CaseReviewFollowerExample example); + + int deleteByExample(CaseReviewFollowerExample example); + + int deleteByPrimaryKey(@Param("reviewId") String reviewId, @Param("userId") String userId); + + int insert(CaseReviewFollower record); + + int insertSelective(CaseReviewFollower record); + + List selectByExample(CaseReviewFollowerExample example); + + int updateByExampleSelective(@Param("record") CaseReviewFollower record, @Param("example") CaseReviewFollowerExample example); + + int updateByExample(@Param("record") CaseReviewFollower record, @Param("example") CaseReviewFollowerExample example); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowerMapper.xml similarity index 80% rename from backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowerMapper.xml index 25c6fdb479..f062dd22b3 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFollowerMapper.xml @@ -1,9 +1,9 @@ - - + + - + @@ -64,15 +64,15 @@ - review_id, follow_id + review_id, user_id - select distinct - from case_review_follow + from case_review_follower @@ -81,53 +81,53 @@ - delete from case_review_follow + delete from case_review_follower where review_id = #{reviewId,jdbcType=VARCHAR} - and follow_id = #{followId,jdbcType=VARCHAR} + and user_id = #{userId,jdbcType=VARCHAR} - - delete from case_review_follow + + delete from case_review_follower - - insert into case_review_follow (review_id, follow_id) - values (#{reviewId,jdbcType=VARCHAR}, #{followId,jdbcType=VARCHAR}) + + insert into case_review_follower (review_id, user_id) + values (#{reviewId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}) - - insert into case_review_follow + + insert into case_review_follower review_id, - - follow_id, + + user_id, #{reviewId,jdbcType=VARCHAR}, - - #{followId,jdbcType=VARCHAR}, + + #{userId,jdbcType=VARCHAR}, - + select count(*) from case_review_follower - update case_review_follow + update case_review_follower review_id = #{record.reviewId,jdbcType=VARCHAR}, - - follow_id = #{record.followId,jdbcType=VARCHAR}, + + user_id = #{record.userId,jdbcType=VARCHAR}, @@ -135,9 +135,9 @@ - update case_review_follow + update case_review_follower set review_id = #{record.reviewId,jdbcType=VARCHAR}, - follow_id = #{record.followId,jdbcType=VARCHAR} + user_id = #{record.userId,jdbcType=VARCHAR} diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.java deleted file mode 100644 index 1632e08e94..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.metersphere.functional.mapper; - -import io.metersphere.functional.domain.CustomFieldTestCase; -import io.metersphere.functional.domain.CustomFieldTestCaseExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface CustomFieldTestCaseMapper { - long countByExample(CustomFieldTestCaseExample example); - - int deleteByExample(CustomFieldTestCaseExample example); - - int deleteByPrimaryKey(@Param("resourceId") String resourceId, @Param("fieldId") String fieldId); - - int insert(CustomFieldTestCase record); - - int insertSelective(CustomFieldTestCase record); - - List selectByExampleWithBLOBs(CustomFieldTestCaseExample example); - - List selectByExample(CustomFieldTestCaseExample example); - - CustomFieldTestCase selectByPrimaryKey(@Param("resourceId") String resourceId, @Param("fieldId") String fieldId); - - int updateByExampleSelective(@Param("record") CustomFieldTestCase record, @Param("example") CustomFieldTestCaseExample example); - - int updateByExampleWithBLOBs(@Param("record") CustomFieldTestCase record, @Param("example") CustomFieldTestCaseExample example); - - int updateByExample(@Param("record") CustomFieldTestCase record, @Param("example") CustomFieldTestCaseExample example); - - int updateByPrimaryKeySelective(CustomFieldTestCase record); - - int updateByPrimaryKeyWithBLOBs(CustomFieldTestCase record); - - int updateByPrimaryKey(CustomFieldTestCase record); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCustomFieldMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCustomFieldMapper.java new file mode 100644 index 0000000000..b1c02db691 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCustomFieldMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.functional.mapper; + +import io.metersphere.functional.domain.FunctionalCaseCustomField; +import io.metersphere.functional.domain.FunctionalCaseCustomFieldExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FunctionalCaseCustomFieldMapper { + long countByExample(FunctionalCaseCustomFieldExample example); + + int deleteByExample(FunctionalCaseCustomFieldExample example); + + int deleteByPrimaryKey(@Param("caseId") String caseId, @Param("fieldId") String fieldId); + + int insert(FunctionalCaseCustomField record); + + int insertSelective(FunctionalCaseCustomField record); + + List selectByExampleWithBLOBs(FunctionalCaseCustomFieldExample example); + + List selectByExample(FunctionalCaseCustomFieldExample example); + + FunctionalCaseCustomField selectByPrimaryKey(@Param("caseId") String caseId, @Param("fieldId") String fieldId); + + int updateByExampleSelective(@Param("record") FunctionalCaseCustomField record, @Param("example") FunctionalCaseCustomFieldExample example); + + int updateByExampleWithBLOBs(@Param("record") FunctionalCaseCustomField record, @Param("example") FunctionalCaseCustomFieldExample example); + + int updateByExample(@Param("record") FunctionalCaseCustomField record, @Param("example") FunctionalCaseCustomFieldExample example); + + int updateByPrimaryKeySelective(FunctionalCaseCustomField record); + + int updateByPrimaryKeyWithBLOBs(FunctionalCaseCustomField record); + + int updateByPrimaryKey(FunctionalCaseCustomField record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCustomFieldMapper.xml similarity index 77% rename from backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCustomFieldMapper.xml index 3a3f20bb18..301725890d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CustomFieldTestCaseMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseCustomFieldMapper.xml @@ -1,12 +1,12 @@ - - - + + + - + @@ -68,12 +68,12 @@ - resource_id, field_id, `value` + case_id, field_id, `value` text_value - select distinct @@ -81,7 +81,7 @@ , - from custom_field_test_case + from functional_case_custom_field @@ -89,13 +89,13 @@ order by ${orderByClause} - select distinct - from custom_field_test_case + from functional_case_custom_field @@ -108,32 +108,32 @@ , - from custom_field_test_case - where resource_id = #{resourceId,jdbcType=VARCHAR} + from functional_case_custom_field + where case_id = #{caseId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} - delete from custom_field_test_case - where resource_id = #{resourceId,jdbcType=VARCHAR} + delete from functional_case_custom_field + where case_id = #{caseId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} - - delete from custom_field_test_case + + delete from functional_case_custom_field - - insert into custom_field_test_case (resource_id, field_id, `value`, + + insert into functional_case_custom_field (case_id, field_id, `value`, text_value) - values (#{resourceId,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR}, + values (#{caseId,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR}, #{textValue,jdbcType=LONGVARCHAR}) - - insert into custom_field_test_case + + insert into functional_case_custom_field - - resource_id, + + case_id, field_id, @@ -146,8 +146,8 @@ - - #{resourceId,jdbcType=VARCHAR}, + + #{caseId,jdbcType=VARCHAR}, #{fieldId,jdbcType=VARCHAR}, @@ -160,17 +160,17 @@ - + select count(*) from functional_case_custom_field - update custom_field_test_case + update functional_case_custom_field - - resource_id = #{record.resourceId,jdbcType=VARCHAR}, + + case_id = #{record.caseId,jdbcType=VARCHAR}, field_id = #{record.fieldId,jdbcType=VARCHAR}, @@ -187,8 +187,8 @@ - update custom_field_test_case - set resource_id = #{record.resourceId,jdbcType=VARCHAR}, + update functional_case_custom_field + set case_id = #{record.caseId,jdbcType=VARCHAR}, field_id = #{record.fieldId,jdbcType=VARCHAR}, `value` = #{record.value,jdbcType=VARCHAR}, text_value = #{record.textValue,jdbcType=LONGVARCHAR} @@ -197,16 +197,16 @@ - update custom_field_test_case - set resource_id = #{record.resourceId,jdbcType=VARCHAR}, + update functional_case_custom_field + set case_id = #{record.caseId,jdbcType=VARCHAR}, field_id = #{record.fieldId,jdbcType=VARCHAR}, `value` = #{record.value,jdbcType=VARCHAR} - - update custom_field_test_case + + update functional_case_custom_field `value` = #{value,jdbcType=VARCHAR}, @@ -215,20 +215,20 @@ text_value = #{textValue,jdbcType=LONGVARCHAR}, - where resource_id = #{resourceId,jdbcType=VARCHAR} + where case_id = #{caseId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} - - update custom_field_test_case + + update functional_case_custom_field set `value` = #{value,jdbcType=VARCHAR}, text_value = #{textValue,jdbcType=LONGVARCHAR} - where resource_id = #{resourceId,jdbcType=VARCHAR} + where case_id = #{caseId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} - - update custom_field_test_case + + update functional_case_custom_field set `value` = #{value,jdbcType=VARCHAR} - where resource_id = #{resourceId,jdbcType=VARCHAR} + where case_id = #{caseId,jdbcType=VARCHAR} and field_id = #{fieldId,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.java deleted file mode 100644 index bd9e2992d7..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.metersphere.functional.mapper; - -import io.metersphere.functional.domain.FunctionalCaseFollow; -import io.metersphere.functional.domain.FunctionalCaseFollowExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface FunctionalCaseFollowMapper { - long countByExample(FunctionalCaseFollowExample example); - - int deleteByExample(FunctionalCaseFollowExample example); - - int deleteByPrimaryKey(@Param("caseId") String caseId, @Param("followId") String followId); - - int insert(FunctionalCaseFollow record); - - int insertSelective(FunctionalCaseFollow record); - - List selectByExample(FunctionalCaseFollowExample example); - - int updateByExampleSelective(@Param("record") FunctionalCaseFollow record, @Param("example") FunctionalCaseFollowExample example); - - int updateByExample(@Param("record") FunctionalCaseFollow record, @Param("example") FunctionalCaseFollowExample example); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowerMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowerMapper.java new file mode 100644 index 0000000000..90e5145b54 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowerMapper.java @@ -0,0 +1,24 @@ +package io.metersphere.functional.mapper; + +import io.metersphere.functional.domain.FunctionalCaseFollower; +import io.metersphere.functional.domain.FunctionalCaseFollowerExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FunctionalCaseFollowerMapper { + long countByExample(FunctionalCaseFollowerExample example); + + int deleteByExample(FunctionalCaseFollowerExample example); + + int deleteByPrimaryKey(@Param("caseId") String caseId, @Param("userId") String userId); + + int insert(FunctionalCaseFollower record); + + int insertSelective(FunctionalCaseFollower record); + + List selectByExample(FunctionalCaseFollowerExample example); + + int updateByExampleSelective(@Param("record") FunctionalCaseFollower record, @Param("example") FunctionalCaseFollowerExample example); + + int updateByExample(@Param("record") FunctionalCaseFollower record, @Param("example") FunctionalCaseFollowerExample example); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowerMapper.xml similarity index 79% rename from backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowerMapper.xml index 8db7c668de..b4dd876de2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseFollowerMapper.xml @@ -1,9 +1,9 @@ - - + + - + @@ -64,15 +64,15 @@ - case_id, follow_id + case_id, user_id - select distinct - from functional_case_follow + from functional_case_follower @@ -81,53 +81,53 @@ - delete from functional_case_follow + delete from functional_case_follower where case_id = #{caseId,jdbcType=VARCHAR} - and follow_id = #{followId,jdbcType=VARCHAR} + and user_id = #{userId,jdbcType=VARCHAR} - - delete from functional_case_follow + + delete from functional_case_follower - - insert into functional_case_follow (case_id, follow_id) - values (#{caseId,jdbcType=VARCHAR}, #{followId,jdbcType=VARCHAR}) + + insert into functional_case_follower (case_id, user_id) + values (#{caseId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}) - - insert into functional_case_follow + + insert into functional_case_follower case_id, - - follow_id, + + user_id, #{caseId,jdbcType=VARCHAR}, - - #{followId,jdbcType=VARCHAR}, + + #{userId,jdbcType=VARCHAR}, - + select count(*) from functional_case_follower - update functional_case_follow + update functional_case_follower case_id = #{record.caseId,jdbcType=VARCHAR}, - - follow_id = #{record.followId,jdbcType=VARCHAR}, + + user_id = #{record.userId,jdbcType=VARCHAR}, @@ -135,9 +135,9 @@ - update functional_case_follow + update functional_case_follower set case_id = #{record.caseId,jdbcType=VARCHAR}, - follow_id = #{record.followId,jdbcType=VARCHAR} + user_id = #{record.userId,jdbcType=VARCHAR} diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalMinderExtraNodeMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalMinderExtraNodeMapper.java new file mode 100644 index 0000000000..bc39ab0c9f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalMinderExtraNodeMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.functional.mapper; + +import io.metersphere.functional.domain.FunctionalMinderExtraNode; +import io.metersphere.functional.domain.FunctionalMinderExtraNodeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FunctionalMinderExtraNodeMapper { + long countByExample(FunctionalMinderExtraNodeExample example); + + int deleteByExample(FunctionalMinderExtraNodeExample example); + + int deleteByPrimaryKey(String id); + + int insert(FunctionalMinderExtraNode record); + + int insertSelective(FunctionalMinderExtraNode record); + + List selectByExampleWithBLOBs(FunctionalMinderExtraNodeExample example); + + List selectByExample(FunctionalMinderExtraNodeExample example); + + FunctionalMinderExtraNode selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") FunctionalMinderExtraNode record, @Param("example") FunctionalMinderExtraNodeExample example); + + int updateByExampleWithBLOBs(@Param("record") FunctionalMinderExtraNode record, @Param("example") FunctionalMinderExtraNodeExample example); + + int updateByExample(@Param("record") FunctionalMinderExtraNode record, @Param("example") FunctionalMinderExtraNodeExample example); + + int updateByPrimaryKeySelective(FunctionalMinderExtraNode record); + + int updateByPrimaryKeyWithBLOBs(FunctionalMinderExtraNode record); + + int updateByPrimaryKey(FunctionalMinderExtraNode record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalMinderExtraNodeMapper.xml similarity index 80% rename from backend/framework/domain/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalMinderExtraNodeMapper.xml index 79207a7762..8be7da2403 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalMinderExtraNodeMapper.xml @@ -1,13 +1,12 @@ - - + + - - + @@ -69,12 +68,12 @@ - id, parent_id, group_id, `type` + id, parent_id, group_id node_data - select distinct @@ -82,7 +81,7 @@ , - from minder_extra_node + from functional_minder_extra_node @@ -90,13 +89,13 @@ order by ${orderByClause} - select distinct - from minder_extra_node + from functional_minder_extra_node @@ -109,27 +108,27 @@ , - from minder_extra_node + from functional_minder_extra_node where id = #{id,jdbcType=VARCHAR} - delete from minder_extra_node + delete from functional_minder_extra_node where id = #{id,jdbcType=VARCHAR} - - delete from minder_extra_node + + delete from functional_minder_extra_node - - insert into minder_extra_node (id, parent_id, group_id, - `type`, node_data) + + insert into functional_minder_extra_node (id, parent_id, group_id, + node_data) values (#{id,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR}, - #{type,jdbcType=VARCHAR}, #{nodeData,jdbcType=LONGVARCHAR}) + #{nodeData,jdbcType=LONGVARCHAR}) - - insert into minder_extra_node + + insert into functional_minder_extra_node id, @@ -140,9 +139,6 @@ group_id, - - `type`, - node_data, @@ -157,22 +153,19 @@ #{groupId,jdbcType=VARCHAR}, - - #{type,jdbcType=VARCHAR}, - #{nodeData,jdbcType=LONGVARCHAR}, - + select count(*) from functional_minder_extra_node - update minder_extra_node + update functional_minder_extra_node id = #{record.id,jdbcType=VARCHAR}, @@ -183,9 +176,6 @@ group_id = #{record.groupId,jdbcType=VARCHAR}, - - `type` = #{record.type,jdbcType=VARCHAR}, - node_data = #{record.nodeData,jdbcType=LONGVARCHAR}, @@ -195,28 +185,26 @@ - update minder_extra_node + update functional_minder_extra_node set id = #{record.id,jdbcType=VARCHAR}, parent_id = #{record.parentId,jdbcType=VARCHAR}, group_id = #{record.groupId,jdbcType=VARCHAR}, - `type` = #{record.type,jdbcType=VARCHAR}, node_data = #{record.nodeData,jdbcType=LONGVARCHAR} - update minder_extra_node + update functional_minder_extra_node set id = #{record.id,jdbcType=VARCHAR}, parent_id = #{record.parentId,jdbcType=VARCHAR}, - group_id = #{record.groupId,jdbcType=VARCHAR}, - `type` = #{record.type,jdbcType=VARCHAR} + group_id = #{record.groupId,jdbcType=VARCHAR} - - update minder_extra_node + + update functional_minder_extra_node parent_id = #{parentId,jdbcType=VARCHAR}, @@ -224,28 +212,23 @@ group_id = #{groupId,jdbcType=VARCHAR}, - - `type` = #{type,jdbcType=VARCHAR}, - node_data = #{nodeData,jdbcType=LONGVARCHAR}, where id = #{id,jdbcType=VARCHAR} - - update minder_extra_node + + update functional_minder_extra_node set parent_id = #{parentId,jdbcType=VARCHAR}, group_id = #{groupId,jdbcType=VARCHAR}, - `type` = #{type,jdbcType=VARCHAR}, node_data = #{nodeData,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} - - update minder_extra_node + + update functional_minder_extra_node set parent_id = #{parentId,jdbcType=VARCHAR}, - group_id = #{groupId,jdbcType=VARCHAR}, - `type` = #{type,jdbcType=VARCHAR} + group_id = #{groupId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.java deleted file mode 100644 index 046c7f8c2c..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/MinderExtraNodeMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.metersphere.functional.mapper; - -import io.metersphere.functional.domain.MinderExtraNode; -import io.metersphere.functional.domain.MinderExtraNodeExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface MinderExtraNodeMapper { - long countByExample(MinderExtraNodeExample example); - - int deleteByExample(MinderExtraNodeExample example); - - int deleteByPrimaryKey(String id); - - int insert(MinderExtraNode record); - - int insertSelective(MinderExtraNode record); - - List selectByExampleWithBLOBs(MinderExtraNodeExample example); - - List selectByExample(MinderExtraNodeExample example); - - MinderExtraNode selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") MinderExtraNode record, @Param("example") MinderExtraNodeExample example); - - int updateByExampleWithBLOBs(@Param("record") MinderExtraNode record, @Param("example") MinderExtraNodeExample example); - - int updateByExample(@Param("record") MinderExtraNode record, @Param("example") MinderExtraNodeExample example); - - int updateByPrimaryKeySelective(MinderExtraNode record); - - int updateByPrimaryKeyWithBLOBs(MinderExtraNode record); - - int updateByPrimaryKey(MinderExtraNode record); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/CustomFieldIssues.java b/backend/framework/domain/src/main/java/io/metersphere/issue/domain/CustomFieldIssues.java deleted file mode 100644 index 1fee8238a9..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/CustomFieldIssues.java +++ /dev/null @@ -1,28 +0,0 @@ -package io.metersphere.issue.domain; - -import io.metersphere.validation.groups.*; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; -import java.io.Serializable; -import lombok.Data; - -@Data -public class CustomFieldIssues implements Serializable { - @Schema(title = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{custom_field_issues.resource_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{custom_field_issues.resource_id.length_range}", groups = {Created.class, Updated.class}) - private String resourceId; - - @Schema(title = "字段ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{custom_field_issues.field_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{custom_field_issues.field_id.length_range}", groups = {Created.class, Updated.class}) - private String fieldId; - - @Schema(title = "字段值") - private String value; - - @Schema(title = "文本类型字段值") - private byte[] textValue; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueAttachment.java b/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueAttachment.java deleted file mode 100644 index 848e6d264a..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueAttachment.java +++ /dev/null @@ -1,22 +0,0 @@ -package io.metersphere.issue.domain; - -import io.metersphere.validation.groups.*; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; -import java.io.Serializable; -import lombok.Data; - -@Data -public class IssueAttachment implements Serializable { - @Schema(title = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_attachment.issue_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issue_attachment.issue_id.length_range}", groups = {Created.class, Updated.class}) - private String issueId; - - @Schema(title = "文件的ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_attachment.file_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issue_attachment.file_id.length_range}", groups = {Created.class, Updated.class}) - private String fileId; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueComment.java b/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueComment.java deleted file mode 100644 index 4ddce59006..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssueComment.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.metersphere.issue.domain; - -import io.metersphere.validation.groups.*; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; -import java.io.Serializable; -import lombok.Data; - -@Data -public class IssueComment implements Serializable { - @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_comment.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 64, message = "{issue_comment.id.length_range}", groups = {Created.class, Updated.class}) - private String id; - - @Schema(title = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_comment.issue_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 64, message = "{issue_comment.issue_id.length_range}", groups = {Created.class, Updated.class}) - private String issueId; - - @Schema(title = "评论人") - private String createUser; - - @Schema(title = "创建时间") - private Long createTime; - - @Schema(title = "更新时间") - private Long updateTime; - - @Schema(title = "内容", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_comment.description.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 65535, message = "{issue_comment.description.length_range}", groups = {Created.class, Updated.class}) - private String description; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssuesFunctionalCase.java b/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssuesFunctionalCase.java deleted file mode 100644 index c04f67f306..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/domain/IssuesFunctionalCase.java +++ /dev/null @@ -1,43 +0,0 @@ -package io.metersphere.issue.domain; - -import io.metersphere.validation.groups.*; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; -import java.io.Serializable; -import lombok.Data; - -@Data -public class IssuesFunctionalCase implements Serializable { - @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issues_functional_case.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{issues_functional_case.id.length_range}", groups = {Created.class, Updated.class}) - private String id; - - @Schema(title = "功能用例或测试计划功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issues_functional_case.resource_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issues_functional_case.resource_id.length_range}", groups = {Created.class, Updated.class}) - private String resourceId; - - @Schema(title = "缺陷ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issues_functional_case.issues_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issues_functional_case.issues_id.length_range}", groups = {Created.class, Updated.class}) - private String issuesId; - - @Schema(title = "关联的类型:关联功能用例/关联测试计划功能用例", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issues_functional_case.ref_type.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 64, message = "{issues_functional_case.ref_type.length_range}", groups = {Created.class, Updated.class}) - private String refType; - - @Schema(title = "测试计划的用例所指向的用例的id", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issues_functional_case.ref_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issues_functional_case.ref_id.length_range}", groups = {Created.class, Updated.class}) - private String refId; - - @Schema(title = "创建时间") - private Long createTime; - - @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/issue/mapper/CustomFieldIssuesMapper.java b/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/CustomFieldIssuesMapper.java deleted file mode 100644 index 8c1d69f447..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/CustomFieldIssuesMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.metersphere.issue.mapper; - -import io.metersphere.issue.domain.CustomFieldIssues; -import io.metersphere.issue.domain.CustomFieldIssuesExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface CustomFieldIssuesMapper { - long countByExample(CustomFieldIssuesExample example); - - int deleteByExample(CustomFieldIssuesExample example); - - int deleteByPrimaryKey(@Param("resourceId") String resourceId, @Param("fieldId") String fieldId); - - int insert(CustomFieldIssues record); - - int insertSelective(CustomFieldIssues record); - - List selectByExampleWithBLOBs(CustomFieldIssuesExample example); - - List selectByExample(CustomFieldIssuesExample example); - - CustomFieldIssues selectByPrimaryKey(@Param("resourceId") String resourceId, @Param("fieldId") String fieldId); - - int updateByExampleSelective(@Param("record") CustomFieldIssues record, @Param("example") CustomFieldIssuesExample example); - - int updateByExampleWithBLOBs(@Param("record") CustomFieldIssues record, @Param("example") CustomFieldIssuesExample example); - - int updateByExample(@Param("record") CustomFieldIssues record, @Param("example") CustomFieldIssuesExample example); - - int updateByPrimaryKeySelective(CustomFieldIssues record); - - int updateByPrimaryKeyWithBLOBs(CustomFieldIssues record); - - int updateByPrimaryKey(CustomFieldIssues record); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueAttachmentMapper.java b/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueAttachmentMapper.java deleted file mode 100644 index 5bc44b410e..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueAttachmentMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.metersphere.issue.mapper; - -import io.metersphere.issue.domain.IssueAttachment; -import io.metersphere.issue.domain.IssueAttachmentExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface IssueAttachmentMapper { - long countByExample(IssueAttachmentExample example); - - int deleteByExample(IssueAttachmentExample example); - - int deleteByPrimaryKey(@Param("issueId") String issueId, @Param("fileId") String fileId); - - int insert(IssueAttachment record); - - int insertSelective(IssueAttachment record); - - List selectByExample(IssueAttachmentExample example); - - int updateByExampleSelective(@Param("record") IssueAttachment record, @Param("example") IssueAttachmentExample example); - - int updateByExample(@Param("record") IssueAttachment record, @Param("example") IssueAttachmentExample example); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueBlobMapper.java deleted file mode 100644 index 0b4d69668e..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueBlobMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -package io.metersphere.issue.mapper; - -import io.metersphere.issue.domain.IssueBlob; -import io.metersphere.issue.domain.IssueBlobExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface IssueBlobMapper { - long countByExample(IssueBlobExample example); - - int deleteByExample(IssueBlobExample example); - - int deleteByPrimaryKey(String id); - - int insert(IssueBlob record); - - int insertSelective(IssueBlob record); - - List selectByExampleWithBLOBs(IssueBlobExample example); - - List selectByExample(IssueBlobExample example); - - IssueBlob selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") IssueBlob record, @Param("example") IssueBlobExample example); - - int updateByExampleWithBLOBs(@Param("record") IssueBlob record, @Param("example") IssueBlobExample example); - - int updateByExample(@Param("record") IssueBlob record, @Param("example") IssueBlobExample example); - - int updateByPrimaryKeySelective(IssueBlob record); - - int updateByPrimaryKeyWithBLOBs(IssueBlob record); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueCommentMapper.java b/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueCommentMapper.java deleted file mode 100644 index 6ab3eece58..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueCommentMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.metersphere.issue.mapper; - -import io.metersphere.issue.domain.IssueComment; -import io.metersphere.issue.domain.IssueCommentExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface IssueCommentMapper { - long countByExample(IssueCommentExample example); - - int deleteByExample(IssueCommentExample example); - - int deleteByPrimaryKey(String id); - - int insert(IssueComment record); - - int insertSelective(IssueComment record); - - List selectByExampleWithBLOBs(IssueCommentExample example); - - List selectByExample(IssueCommentExample example); - - IssueComment selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") IssueComment record, @Param("example") IssueCommentExample example); - - int updateByExampleWithBLOBs(@Param("record") IssueComment record, @Param("example") IssueCommentExample example); - - int updateByExample(@Param("record") IssueComment record, @Param("example") IssueCommentExample example); - - int updateByPrimaryKeySelective(IssueComment record); - - int updateByPrimaryKeyWithBLOBs(IssueComment record); - - int updateByPrimaryKey(IssueComment record); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueFollowMapper.java b/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueFollowMapper.java deleted file mode 100644 index 9f09d58212..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueFollowMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.metersphere.issue.mapper; - -import io.metersphere.issue.domain.IssueFollow; -import io.metersphere.issue.domain.IssueFollowExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface IssueFollowMapper { - long countByExample(IssueFollowExample example); - - int deleteByExample(IssueFollowExample example); - - int deleteByPrimaryKey(@Param("issueId") String issueId, @Param("followId") String followId); - - int insert(IssueFollow record); - - int insertSelective(IssueFollow record); - - List selectByExample(IssueFollowExample example); - - int updateByExampleSelective(@Param("record") IssueFollow record, @Param("example") IssueFollowExample example); - - int updateByExample(@Param("record") IssueFollow record, @Param("example") IssueFollowExample example); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueMapper.java b/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueMapper.java deleted file mode 100644 index 37b025fdb9..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssueMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.metersphere.issue.mapper; - -import io.metersphere.issue.domain.Issue; -import io.metersphere.issue.domain.IssueExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface IssueMapper { - long countByExample(IssueExample example); - - int deleteByExample(IssueExample example); - - int deleteByPrimaryKey(String id); - - int insert(Issue record); - - int insertSelective(Issue record); - - List selectByExample(IssueExample example); - - Issue selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") Issue record, @Param("example") IssueExample example); - - int updateByExample(@Param("record") Issue record, @Param("example") IssueExample example); - - int updateByPrimaryKeySelective(Issue record); - - int updateByPrimaryKey(Issue record); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssuesFunctionalCaseMapper.java b/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssuesFunctionalCaseMapper.java deleted file mode 100644 index 343811d067..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/issue/mapper/IssuesFunctionalCaseMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.metersphere.issue.mapper; - -import io.metersphere.issue.domain.IssuesFunctionalCase; -import io.metersphere.issue.domain.IssuesFunctionalCaseExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface IssuesFunctionalCaseMapper { - long countByExample(IssuesFunctionalCaseExample example); - - int deleteByExample(IssuesFunctionalCaseExample example); - - int deleteByPrimaryKey(String id); - - int insert(IssuesFunctionalCase record); - - int insertSelective(IssuesFunctionalCase record); - - List selectByExample(IssuesFunctionalCaseExample example); - - IssuesFunctionalCase selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") IssuesFunctionalCase record, @Param("example") IssuesFunctionalCaseExample example); - - int updateByExample(@Param("record") IssuesFunctionalCase record, @Param("example") IssuesFunctionalCaseExample example); - - int updateByPrimaryKeySelective(IssuesFunctionalCase record); - - int updateByPrimaryKey(IssuesFunctionalCase record); -} \ 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/BugTemplate.java similarity index 54% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplate.java rename to backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplate.java index fadbd58409..4a30cb3ac4 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/BugTemplate.java @@ -7,22 +7,22 @@ import java.io.Serializable; import lombok.Data; @Data -public class IssueTemplate implements Serializable { +public class BugTemplate implements Serializable { @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_template.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{issue_template.id.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug_template.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{bug_template.id.length_range}", groups = {Created.class, Updated.class}) private String id; @Schema(title = "名称", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_template.name.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 255, message = "{issue_template.name.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug_template.name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 255, message = "{bug_template.name.length_range}", groups = {Created.class, Updated.class}) private String name; @Schema(title = "描述") private String description; @Schema(title = "是否是系统模板", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "{issue_template.system.not_blank}", groups = {Created.class}) + @NotNull(message = "{bug_template.system.not_blank}", groups = {Created.class}) private Boolean system; @Schema(title = "创建时间") @@ -32,8 +32,8 @@ public class IssueTemplate implements Serializable { private String createUser; @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_template.project_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{issue_template.project_id.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug_template.project_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{bug_template.project_id.length_range}", groups = {Created.class, Updated.class}) private String projectId; private static final long serialVersionUID = 1L; 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/BugTemplateExample.java similarity index 99% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExample.java rename to backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExample.java index 95dbb8281e..80891f67d3 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExample.java @@ -3,14 +3,14 @@ package io.metersphere.project.domain; import java.util.ArrayList; import java.util.List; -public class IssueTemplateExample { +public class BugTemplateExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public IssueTemplateExample() { + public BugTemplateExample() { oredCriteria = new ArrayList(); } 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/BugTemplateExtend.java similarity index 66% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtend.java rename to backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtend.java index 171dd68575..cf6bfd05d6 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/BugTemplateExtend.java @@ -7,10 +7,10 @@ import java.io.Serializable; import lombok.Data; @Data -public class IssueTemplateExtend implements Serializable { +public class BugTemplateExtend implements Serializable { @Schema(title = "缺陷模板ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{issue_template_extend.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{issue_template_extend.id.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{bug_template_extend.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{bug_template_extend.id.length_range}", groups = {Created.class, Updated.class}) private String id; @Schema(title = "缺陷标题模板") 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/BugTemplateExtendExample.java similarity index 99% rename from backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtendExample.java rename to backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtendExample.java index 1681fecaea..3f83318684 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/IssueTemplateExtendExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/BugTemplateExtendExample.java @@ -3,14 +3,14 @@ package io.metersphere.project.domain; import java.util.ArrayList; import java.util.List; -public class IssueTemplateExtendExample { +public class BugTemplateExtendExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public IssueTemplateExtendExample() { + public BugTemplateExtendExample() { oredCriteria = new ArrayList(); } 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 9844103fe1..41f1598eea 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 @@ -43,10 +43,10 @@ public class ProjectExtend implements Serializable { private Boolean versionEnable; @Schema(title = "") - private String apiTemplateId; + private String issueConfig; @Schema(title = "") - private byte[] issueConfig; + private String apiTemplateId; 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 index a49a8e0c81..8d1a0be481 100644 --- 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 @@ -784,6 +784,76 @@ public class ProjectExtendExample { return (Criteria) this; } + public Criteria andIssueConfigIsNull() { + addCriterion("issue_config is null"); + return (Criteria) this; + } + + public Criteria andIssueConfigIsNotNull() { + addCriterion("issue_config is not null"); + return (Criteria) this; + } + + public Criteria andIssueConfigEqualTo(String value) { + addCriterion("issue_config =", value, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigNotEqualTo(String value) { + addCriterion("issue_config <>", value, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigGreaterThan(String value) { + addCriterion("issue_config >", value, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigGreaterThanOrEqualTo(String value) { + addCriterion("issue_config >=", value, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigLessThan(String value) { + addCriterion("issue_config <", value, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigLessThanOrEqualTo(String value) { + addCriterion("issue_config <=", value, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigLike(String value) { + addCriterion("issue_config like", value, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigNotLike(String value) { + addCriterion("issue_config not like", value, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigIn(List values) { + addCriterion("issue_config in", values, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigNotIn(List values) { + addCriterion("issue_config not in", values, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigBetween(String value1, String value2) { + addCriterion("issue_config between", value1, value2, "issueConfig"); + return (Criteria) this; + } + + public Criteria andIssueConfigNotBetween(String value1, String value2) { + addCriterion("issue_config not between", value1, value2, "issueConfig"); + return (Criteria) this; + } + public Criteria andApiTemplateIdIsNull() { addCriterion("api_template_id is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.java new file mode 100644 index 0000000000..828a174eac --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.BugTemplateExtend; +import io.metersphere.project.domain.BugTemplateExtendExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface BugTemplateExtendMapper { + long countByExample(BugTemplateExtendExample example); + + int deleteByExample(BugTemplateExtendExample example); + + int deleteByPrimaryKey(String id); + + int insert(BugTemplateExtend record); + + int insertSelective(BugTemplateExtend record); + + List selectByExampleWithBLOBs(BugTemplateExtendExample example); + + List selectByExample(BugTemplateExtendExample example); + + BugTemplateExtend selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") BugTemplateExtend record, @Param("example") BugTemplateExtendExample example); + + int updateByExampleWithBLOBs(@Param("record") BugTemplateExtend record, @Param("example") BugTemplateExtendExample example); + + int updateByExample(@Param("record") BugTemplateExtend record, @Param("example") BugTemplateExtendExample example); + + int updateByPrimaryKeySelective(BugTemplateExtend record); + + int updateByPrimaryKeyWithBLOBs(BugTemplateExtend record); + + int updateByPrimaryKey(BugTemplateExtend 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/BugTemplateExtendMapper.xml similarity index 86% rename from backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.xml index 6cfb259b7d..224b6d6540 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateExtendMapper.xml @@ -1,11 +1,11 @@ - - + + - + @@ -72,7 +72,7 @@ content - select distinct @@ -80,7 +80,7 @@ , - from issue_template_extend + from bug_template_extend @@ -88,13 +88,13 @@ order by ${orderByClause} - select distinct - from issue_template_extend + from bug_template_extend @@ -107,27 +107,27 @@ , - from issue_template_extend + from bug_template_extend where id = #{id,jdbcType=VARCHAR} - delete from issue_template_extend + delete from bug_template_extend where id = #{id,jdbcType=VARCHAR} - - delete from issue_template_extend + + delete from bug_template_extend - - insert into issue_template_extend (id, title, content + + insert into bug_template_extend (id, title, content ) values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR} ) - - insert into issue_template_extend + + insert into bug_template_extend id, @@ -151,14 +151,14 @@ - + select count(*) from bug_template_extend - update issue_template_extend + update bug_template_extend id = #{record.id,jdbcType=VARCHAR}, @@ -175,7 +175,7 @@ - update issue_template_extend + update bug_template_extend set id = #{record.id,jdbcType=VARCHAR}, title = #{record.title,jdbcType=VARCHAR}, content = #{record.content,jdbcType=LONGVARCHAR} @@ -184,15 +184,15 @@ - update issue_template_extend + update bug_template_extend set id = #{record.id,jdbcType=VARCHAR}, title = #{record.title,jdbcType=VARCHAR} - - update issue_template_extend + + update bug_template_extend title = #{title,jdbcType=VARCHAR}, @@ -203,14 +203,14 @@ where id = #{id,jdbcType=VARCHAR} - - update issue_template_extend + + update bug_template_extend set title = #{title,jdbcType=VARCHAR}, content = #{content,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} - - update issue_template_extend + + update bug_template_extend set title = #{title,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.java new file mode 100644 index 0000000000..9e8bf40352 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.project.mapper; + +import io.metersphere.project.domain.BugTemplate; +import io.metersphere.project.domain.BugTemplateExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface BugTemplateMapper { + long countByExample(BugTemplateExample example); + + int deleteByExample(BugTemplateExample example); + + int deleteByPrimaryKey(String id); + + int insert(BugTemplate record); + + int insertSelective(BugTemplate record); + + List selectByExample(BugTemplateExample example); + + BugTemplate selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") BugTemplate record, @Param("example") BugTemplateExample example); + + int updateByExample(@Param("record") BugTemplate record, @Param("example") BugTemplateExample example); + + int updateByPrimaryKeySelective(BugTemplate record); + + int updateByPrimaryKey(BugTemplate 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/BugTemplateMapper.xml similarity index 92% rename from backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.xml index 2c9065cfc9..c3bac4462b 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/BugTemplateMapper.xml @@ -1,7 +1,7 @@ - - + + @@ -71,13 +71,13 @@ id, `name`, description, `system`, create_time, create_user, project_id - select distinct - from issue_template + from bug_template @@ -88,29 +88,29 @@ - delete from issue_template + delete from bug_template where id = #{id,jdbcType=VARCHAR} - - delete from issue_template + + delete from bug_template - - insert into issue_template (id, `name`, description, + + insert into bug_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 + + insert into bug_template id, @@ -158,14 +158,14 @@ - + select count(*) from bug_template - update issue_template + update bug_template id = #{record.id,jdbcType=VARCHAR}, @@ -194,7 +194,7 @@ - update issue_template + update bug_template set id = #{record.id,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR}, description = #{record.description,jdbcType=VARCHAR}, @@ -206,8 +206,8 @@ - - update issue_template + + update bug_template `name` = #{name,jdbcType=VARCHAR}, @@ -230,8 +230,8 @@ where id = #{id,jdbcType=VARCHAR} - - update issue_template + + update bug_template set `name` = #{name,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR}, `system` = #{system,jdbcType=BIT}, 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 deleted file mode 100644 index 1ba517c10d..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateExtendMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -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 id); - - int insert(IssueTemplateExtend record); - - int insertSelective(IssueTemplateExtend record); - - List selectByExampleWithBLOBs(IssueTemplateExtendExample example); - - List selectByExample(IssueTemplateExtendExample example); - - IssueTemplateExtend selectByPrimaryKey(String id); - - 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/IssueTemplateMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.java deleted file mode 100644 index 021d5cc881..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/IssueTemplateMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -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/ProjectExtendMapper.java b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectExtendMapper.java index 4921ffeb10..f58d81c528 100644 --- 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 @@ -16,21 +16,15 @@ public interface ProjectExtendMapper { int insertSelective(ProjectExtend record); - List selectByExampleWithBLOBs(ProjectExtendExample example); - List selectByExample(ProjectExtendExample example); ProjectExtend selectByPrimaryKey(String id); 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 index d8bca540bf..752e0405f3 100644 --- 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 @@ -12,11 +12,9 @@ + - - - @@ -77,27 +75,8 @@ 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 + platform, third_part_template, version_enable, issue_config, api_template_id - - issue_config - - - select - , - from project_extend where id = #{id,jdbcType=VARCHAR} @@ -134,12 +111,12 @@ insert into project_extend (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 + version_enable, issue_config, api_template_id ) values (#{id,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} + #{versionEnable,jdbcType=BIT}, #{issueConfig,jdbcType=VARCHAR}, #{apiTemplateId,jdbcType=VARCHAR} ) @@ -175,12 +152,12 @@ version_enable, - - api_template_id, - issue_config, + + api_template_id, + @@ -213,12 +190,12 @@ #{versionEnable,jdbcType=BIT}, + + #{issueConfig,jdbcType=VARCHAR}, + #{apiTemplateId,jdbcType=VARCHAR}, - - #{issueConfig,jdbcType=LONGVARBINARY}, -