From 4030e11d643cca09dfbcec7293355f5ee8c22c88 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 17 Oct 2023 13:58:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20add=20domain=20field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/bug/domain/Bug.java | 36 ++-- .../io/metersphere/bug/domain/BugComment.java | 4 + .../bug/domain/BugCommentExample.java | 70 ++++++ .../io/metersphere/bug/domain/BugExample.java | 200 ++++++++++++++++++ .../io/metersphere/bug/mapper/BugMapper.xml | 78 ++++++- .../3.0.0/ddl/V3.0.0_7__bug_management.sql | 4 +- 6 files changed, 366 insertions(+), 26 deletions(-) diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/Bug.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/Bug.java index a587b97156..bb2201aa4a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/Bug.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/Bug.java @@ -14,61 +14,64 @@ import java.util.Arrays; @Data public class Bug implements Serializable { - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "ID", requiredMode = Schema.RequiredMode.REQUIRED) @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(description = "业务ID") + @Schema(title = "业务ID") private Integer num; - @Schema(description = "缺陷标题", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "缺陷标题", requiredMode = Schema.RequiredMode.REQUIRED) @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(description = "指派人", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "指派人", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{bug.assign_user.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{bug.assign_user.length_range}", groups = {Created.class, Updated.class}) private String assignUser; - @Schema(description = "创建人") + @Schema(title = "创建人") private String createUser; - @Schema(description = "创建时间") + @Schema(title = "创建时间") private Long createTime; - @Schema(description = "更新时间") + @Schema(title = "更新时间") private Long updateTime; - @Schema(description = "删除人") + @Schema(title = "删除人") private String deleteUser; - @Schema(description = "删除时间") + @Schema(title = "删除时间") private Long deleteTime; - @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) @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(description = "模板ID") + @Schema(title = "模板ID") private String templateId; - @Schema(description = "缺陷平台", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "缺陷平台", requiredMode = Schema.RequiredMode.REQUIRED) @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(description = "平台状态", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "状态", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{bug.status.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{bug.status.length_range}", groups = {Created.class, Updated.class}) private String status; - @Schema(description = "第三方平台缺陷ID") + @Schema(title = "标签") + private String tag; + + @Schema(title = "第三方平台缺陷ID") private String platformBugId; - @Schema(description = "是否回收站", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "是否回收站", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "{bug.trash.not_blank}", groups = {Created.class}) private Boolean trash; @@ -82,10 +85,13 @@ public class Bug implements Serializable { createUser("create_user", "createUser", "VARCHAR", false), createTime("create_time", "createTime", "BIGINT", false), updateTime("update_time", "updateTime", "BIGINT", false), + deleteUser("delete_user", "deleteUser", "VARCHAR", false), + deleteTime("delete_time", "deleteTime", "BIGINT", false), projectId("project_id", "projectId", "VARCHAR", false), templateId("template_id", "templateId", "VARCHAR", false), platform("platform", "platform", "VARCHAR", false), status("status", "status", "VARCHAR", true), + tag("tag", "tag", "VARCHAR", false), platformBugId("platform_bug_id", "platformBugId", "VARCHAR", false), trash("trash", "trash", "BIT", false); 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 index 59a4f07aa8..724320e309 100644 --- 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 @@ -26,6 +26,9 @@ public class BugComment implements Serializable { @Schema(description = "回复人") private String replyUser; + @Schema(description = "通知人") + private String notifier; + @Schema(description = "父评论ID") private String parentId; @@ -52,6 +55,7 @@ public class BugComment implements Serializable { id("id", "id", "VARCHAR", false), bugId("bug_id", "bugId", "VARCHAR", false), replyUser("reply_user", "replyUser", "VARCHAR", false), + notifier("notifier", "notifier", "VARCHAR", false), parentId("parent_id", "parentId", "VARCHAR", false), createUser("create_user", "createUser", "VARCHAR", false), createTime("create_time", "createTime", "BIGINT", false), diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCommentExample.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCommentExample.java index 56ff83234d..870fe3ecf2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCommentExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugCommentExample.java @@ -314,6 +314,76 @@ public class BugCommentExample { return (Criteria) this; } + public Criteria andNotifierIsNull() { + addCriterion("notifier is null"); + return (Criteria) this; + } + + public Criteria andNotifierIsNotNull() { + addCriterion("notifier is not null"); + return (Criteria) this; + } + + public Criteria andNotifierEqualTo(String value) { + addCriterion("notifier =", value, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierNotEqualTo(String value) { + addCriterion("notifier <>", value, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierGreaterThan(String value) { + addCriterion("notifier >", value, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierGreaterThanOrEqualTo(String value) { + addCriterion("notifier >=", value, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierLessThan(String value) { + addCriterion("notifier <", value, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierLessThanOrEqualTo(String value) { + addCriterion("notifier <=", value, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierLike(String value) { + addCriterion("notifier like", value, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierNotLike(String value) { + addCriterion("notifier not like", value, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierIn(List values) { + addCriterion("notifier in", values, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierNotIn(List values) { + addCriterion("notifier not in", values, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierBetween(String value1, String value2) { + addCriterion("notifier between", value1, value2, "notifier"); + return (Criteria) this; + } + + public Criteria andNotifierNotBetween(String value1, String value2) { + addCriterion("notifier not between", value1, value2, "notifier"); + return (Criteria) this; + } + public Criteria andParentIdIsNull() { addCriterion("parent_id is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugExample.java b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugExample.java index 6c1e66890a..ba71289126 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/domain/BugExample.java @@ -564,6 +564,136 @@ public class BugExample { return (Criteria) this; } + public Criteria andDeleteUserIsNull() { + addCriterion("delete_user is null"); + return (Criteria) this; + } + + public Criteria andDeleteUserIsNotNull() { + addCriterion("delete_user is not null"); + return (Criteria) this; + } + + public Criteria andDeleteUserEqualTo(String value) { + addCriterion("delete_user =", value, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserNotEqualTo(String value) { + addCriterion("delete_user <>", value, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserGreaterThan(String value) { + addCriterion("delete_user >", value, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserGreaterThanOrEqualTo(String value) { + addCriterion("delete_user >=", value, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserLessThan(String value) { + addCriterion("delete_user <", value, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserLessThanOrEqualTo(String value) { + addCriterion("delete_user <=", value, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserLike(String value) { + addCriterion("delete_user like", value, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserNotLike(String value) { + addCriterion("delete_user not like", value, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserIn(List values) { + addCriterion("delete_user in", values, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserNotIn(List values) { + addCriterion("delete_user not in", values, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserBetween(String value1, String value2) { + addCriterion("delete_user between", value1, value2, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteUserNotBetween(String value1, String value2) { + addCriterion("delete_user not between", value1, value2, "deleteUser"); + return (Criteria) this; + } + + public Criteria andDeleteTimeIsNull() { + addCriterion("delete_time is null"); + return (Criteria) this; + } + + public Criteria andDeleteTimeIsNotNull() { + addCriterion("delete_time is not null"); + return (Criteria) this; + } + + public Criteria andDeleteTimeEqualTo(Long value) { + addCriterion("delete_time =", value, "deleteTime"); + return (Criteria) this; + } + + public Criteria andDeleteTimeNotEqualTo(Long value) { + addCriterion("delete_time <>", value, "deleteTime"); + return (Criteria) this; + } + + public Criteria andDeleteTimeGreaterThan(Long value) { + addCriterion("delete_time >", value, "deleteTime"); + return (Criteria) this; + } + + public Criteria andDeleteTimeGreaterThanOrEqualTo(Long value) { + addCriterion("delete_time >=", value, "deleteTime"); + return (Criteria) this; + } + + public Criteria andDeleteTimeLessThan(Long value) { + addCriterion("delete_time <", value, "deleteTime"); + return (Criteria) this; + } + + public Criteria andDeleteTimeLessThanOrEqualTo(Long value) { + addCriterion("delete_time <=", value, "deleteTime"); + return (Criteria) this; + } + + public Criteria andDeleteTimeIn(List values) { + addCriterion("delete_time in", values, "deleteTime"); + return (Criteria) this; + } + + public Criteria andDeleteTimeNotIn(List values) { + addCriterion("delete_time not in", values, "deleteTime"); + return (Criteria) this; + } + + public Criteria andDeleteTimeBetween(Long value1, Long value2) { + addCriterion("delete_time between", value1, value2, "deleteTime"); + return (Criteria) this; + } + + public Criteria andDeleteTimeNotBetween(Long value1, Long value2) { + addCriterion("delete_time not between", value1, value2, "deleteTime"); + return (Criteria) this; + } + public Criteria andProjectIdIsNull() { addCriterion("project_id is null"); return (Criteria) this; @@ -844,6 +974,76 @@ public class BugExample { return (Criteria) this; } + public Criteria andTagIsNull() { + addCriterion("tag is null"); + return (Criteria) this; + } + + public Criteria andTagIsNotNull() { + addCriterion("tag is not null"); + return (Criteria) this; + } + + public Criteria andTagEqualTo(String value) { + addCriterion("tag =", value, "tag"); + return (Criteria) this; + } + + public Criteria andTagNotEqualTo(String value) { + addCriterion("tag <>", value, "tag"); + return (Criteria) this; + } + + public Criteria andTagGreaterThan(String value) { + addCriterion("tag >", value, "tag"); + return (Criteria) this; + } + + public Criteria andTagGreaterThanOrEqualTo(String value) { + addCriterion("tag >=", value, "tag"); + return (Criteria) this; + } + + public Criteria andTagLessThan(String value) { + addCriterion("tag <", value, "tag"); + return (Criteria) this; + } + + public Criteria andTagLessThanOrEqualTo(String value) { + addCriterion("tag <=", value, "tag"); + return (Criteria) this; + } + + public Criteria andTagLike(String value) { + addCriterion("tag like", value, "tag"); + return (Criteria) this; + } + + public Criteria andTagNotLike(String value) { + addCriterion("tag not like", value, "tag"); + return (Criteria) this; + } + + public Criteria andTagIn(List values) { + addCriterion("tag in", values, "tag"); + return (Criteria) this; + } + + public Criteria andTagNotIn(List values) { + addCriterion("tag not in", values, "tag"); + return (Criteria) this; + } + + public Criteria andTagBetween(String value1, String value2) { + addCriterion("tag between", value1, value2, "tag"); + return (Criteria) this; + } + + public Criteria andTagNotBetween(String value1, String value2) { + addCriterion("tag not between", value1, value2, "tag"); + return (Criteria) this; + } + public Criteria andPlatformBugIdIsNull() { addCriterion("platform_bug_id is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.xml index e087d0abd9..6592c3a2e1 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/bug/mapper/BugMapper.xml @@ -9,10 +9,13 @@ + + + @@ -75,8 +78,8 @@ - id, num, title, assign_user, create_user, create_time, update_time, project_id, template_id, - platform, `status`, platform_bug_id, trash + id, num, title, assign_user, create_user, create_time, update_time, delete_user, + delete_time, project_id, template_id, platform, `status`, tag, platform_bug_id, trash