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 435a7596ea..ea997e16d9 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 java.util.ArrayList; import java.util.Arrays; @@ -12,65 +10,77 @@ import lombok.Data; @Data public class CaseReview implements Serializable { - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review.id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{case_review.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review.name.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 200, message = "{case_review.name.length_range}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 255, message = "{case_review.name.length_range}", groups = {Created.class, Updated.class}) private String name; - @Schema(description = "评审状态:未开始/进行中/已完成/已结束/已归档", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{case_review.status.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 64, message = "{case_review.status.length_range}", groups = {Created.class, Updated.class}) - private String status; + @Schema(description = "模块id", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review.module_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{case_review.module_id.length_range}", groups = {Created.class, Updated.class}) + private String moduleId; - @Schema(description = "创建时间") - private Long createTime; - - @Schema(description = "更新时间") - private Long updateTime; - - @Schema(description = "评审结束时间", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{case_review.end_time.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 19, message = "{case_review.end_time.length_range}", groups = {Created.class, Updated.class}) - private Long endTime; - - @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review.project_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{case_review.project_id.length_range}", groups = {Created.class, Updated.class}) private String projectId; - @Schema(description = "标签") - private String tags; + @Schema(description = "评审状态:未开始/进行中/已完成/已结束/已归档", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review.status.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 64, message = "{case_review.status.length_range}", groups = {Created.class, Updated.class}) + private String status; - @Schema(description = "创建人") - private String createUser; - - @Schema(description = "评审规则:单人通过/全部通过", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "通过标准:单人通过/全部通过", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review.review_pass_rule.not_blank}", groups = {Created.class}) @Size(min = 1, max = 64, message = "{case_review.review_pass_rule.length_range}", groups = {Created.class, Updated.class}) private String reviewPassRule; - @Schema(description = "描述") + @Schema(description = "评审开始时间") + private Long startTime; + + @Schema(description = "评审结束时间") + private Long endTime; + + @Schema(description = "标签") + private String tags; + + @Schema(description = "描述") private String description; + @Schema(description = "创建时间") + private Long createTime; + + @Schema(description = "创建人") + private String createUser; + + @Schema(description = "更新时间") + private Long updateTime; + + @Schema(description = "更新人") + private String updateUser; + private static final long serialVersionUID = 1L; public enum Column { id("id", "id", "VARCHAR", false), name("name", "name", "VARCHAR", true), - status("status", "status", "VARCHAR", true), - createTime("create_time", "createTime", "BIGINT", false), - updateTime("update_time", "updateTime", "BIGINT", false), - endTime("end_time", "endTime", "BIGINT", false), + moduleId("module_id", "moduleId", "VARCHAR", false), projectId("project_id", "projectId", "VARCHAR", false), - tags("tags", "tags", "VARCHAR", false), - createUser("create_user", "createUser", "VARCHAR", false), + status("status", "status", "VARCHAR", true), reviewPassRule("review_pass_rule", "reviewPassRule", "VARCHAR", false), - description("description", "description", "LONGVARCHAR", false); + startTime("start_time", "startTime", "BIGINT", false), + endTime("end_time", "endTime", "BIGINT", false), + tags("tags", "tags", "VARCHAR", false), + description("description", "description", "VARCHAR", false), + createTime("create_time", "createTime", "BIGINT", false), + createUser("create_user", "createUser", "VARCHAR", false), + updateTime("update_time", "updateTime", "BIGINT", false), + updateUser("update_user", "updateUser", "VARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewExample.java index fab5a9e1ec..bcdbee68ff 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewExample.java @@ -244,253 +244,73 @@ public class CaseReviewExample { return (Criteria) this; } - public Criteria andStatusIsNull() { - addCriterion("`status` is null"); + public Criteria andModuleIdIsNull() { + addCriterion("module_id is null"); return (Criteria) this; } - public Criteria andStatusIsNotNull() { - addCriterion("`status` is not null"); + public Criteria andModuleIdIsNotNull() { + addCriterion("module_id is not null"); return (Criteria) this; } - public Criteria andStatusEqualTo(String value) { - addCriterion("`status` =", value, "status"); + public Criteria andModuleIdEqualTo(String value) { + addCriterion("module_id =", value, "moduleId"); return (Criteria) this; } - public Criteria andStatusNotEqualTo(String value) { - addCriterion("`status` <>", value, "status"); + public Criteria andModuleIdNotEqualTo(String value) { + addCriterion("module_id <>", value, "moduleId"); return (Criteria) this; } - public Criteria andStatusGreaterThan(String value) { - addCriterion("`status` >", value, "status"); + public Criteria andModuleIdGreaterThan(String value) { + addCriterion("module_id >", value, "moduleId"); return (Criteria) this; } - public Criteria andStatusGreaterThanOrEqualTo(String value) { - addCriterion("`status` >=", value, "status"); + public Criteria andModuleIdGreaterThanOrEqualTo(String value) { + addCriterion("module_id >=", value, "moduleId"); return (Criteria) this; } - public Criteria andStatusLessThan(String value) { - addCriterion("`status` <", value, "status"); + public Criteria andModuleIdLessThan(String value) { + addCriterion("module_id <", value, "moduleId"); return (Criteria) this; } - public Criteria andStatusLessThanOrEqualTo(String value) { - addCriterion("`status` <=", value, "status"); + public Criteria andModuleIdLessThanOrEqualTo(String value) { + addCriterion("module_id <=", value, "moduleId"); return (Criteria) this; } - public Criteria andStatusLike(String value) { - addCriterion("`status` like", value, "status"); + public Criteria andModuleIdLike(String value) { + addCriterion("module_id like", value, "moduleId"); return (Criteria) this; } - public Criteria andStatusNotLike(String value) { - addCriterion("`status` not like", value, "status"); + public Criteria andModuleIdNotLike(String value) { + addCriterion("module_id not like", value, "moduleId"); return (Criteria) this; } - public Criteria andStatusIn(List values) { - addCriterion("`status` in", values, "status"); + public Criteria andModuleIdIn(List values) { + addCriterion("module_id in", values, "moduleId"); return (Criteria) this; } - public Criteria andStatusNotIn(List values) { - addCriterion("`status` not in", values, "status"); + public Criteria andModuleIdNotIn(List values) { + addCriterion("module_id not in", values, "moduleId"); return (Criteria) this; } - public Criteria andStatusBetween(String value1, String value2) { - addCriterion("`status` between", value1, value2, "status"); + public Criteria andModuleIdBetween(String value1, String value2) { + addCriterion("module_id between", value1, value2, "moduleId"); return (Criteria) this; } - public Criteria andStatusNotBetween(String value1, String value2) { - addCriterion("`status` not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("create_time is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("create_time is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Long value) { - addCriterion("create_time =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Long value) { - addCriterion("create_time <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Long value) { - addCriterion("create_time >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { - addCriterion("create_time >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Long value) { - addCriterion("create_time <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Long value) { - addCriterion("create_time <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("create_time in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("create_time not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Long value1, Long value2) { - addCriterion("create_time between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Long value1, Long value2) { - addCriterion("create_time not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("update_time is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("update_time is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Long value) { - addCriterion("update_time =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Long value) { - addCriterion("update_time <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Long value) { - addCriterion("update_time >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { - addCriterion("update_time >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Long value) { - addCriterion("update_time <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { - addCriterion("update_time <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("update_time in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("update_time not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Long value1, Long value2) { - addCriterion("update_time between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { - addCriterion("update_time not between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andEndTimeIsNull() { - addCriterion("end_time is null"); - return (Criteria) this; - } - - public Criteria andEndTimeIsNotNull() { - addCriterion("end_time is not null"); - return (Criteria) this; - } - - public Criteria andEndTimeEqualTo(Long value) { - addCriterion("end_time =", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeNotEqualTo(Long value) { - addCriterion("end_time <>", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeGreaterThan(Long value) { - addCriterion("end_time >", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeGreaterThanOrEqualTo(Long value) { - addCriterion("end_time >=", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeLessThan(Long value) { - addCriterion("end_time <", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeLessThanOrEqualTo(Long value) { - addCriterion("end_time <=", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeIn(List values) { - addCriterion("end_time in", values, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeNotIn(List values) { - addCriterion("end_time not in", values, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeBetween(Long value1, Long value2) { - addCriterion("end_time between", value1, value2, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeNotBetween(Long value1, Long value2) { - addCriterion("end_time not between", value1, value2, "endTime"); + public Criteria andModuleIdNotBetween(String value1, String value2) { + addCriterion("module_id not between", value1, value2, "moduleId"); return (Criteria) this; } @@ -564,6 +384,266 @@ public class CaseReviewExample { return (Criteria) this; } + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleIsNull() { + addCriterion("review_pass_rule is null"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleIsNotNull() { + addCriterion("review_pass_rule is not null"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleEqualTo(String value) { + addCriterion("review_pass_rule =", value, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleNotEqualTo(String value) { + addCriterion("review_pass_rule <>", value, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleGreaterThan(String value) { + addCriterion("review_pass_rule >", value, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleGreaterThanOrEqualTo(String value) { + addCriterion("review_pass_rule >=", value, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleLessThan(String value) { + addCriterion("review_pass_rule <", value, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleLessThanOrEqualTo(String value) { + addCriterion("review_pass_rule <=", value, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleLike(String value) { + addCriterion("review_pass_rule like", value, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleNotLike(String value) { + addCriterion("review_pass_rule not like", value, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleIn(List values) { + addCriterion("review_pass_rule in", values, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleNotIn(List values) { + addCriterion("review_pass_rule not in", values, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleBetween(String value1, String value2) { + addCriterion("review_pass_rule between", value1, value2, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andReviewPassRuleNotBetween(String value1, String value2) { + addCriterion("review_pass_rule not between", value1, value2, "reviewPassRule"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Long value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Long value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Long value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Long value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Long value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Long value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Long value1, Long value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Long value1, Long value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(Long value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(Long value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(Long value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(Long value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(Long value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(Long value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(Long value1, Long value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(Long value1, Long value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + public Criteria andTagsIsNull() { addCriterion("tags is null"); return (Criteria) this; @@ -634,6 +714,136 @@ public class CaseReviewExample { return (Criteria) this; } + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + public Criteria andCreateUserIsNull() { addCriterion("create_user is null"); return (Criteria) this; @@ -704,73 +914,133 @@ public class CaseReviewExample { return (Criteria) this; } - public Criteria andReviewPassRuleIsNull() { - addCriterion("review_pass_rule is null"); + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); return (Criteria) this; } - public Criteria andReviewPassRuleIsNotNull() { - addCriterion("review_pass_rule is not null"); + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); return (Criteria) this; } - public Criteria andReviewPassRuleEqualTo(String value) { - addCriterion("review_pass_rule =", value, "reviewPassRule"); + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleNotEqualTo(String value) { - addCriterion("review_pass_rule <>", value, "reviewPassRule"); + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleGreaterThan(String value) { - addCriterion("review_pass_rule >", value, "reviewPassRule"); + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleGreaterThanOrEqualTo(String value) { - addCriterion("review_pass_rule >=", value, "reviewPassRule"); + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleLessThan(String value) { - addCriterion("review_pass_rule <", value, "reviewPassRule"); + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleLessThanOrEqualTo(String value) { - addCriterion("review_pass_rule <=", value, "reviewPassRule"); + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleLike(String value) { - addCriterion("review_pass_rule like", value, "reviewPassRule"); + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleNotLike(String value) { - addCriterion("review_pass_rule not like", value, "reviewPassRule"); + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleIn(List values) { - addCriterion("review_pass_rule in", values, "reviewPassRule"); + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleNotIn(List values) { - addCriterion("review_pass_rule not in", values, "reviewPassRule"); + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } - public Criteria andReviewPassRuleBetween(String value1, String value2) { - addCriterion("review_pass_rule between", value1, value2, "reviewPassRule"); + public Criteria andUpdateUserIsNull() { + addCriterion("update_user is null"); return (Criteria) this; } - public Criteria andReviewPassRuleNotBetween(String value1, String value2) { - addCriterion("review_pass_rule not between", value1, value2, "reviewPassRule"); + public Criteria andUpdateUserIsNotNull() { + addCriterion("update_user is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserEqualTo(String value) { + addCriterion("update_user =", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotEqualTo(String value) { + addCriterion("update_user <>", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThan(String value) { + addCriterion("update_user >", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThanOrEqualTo(String value) { + addCriterion("update_user >=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThan(String value) { + addCriterion("update_user <", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThanOrEqualTo(String value) { + addCriterion("update_user <=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLike(String value) { + addCriterion("update_user like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotLike(String value) { + addCriterion("update_user not like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserIn(List values) { + addCriterion("update_user in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotIn(List values) { + addCriterion("update_user not in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserBetween(String value1, String value2) { + addCriterion("update_user between", value1, value2, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotBetween(String value1, String value2) { + addCriterion("update_user not between", value1, value2, "updateUser"); return (Criteria) this; } } 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 011cfcff37..f03aa83bb9 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 java.util.ArrayList; import java.util.Arrays; @@ -12,44 +10,38 @@ import lombok.Data; @Data public class CaseReviewFunctionalCase implements Serializable { - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review_functional_case.id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{case_review_functional_case.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review_functional_case.review_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{case_review_functional_case.review_id.length_range}", groups = {Created.class, Updated.class}) private String reviewId; - @Schema(description = "用例ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "用例ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review_functional_case.case_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{case_review_functional_case.case_id.length_range}", groups = {Created.class, Updated.class}) private String caseId; - @Schema(description = "评审状态:进行中/通过/不通过/重新提审", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "评审状态:进行中/通过/不通过/重新提审", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review_functional_case.status.not_blank}", groups = {Created.class}) @Size(min = 1, max = 64, message = "{case_review_functional_case.status.length_range}", groups = {Created.class, Updated.class}) private String status; - @Schema(description = "创建时间") + @Schema(description = "创建时间") private Long createTime; - @Schema(description = "更新时间") - private Long updateTime; - - @Schema(description = "创建人") + @Schema(description = "创建人") private String createUser; - @Schema(description = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{case_review_functional_case.pos.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 19, message = "{case_review_functional_case.pos.length_range}", groups = {Created.class, Updated.class}) - private Long pos; + @Schema(description = "更新时间") + private Long updateTime; - @Schema(description = "关联的用例是否放入回收站", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{case_review_functional_case.deleted.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 1, message = "{case_review_functional_case.deleted.length_range}", groups = {Created.class, Updated.class}) - private Boolean deleted; + @Schema(description = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{case_review_functional_case.pos.not_blank}", groups = {Created.class}) + private Long pos; private static final long serialVersionUID = 1L; @@ -59,10 +51,9 @@ public class CaseReviewFunctionalCase implements Serializable { caseId("case_id", "caseId", "VARCHAR", false), status("status", "status", "VARCHAR", true), createTime("create_time", "createTime", "BIGINT", false), - updateTime("update_time", "updateTime", "BIGINT", false), createUser("create_user", "createUser", "VARCHAR", false), - pos("pos", "pos", "BIGINT", false), - deleted("deleted", "deleted", "BIT", false); + updateTime("update_time", "updateTime", "BIGINT", false), + pos("pos", "pos", "BIGINT", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseExample.java index c2535f8ff2..86438743e4 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewFunctionalCaseExample.java @@ -444,66 +444,6 @@ public class CaseReviewFunctionalCaseExample { return (Criteria) this; } - public Criteria andUpdateTimeIsNull() { - addCriterion("update_time is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("update_time is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Long value) { - addCriterion("update_time =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Long value) { - addCriterion("update_time <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Long value) { - addCriterion("update_time >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { - addCriterion("update_time >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Long value) { - addCriterion("update_time <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { - addCriterion("update_time <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("update_time in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("update_time not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Long value1, Long value2) { - addCriterion("update_time between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { - addCriterion("update_time not between", value1, value2, "updateTime"); - return (Criteria) this; - } - public Criteria andCreateUserIsNull() { addCriterion("create_user is null"); return (Criteria) this; @@ -574,6 +514,66 @@ public class CaseReviewFunctionalCaseExample { return (Criteria) this; } + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + public Criteria andPosIsNull() { addCriterion("pos is null"); return (Criteria) this; @@ -633,66 +633,6 @@ public class CaseReviewFunctionalCaseExample { addCriterion("pos not between", value1, value2, "pos"); return (Criteria) this; } - - public Criteria andDeletedIsNull() { - addCriterion("deleted is null"); - return (Criteria) this; - } - - public Criteria andDeletedIsNotNull() { - addCriterion("deleted is not null"); - return (Criteria) this; - } - - public Criteria andDeletedEqualTo(Boolean value) { - addCriterion("deleted =", value, "deleted"); - return (Criteria) this; - } - - public Criteria andDeletedNotEqualTo(Boolean value) { - addCriterion("deleted <>", value, "deleted"); - return (Criteria) this; - } - - public Criteria andDeletedGreaterThan(Boolean value) { - addCriterion("deleted >", value, "deleted"); - return (Criteria) this; - } - - public Criteria andDeletedGreaterThanOrEqualTo(Boolean value) { - addCriterion("deleted >=", value, "deleted"); - return (Criteria) this; - } - - public Criteria andDeletedLessThan(Boolean value) { - addCriterion("deleted <", value, "deleted"); - return (Criteria) this; - } - - public Criteria andDeletedLessThanOrEqualTo(Boolean value) { - addCriterion("deleted <=", value, "deleted"); - return (Criteria) this; - } - - public Criteria andDeletedIn(List values) { - addCriterion("deleted in", values, "deleted"); - return (Criteria) this; - } - - public Criteria andDeletedNotIn(List values) { - addCriterion("deleted not in", values, "deleted"); - return (Criteria) this; - } - - public Criteria andDeletedBetween(Boolean value1, Boolean value2) { - addCriterion("deleted between", value1, value2, "deleted"); - return (Criteria) this; - } - - public Criteria andDeletedNotBetween(Boolean value1, Boolean value2) { - addCriterion("deleted not between", value1, value2, "deleted"); - return (Criteria) this; - } } public static class Criteria extends GeneratedCriteria { 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 00034a63b2..395f0e612a 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 java.util.ArrayList; import java.util.Arrays; @@ -12,17 +10,17 @@ import lombok.Data; @Data public class CaseReviewFunctionalCaseUser implements Serializable { - @Schema(description = "功能用例和评审中间表的ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review_functional_case_user.case_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{case_review_functional_case_user.case_id.length_range}", groups = {Created.class, Updated.class}) private String caseId; - @Schema(description = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review_functional_case_user.review_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{case_review_functional_case_user.review_id.length_range}", groups = {Created.class, Updated.class}) private String reviewId; - @Schema(description = "评审人ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "评审人ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review_functional_case_user.user_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{case_review_functional_case_user.user_id.length_range}", groups = {Created.class, Updated.class}) private String userId; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewHistory.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewHistory.java new file mode 100644 index 0000000000..3e186e7413 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewHistory.java @@ -0,0 +1,123 @@ +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 java.util.ArrayList; +import java.util.Arrays; +import lombok.Data; + +@Data +public class CaseReviewHistory implements Serializable { + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review_history.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{case_review_history.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "评审ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review_history.review_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{case_review_history.review_id.length_range}", groups = {Created.class, Updated.class}) + private String reviewId; + + @Schema(description = "用例ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review_history.case_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{case_review_history.case_id.length_range}", groups = {Created.class, Updated.class}) + private String caseId; + + @Schema(description = "评审结果:通过/不通过") + private String status; + + @Schema(description = "通知人") + private String notifier; + + @Schema(description = "操作人") + private String createUser; + + @Schema(description = "操作时间") + private Long createTime; + + @Schema(description = "评审意见", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{case_review_history.content.not_blank}", groups = {Created.class}) + private byte[] content; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + reviewId("review_id", "reviewId", "VARCHAR", false), + caseId("case_id", "caseId", "VARCHAR", false), + status("status", "status", "VARCHAR", true), + notifier("notifier", "notifier", "VARCHAR", false), + createUser("create_user", "createUser", "VARCHAR", false), + createTime("create_time", "createTime", "BIGINT", false), + content("content", "content", "LONGVARBINARY", false); + + private static final String BEGINNING_DELIMITER = "`"; + + private static final String ENDING_DELIMITER = "`"; + + private final String column; + + private final boolean isColumnNameDelimited; + + private final String javaProperty; + + private final String jdbcType; + + public String value() { + return this.column; + } + + public String getValue() { + return this.column; + } + + public String getJavaProperty() { + return this.javaProperty; + } + + public String getJdbcType() { + return this.jdbcType; + } + + Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { + this.column = column; + this.javaProperty = javaProperty; + this.jdbcType = jdbcType; + this.isColumnNameDelimited = isColumnNameDelimited; + } + + public String desc() { + return this.getEscapedColumnName() + " DESC"; + } + + public String asc() { + return this.getEscapedColumnName() + " ASC"; + } + + public static Column[] excludes(Column ... excludes) { + ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); + if (excludes != null && excludes.length > 0) { + columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); + } + return columns.toArray(new Column[]{}); + } + + public static Column[] all() { + return Column.values(); + } + + public String getEscapedColumnName() { + if (this.isColumnNameDelimited) { + return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); + } else { + return this.column; + } + } + + public String getAliasedEscapedColumnName() { + return this.getEscapedColumnName(); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewHistoryExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewHistoryExample.java new file mode 100644 index 0000000000..0af1edadd6 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewHistoryExample.java @@ -0,0 +1,680 @@ +package io.metersphere.functional.domain; + +import java.util.ArrayList; +import java.util.List; + +public class CaseReviewHistoryExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CaseReviewHistoryExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andReviewIdIsNull() { + addCriterion("review_id is null"); + return (Criteria) this; + } + + public Criteria andReviewIdIsNotNull() { + addCriterion("review_id is not null"); + return (Criteria) this; + } + + public Criteria andReviewIdEqualTo(String value) { + addCriterion("review_id =", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotEqualTo(String value) { + addCriterion("review_id <>", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdGreaterThan(String value) { + addCriterion("review_id >", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdGreaterThanOrEqualTo(String value) { + addCriterion("review_id >=", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLessThan(String value) { + addCriterion("review_id <", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLessThanOrEqualTo(String value) { + addCriterion("review_id <=", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLike(String value) { + addCriterion("review_id like", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotLike(String value) { + addCriterion("review_id not like", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdIn(List values) { + addCriterion("review_id in", values, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotIn(List values) { + addCriterion("review_id not in", values, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdBetween(String value1, String value2) { + addCriterion("review_id between", value1, value2, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotBetween(String value1, String value2) { + addCriterion("review_id not between", value1, value2, "reviewId"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNull() { + addCriterion("case_id is null"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNotNull() { + addCriterion("case_id is not null"); + return (Criteria) this; + } + + public Criteria andCaseIdEqualTo(String value) { + addCriterion("case_id =", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotEqualTo(String value) { + addCriterion("case_id <>", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThan(String value) { + addCriterion("case_id >", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThanOrEqualTo(String value) { + addCriterion("case_id >=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThan(String value) { + addCriterion("case_id <", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThanOrEqualTo(String value) { + addCriterion("case_id <=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLike(String value) { + addCriterion("case_id like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotLike(String value) { + addCriterion("case_id not like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdIn(List values) { + addCriterion("case_id in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotIn(List values) { + addCriterion("case_id not in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdBetween(String value1, String value2) { + addCriterion("case_id between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotBetween(String value1, String value2) { + addCriterion("case_id not between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria 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 andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewModule.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewModule.java new file mode 100644 index 0000000000..6c8b7a84ad --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewModule.java @@ -0,0 +1,129 @@ +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 java.util.ArrayList; +import java.util.Arrays; +import lombok.Data; + +@Data +public class CaseReviewModule implements Serializable { + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review_module.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{case_review_module.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review_module.project_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{case_review_module.project_id.length_range}", groups = {Created.class, Updated.class}) + private String projectId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review_module.name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 100, message = "{case_review_module.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(description = "父节点ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{case_review_module.parent_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{case_review_module.parent_id.length_range}", groups = {Created.class, Updated.class}) + private String parentId; + + @Schema(description = "同一节点下的顺序", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{case_review_module.pos.not_blank}", groups = {Created.class}) + private Long pos; + + @Schema(description = "创建时间") + private Long createTime; + + @Schema(description = "更新时间") + private Long updateTime; + + @Schema(description = "创建人") + private String createUser; + + @Schema(description = "更新人") + private String updateUser; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + projectId("project_id", "projectId", "VARCHAR", false), + name("name", "name", "VARCHAR", true), + parentId("parent_id", "parentId", "VARCHAR", false), + pos("pos", "pos", "BIGINT", false), + createTime("create_time", "createTime", "BIGINT", false), + updateTime("update_time", "updateTime", "BIGINT", false), + createUser("create_user", "createUser", "VARCHAR", false), + updateUser("update_user", "updateUser", "VARCHAR", false); + + private static final String BEGINNING_DELIMITER = "`"; + + private static final String ENDING_DELIMITER = "`"; + + private final String column; + + private final boolean isColumnNameDelimited; + + private final String javaProperty; + + private final String jdbcType; + + public String value() { + return this.column; + } + + public String getValue() { + return this.column; + } + + public String getJavaProperty() { + return this.javaProperty; + } + + public String getJdbcType() { + return this.jdbcType; + } + + Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { + this.column = column; + this.javaProperty = javaProperty; + this.jdbcType = jdbcType; + this.isColumnNameDelimited = isColumnNameDelimited; + } + + public String desc() { + return this.getEscapedColumnName() + " DESC"; + } + + public String asc() { + return this.getEscapedColumnName() + " ASC"; + } + + public static Column[] excludes(Column ... excludes) { + ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); + if (excludes != null && excludes.length > 0) { + columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); + } + return columns.toArray(new Column[]{}); + } + + public static Column[] all() { + return Column.values(); + } + + public String getEscapedColumnName() { + if (this.isColumnNameDelimited) { + return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); + } else { + return this.column; + } + } + + public String getAliasedEscapedColumnName() { + return this.getEscapedColumnName(); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewModuleExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewModuleExample.java new file mode 100644 index 0000000000..8ccc436937 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/CaseReviewModuleExample.java @@ -0,0 +1,800 @@ +package io.metersphere.functional.domain; + +import java.util.ArrayList; +import java.util.List; + +public class CaseReviewModuleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public CaseReviewModuleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(String value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(String value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(String value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(String value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(String value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(String value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLike(String value) { + addCriterion("parent_id like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotLike(String value) { + addCriterion("parent_id not like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(String value1, String value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(String value1, String value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andPosIsNull() { + addCriterion("pos is null"); + return (Criteria) this; + } + + public Criteria andPosIsNotNull() { + addCriterion("pos is not null"); + return (Criteria) this; + } + + public Criteria andPosEqualTo(Long value) { + addCriterion("pos =", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotEqualTo(Long value) { + addCriterion("pos <>", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThan(Long value) { + addCriterion("pos >", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThanOrEqualTo(Long value) { + addCriterion("pos >=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThan(Long value) { + addCriterion("pos <", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThanOrEqualTo(Long value) { + addCriterion("pos <=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosIn(List values) { + addCriterion("pos in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotIn(List values) { + addCriterion("pos not in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosBetween(Long value1, Long value2) { + addCriterion("pos between", value1, value2, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotBetween(Long value1, Long value2) { + addCriterion("pos not between", value1, value2, "pos"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNull() { + addCriterion("update_user is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNotNull() { + addCriterion("update_user is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserEqualTo(String value) { + addCriterion("update_user =", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotEqualTo(String value) { + addCriterion("update_user <>", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThan(String value) { + addCriterion("update_user >", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThanOrEqualTo(String value) { + addCriterion("update_user >=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThan(String value) { + addCriterion("update_user <", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThanOrEqualTo(String value) { + addCriterion("update_user <=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLike(String value) { + addCriterion("update_user like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotLike(String value) { + addCriterion("update_user not like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserIn(List values) { + addCriterion("update_user in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotIn(List values) { + addCriterion("update_user not in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserBetween(String value1, String value2) { + addCriterion("update_user between", value1, value2, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotBetween(String value1, String value2) { + addCriterion("update_user not between", value1, value2, "updateUser"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseDemand.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseDemand.java new file mode 100644 index 0000000000..7f9e05887a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseDemand.java @@ -0,0 +1,124 @@ +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 java.util.ArrayList; +import java.util.Arrays; +import lombok.Data; + +@Data +public class FunctionalCaseDemand implements Serializable { + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_case_demand.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{functional_case_demand.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "功能用例ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_case_demand.case_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{functional_case_demand.case_id.length_range}", groups = {Created.class, Updated.class}) + private String caseId; + + @Schema(description = "需求ID") + private String demandId; + + @Schema(description = "需求标题", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_case_demand.demand_name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 64, message = "{functional_case_demand.demand_name.length_range}", groups = {Created.class, Updated.class}) + private String demandName; + + @Schema(description = "需求地址") + private String demandUrl; + + @Schema(description = "需求所属平台", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{functional_case_demand.demand_platform.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 64, message = "{functional_case_demand.demand_platform.length_range}", groups = {Created.class, Updated.class}) + private String demandPlatform; + + @Schema(description = "创建时间") + private Long createTime; + + @Schema(description = "更新时间") + private Long updateTime; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + caseId("case_id", "caseId", "VARCHAR", false), + demandId("demand_id", "demandId", "VARCHAR", false), + demandName("demand_name", "demandName", "VARCHAR", false), + demandUrl("demand_url", "demandUrl", "VARCHAR", false), + demandPlatform("demand_platform", "demandPlatform", "VARCHAR", false), + createTime("create_time", "createTime", "BIGINT", false), + updateTime("update_time", "updateTime", "BIGINT", false); + + private static final String BEGINNING_DELIMITER = "`"; + + private static final String ENDING_DELIMITER = "`"; + + private final String column; + + private final boolean isColumnNameDelimited; + + private final String javaProperty; + + private final String jdbcType; + + public String value() { + return this.column; + } + + public String getValue() { + return this.column; + } + + public String getJavaProperty() { + return this.javaProperty; + } + + public String getJdbcType() { + return this.jdbcType; + } + + Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { + this.column = column; + this.javaProperty = javaProperty; + this.jdbcType = jdbcType; + this.isColumnNameDelimited = isColumnNameDelimited; + } + + public String desc() { + return this.getEscapedColumnName() + " DESC"; + } + + public String asc() { + return this.getEscapedColumnName() + " ASC"; + } + + public static Column[] excludes(Column ... excludes) { + ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); + if (excludes != null && excludes.length > 0) { + columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); + } + return columns.toArray(new Column[]{}); + } + + public static Column[] all() { + return Column.values(); + } + + public String getEscapedColumnName() { + if (this.isColumnNameDelimited) { + return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); + } else { + return this.column; + } + } + + public String getAliasedEscapedColumnName() { + return this.getEscapedColumnName(); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseDemandExample.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseDemandExample.java new file mode 100644 index 0000000000..1f4c2c3df9 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCaseDemandExample.java @@ -0,0 +1,740 @@ +package io.metersphere.functional.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FunctionalCaseDemandExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FunctionalCaseDemandExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNull() { + addCriterion("case_id is null"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNotNull() { + addCriterion("case_id is not null"); + return (Criteria) this; + } + + public Criteria andCaseIdEqualTo(String value) { + addCriterion("case_id =", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotEqualTo(String value) { + addCriterion("case_id <>", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThan(String value) { + addCriterion("case_id >", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThanOrEqualTo(String value) { + addCriterion("case_id >=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThan(String value) { + addCriterion("case_id <", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThanOrEqualTo(String value) { + addCriterion("case_id <=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLike(String value) { + addCriterion("case_id like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotLike(String value) { + addCriterion("case_id not like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdIn(List values) { + addCriterion("case_id in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotIn(List values) { + addCriterion("case_id not in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdBetween(String value1, String value2) { + addCriterion("case_id between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotBetween(String value1, String value2) { + addCriterion("case_id not between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andDemandIdIsNull() { + addCriterion("demand_id is null"); + return (Criteria) this; + } + + public Criteria andDemandIdIsNotNull() { + addCriterion("demand_id is not null"); + return (Criteria) this; + } + + public Criteria andDemandIdEqualTo(String value) { + addCriterion("demand_id =", value, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdNotEqualTo(String value) { + addCriterion("demand_id <>", value, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdGreaterThan(String value) { + addCriterion("demand_id >", value, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdGreaterThanOrEqualTo(String value) { + addCriterion("demand_id >=", value, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdLessThan(String value) { + addCriterion("demand_id <", value, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdLessThanOrEqualTo(String value) { + addCriterion("demand_id <=", value, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdLike(String value) { + addCriterion("demand_id like", value, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdNotLike(String value) { + addCriterion("demand_id not like", value, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdIn(List values) { + addCriterion("demand_id in", values, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdNotIn(List values) { + addCriterion("demand_id not in", values, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdBetween(String value1, String value2) { + addCriterion("demand_id between", value1, value2, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandIdNotBetween(String value1, String value2) { + addCriterion("demand_id not between", value1, value2, "demandId"); + return (Criteria) this; + } + + public Criteria andDemandNameIsNull() { + addCriterion("demand_name is null"); + return (Criteria) this; + } + + public Criteria andDemandNameIsNotNull() { + addCriterion("demand_name is not null"); + return (Criteria) this; + } + + public Criteria andDemandNameEqualTo(String value) { + addCriterion("demand_name =", value, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameNotEqualTo(String value) { + addCriterion("demand_name <>", value, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameGreaterThan(String value) { + addCriterion("demand_name >", value, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameGreaterThanOrEqualTo(String value) { + addCriterion("demand_name >=", value, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameLessThan(String value) { + addCriterion("demand_name <", value, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameLessThanOrEqualTo(String value) { + addCriterion("demand_name <=", value, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameLike(String value) { + addCriterion("demand_name like", value, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameNotLike(String value) { + addCriterion("demand_name not like", value, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameIn(List values) { + addCriterion("demand_name in", values, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameNotIn(List values) { + addCriterion("demand_name not in", values, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameBetween(String value1, String value2) { + addCriterion("demand_name between", value1, value2, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandNameNotBetween(String value1, String value2) { + addCriterion("demand_name not between", value1, value2, "demandName"); + return (Criteria) this; + } + + public Criteria andDemandUrlIsNull() { + addCriterion("demand_url is null"); + return (Criteria) this; + } + + public Criteria andDemandUrlIsNotNull() { + addCriterion("demand_url is not null"); + return (Criteria) this; + } + + public Criteria andDemandUrlEqualTo(String value) { + addCriterion("demand_url =", value, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlNotEqualTo(String value) { + addCriterion("demand_url <>", value, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlGreaterThan(String value) { + addCriterion("demand_url >", value, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlGreaterThanOrEqualTo(String value) { + addCriterion("demand_url >=", value, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlLessThan(String value) { + addCriterion("demand_url <", value, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlLessThanOrEqualTo(String value) { + addCriterion("demand_url <=", value, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlLike(String value) { + addCriterion("demand_url like", value, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlNotLike(String value) { + addCriterion("demand_url not like", value, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlIn(List values) { + addCriterion("demand_url in", values, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlNotIn(List values) { + addCriterion("demand_url not in", values, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlBetween(String value1, String value2) { + addCriterion("demand_url between", value1, value2, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandUrlNotBetween(String value1, String value2) { + addCriterion("demand_url not between", value1, value2, "demandUrl"); + return (Criteria) this; + } + + public Criteria andDemandPlatformIsNull() { + addCriterion("demand_platform is null"); + return (Criteria) this; + } + + public Criteria andDemandPlatformIsNotNull() { + addCriterion("demand_platform is not null"); + return (Criteria) this; + } + + public Criteria andDemandPlatformEqualTo(String value) { + addCriterion("demand_platform =", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformNotEqualTo(String value) { + addCriterion("demand_platform <>", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformGreaterThan(String value) { + addCriterion("demand_platform >", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformGreaterThanOrEqualTo(String value) { + addCriterion("demand_platform >=", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformLessThan(String value) { + addCriterion("demand_platform <", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformLessThanOrEqualTo(String value) { + addCriterion("demand_platform <=", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformLike(String value) { + addCriterion("demand_platform like", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformNotLike(String value) { + addCriterion("demand_platform not like", value, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformIn(List values) { + addCriterion("demand_platform in", values, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformNotIn(List values) { + addCriterion("demand_platform not in", values, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformBetween(String value1, String value2) { + addCriterion("demand_platform between", value1, value2, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andDemandPlatformNotBetween(String value1, String value2) { + addCriterion("demand_platform not between", value1, value2, "demandPlatform"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseMapper.xml index 7334b5d66b..eb5411a644 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewFunctionalCaseMapper.xml @@ -7,10 +7,9 @@ - + - @@ -71,7 +70,7 @@ - id, review_id, case_id, `status`, create_time, update_time, create_user, pos, deleted + id, review_id, case_id, `status`, create_time, create_user, update_time, pos @@ -198,18 +189,15 @@ create_time = #{record.createTime,jdbcType=BIGINT}, - - update_time = #{record.updateTime,jdbcType=BIGINT}, - create_user = #{record.createUser,jdbcType=VARCHAR}, + + update_time = #{record.updateTime,jdbcType=BIGINT}, + pos = #{record.pos,jdbcType=BIGINT}, - - deleted = #{record.deleted,jdbcType=BIT}, - @@ -222,10 +210,9 @@ case_id = #{record.caseId,jdbcType=VARCHAR}, `status` = #{record.status,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, create_user = #{record.createUser,jdbcType=VARCHAR}, - pos = #{record.pos,jdbcType=BIGINT}, - deleted = #{record.deleted,jdbcType=BIT} + update_time = #{record.updateTime,jdbcType=BIGINT}, + pos = #{record.pos,jdbcType=BIGINT} @@ -245,18 +232,15 @@ create_time = #{createTime,jdbcType=BIGINT}, - - update_time = #{updateTime,jdbcType=BIGINT}, - create_user = #{createUser,jdbcType=VARCHAR}, + + update_time = #{updateTime,jdbcType=BIGINT}, + pos = #{pos,jdbcType=BIGINT}, - - deleted = #{deleted,jdbcType=BIT}, - where id = #{id,jdbcType=VARCHAR} @@ -266,22 +250,19 @@ case_id = #{caseId,jdbcType=VARCHAR}, `status` = #{status,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, create_user = #{createUser,jdbcType=VARCHAR}, - pos = #{pos,jdbcType=BIGINT}, - deleted = #{deleted,jdbcType=BIT} + update_time = #{updateTime,jdbcType=BIGINT}, + pos = #{pos,jdbcType=BIGINT} where id = #{id,jdbcType=VARCHAR} insert into case_review_functional_case - (id, review_id, case_id, `status`, create_time, update_time, create_user, pos, deleted - ) + (id, review_id, case_id, `status`, create_time, create_user, update_time, pos) values (#{item.id,jdbcType=VARCHAR}, #{item.reviewId,jdbcType=VARCHAR}, #{item.caseId,jdbcType=VARCHAR}, - #{item.status,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, - #{item.createUser,jdbcType=VARCHAR}, #{item.pos,jdbcType=BIGINT}, #{item.deleted,jdbcType=BIT} - ) + #{item.status,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, + #{item.updateTime,jdbcType=BIGINT}, #{item.pos,jdbcType=BIGINT}) @@ -309,18 +290,15 @@ #{item.createTime,jdbcType=BIGINT} - - #{item.updateTime,jdbcType=BIGINT} - #{item.createUser,jdbcType=VARCHAR} + + #{item.updateTime,jdbcType=BIGINT} + #{item.pos,jdbcType=BIGINT} - - #{item.deleted,jdbcType=BIT} - ) diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewHistoryMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewHistoryMapper.java new file mode 100644 index 0000000000..12d1af6096 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewHistoryMapper.java @@ -0,0 +1,40 @@ +package io.metersphere.functional.mapper; + +import io.metersphere.functional.domain.CaseReviewHistory; +import io.metersphere.functional.domain.CaseReviewHistoryExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CaseReviewHistoryMapper { + long countByExample(CaseReviewHistoryExample example); + + int deleteByExample(CaseReviewHistoryExample example); + + int deleteByPrimaryKey(String id); + + int insert(CaseReviewHistory record); + + int insertSelective(CaseReviewHistory record); + + List selectByExampleWithBLOBs(CaseReviewHistoryExample example); + + List selectByExample(CaseReviewHistoryExample example); + + CaseReviewHistory selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") CaseReviewHistory record, @Param("example") CaseReviewHistoryExample example); + + int updateByExampleWithBLOBs(@Param("record") CaseReviewHistory record, @Param("example") CaseReviewHistoryExample example); + + int updateByExample(@Param("record") CaseReviewHistory record, @Param("example") CaseReviewHistoryExample example); + + int updateByPrimaryKeySelective(CaseReviewHistory record); + + int updateByPrimaryKeyWithBLOBs(CaseReviewHistory record); + + int updateByPrimaryKey(CaseReviewHistory record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") CaseReviewHistory.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewHistoryMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewHistoryMapper.xml new file mode 100644 index 0000000000..8eeb95145a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewHistoryMapper.xml @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, review_id, case_id, `status`, notifier, create_user, create_time + + + content + + + + + + delete from case_review_history + where id = #{id,jdbcType=VARCHAR} + + + delete from case_review_history + + + + + + insert into case_review_history (id, review_id, case_id, + `status`, notifier, create_user, + create_time, content) + values (#{id,jdbcType=VARCHAR}, #{reviewId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{notifier,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARBINARY}) + + + insert into case_review_history + + + id, + + + review_id, + + + case_id, + + + `status`, + + + notifier, + + + create_user, + + + create_time, + + + content, + + + + + #{id,jdbcType=VARCHAR}, + + + #{reviewId,jdbcType=VARCHAR}, + + + #{caseId,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{notifier,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{content,jdbcType=LONGVARBINARY}, + + + + + + update case_review_history + + + id = #{record.id,jdbcType=VARCHAR}, + + + review_id = #{record.reviewId,jdbcType=VARCHAR}, + + + case_id = #{record.caseId,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + notifier = #{record.notifier,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + content = #{record.content,jdbcType=LONGVARBINARY}, + + + + + + + + update case_review_history + set id = #{record.id,jdbcType=VARCHAR}, + review_id = #{record.reviewId,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + notifier = #{record.notifier,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + content = #{record.content,jdbcType=LONGVARBINARY} + + + + + + update case_review_history + set id = #{record.id,jdbcType=VARCHAR}, + review_id = #{record.reviewId,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + notifier = #{record.notifier,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT} + + + + + + update case_review_history + + + review_id = #{reviewId,jdbcType=VARCHAR}, + + + case_id = #{caseId,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + notifier = #{notifier,jdbcType=VARCHAR}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + content = #{content,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update case_review_history + set review_id = #{reviewId,jdbcType=VARCHAR}, + case_id = #{caseId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + notifier = #{notifier,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + content = #{content,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + update case_review_history + set review_id = #{reviewId,jdbcType=VARCHAR}, + case_id = #{caseId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + notifier = #{notifier,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + + insert into case_review_history + (id, review_id, case_id, `status`, notifier, create_user, create_time, content) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.reviewId,jdbcType=VARCHAR}, #{item.caseId,jdbcType=VARCHAR}, + #{item.status,jdbcType=VARCHAR}, #{item.notifier,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR}, + #{item.createTime,jdbcType=BIGINT}, #{item.content,jdbcType=LONGVARBINARY}) + + + + insert into case_review_history ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.reviewId,jdbcType=VARCHAR} + + + #{item.caseId,jdbcType=VARCHAR} + + + #{item.status,jdbcType=VARCHAR} + + + #{item.notifier,jdbcType=VARCHAR} + + + #{item.createUser,jdbcType=VARCHAR} + + + #{item.createTime,jdbcType=BIGINT} + + + #{item.content,jdbcType=LONGVARBINARY} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.java index 1628a14c19..2e30a8c0ca 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.java @@ -16,22 +16,16 @@ public interface CaseReviewMapper { int insertSelective(CaseReview record); - List selectByExampleWithBLOBs(CaseReviewExample example); - List selectByExample(CaseReviewExample example); CaseReview selectByPrimaryKey(String id); int updateByExampleSelective(@Param("record") CaseReview record, @Param("example") CaseReviewExample example); - int updateByExampleWithBLOBs(@Param("record") CaseReview record, @Param("example") CaseReviewExample example); - int updateByExample(@Param("record") CaseReview record, @Param("example") CaseReviewExample example); int updateByPrimaryKeySelective(CaseReview record); - int updateByPrimaryKeyWithBLOBs(CaseReview record); - int updateByPrimaryKey(CaseReview record); int batchInsert(@Param("list") List list); diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.xml index 4f84f985be..60495656e5 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewMapper.xml @@ -4,17 +4,18 @@ - - - - + - - + - - - + + + + + + + + @@ -75,28 +76,9 @@ - id, `name`, `status`, create_time, update_time, end_time, project_id, tags, create_user, - review_pass_rule + id, `name`, module_id, project_id, `status`, review_pass_rule, start_time, end_time, + tags, description, create_time, create_user, update_time, update_user - - description - - - select - , - from case_review where id = #{id,jdbcType=VARCHAR} @@ -130,14 +110,16 @@ - insert into case_review (id, `name`, `status`, - create_time, update_time, end_time, - project_id, tags, create_user, - review_pass_rule, description) - values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, - #{projectId,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, - #{reviewPassRule,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR}) + insert into case_review (id, `name`, module_id, + project_id, `status`, review_pass_rule, + start_time, end_time, tags, + description, create_time, create_user, + update_time, update_user) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR}, + #{projectId,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{reviewPassRule,jdbcType=VARCHAR}, + #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{tags,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{updateTime,jdbcType=BIGINT}, #{updateUser,jdbcType=VARCHAR}) insert into case_review @@ -148,33 +130,42 @@ `name`, - - `status`, - - - create_time, - - - update_time, - - - end_time, + + module_id, project_id, - - tags, - - - create_user, + + `status`, review_pass_rule, + + start_time, + + + end_time, + + + tags, + description, + + create_time, + + + create_user, + + + update_time, + + + update_user, + @@ -183,32 +174,41 @@ #{name,jdbcType=VARCHAR}, - - #{status,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=BIGINT}, - - - #{updateTime,jdbcType=BIGINT}, - - - #{endTime,jdbcType=BIGINT}, + + #{moduleId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, - - #{tags,jdbcType=VARCHAR}, - - - #{createUser,jdbcType=VARCHAR}, + + #{status,jdbcType=VARCHAR}, #{reviewPassRule,jdbcType=VARCHAR}, + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + #{tags,jdbcType=VARCHAR}, + - #{description,jdbcType=LONGVARCHAR}, + #{description,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{updateUser,jdbcType=VARCHAR}, @@ -227,67 +227,63 @@ `name` = #{record.name,jdbcType=VARCHAR}, - - `status` = #{record.status,jdbcType=VARCHAR}, - - - create_time = #{record.createTime,jdbcType=BIGINT}, - - - update_time = #{record.updateTime,jdbcType=BIGINT}, - - - end_time = #{record.endTime,jdbcType=BIGINT}, + + module_id = #{record.moduleId,jdbcType=VARCHAR}, project_id = #{record.projectId,jdbcType=VARCHAR}, - - tags = #{record.tags,jdbcType=VARCHAR}, - - - create_user = #{record.createUser,jdbcType=VARCHAR}, + + `status` = #{record.status,jdbcType=VARCHAR}, review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR}, + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + tags = #{record.tags,jdbcType=VARCHAR}, + - description = #{record.description,jdbcType=LONGVARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + update_user = #{record.updateUser,jdbcType=VARCHAR}, - - update case_review - set id = #{record.id,jdbcType=VARCHAR}, - `name` = #{record.name,jdbcType=VARCHAR}, - `status` = #{record.status,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, - end_time = #{record.endTime,jdbcType=BIGINT}, - project_id = #{record.projectId,jdbcType=VARCHAR}, - tags = #{record.tags,jdbcType=VARCHAR}, - create_user = #{record.createUser,jdbcType=VARCHAR}, - review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=LONGVARCHAR} - - - - update case_review set id = #{record.id,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR}, - `status` = #{record.status,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - update_time = #{record.updateTime,jdbcType=BIGINT}, - end_time = #{record.endTime,jdbcType=BIGINT}, + module_id = #{record.moduleId,jdbcType=VARCHAR}, project_id = #{record.projectId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, tags = #{record.tags,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, create_user = #{record.createUser,jdbcType=VARCHAR}, - review_pass_rule = #{record.reviewPassRule,jdbcType=VARCHAR} + update_time = #{record.updateTime,jdbcType=BIGINT}, + update_user = #{record.updateUser,jdbcType=VARCHAR} @@ -298,74 +294,73 @@ `name` = #{name,jdbcType=VARCHAR}, - - `status` = #{status,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=BIGINT}, - - - update_time = #{updateTime,jdbcType=BIGINT}, - - - end_time = #{endTime,jdbcType=BIGINT}, + + module_id = #{moduleId,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=VARCHAR}, - - tags = #{tags,jdbcType=VARCHAR}, - - - create_user = #{createUser,jdbcType=VARCHAR}, + + `status` = #{status,jdbcType=VARCHAR}, review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR}, + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + tags = #{tags,jdbcType=VARCHAR}, + - description = #{description,jdbcType=LONGVARCHAR}, + description = #{description,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + update_user = #{updateUser,jdbcType=VARCHAR}, where id = #{id,jdbcType=VARCHAR} - - update case_review - set `name` = #{name,jdbcType=VARCHAR}, - `status` = #{status,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, - end_time = #{endTime,jdbcType=BIGINT}, - project_id = #{projectId,jdbcType=VARCHAR}, - tags = #{tags,jdbcType=VARCHAR}, - create_user = #{createUser,jdbcType=VARCHAR}, - review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR}, - description = #{description,jdbcType=LONGVARCHAR} - where id = #{id,jdbcType=VARCHAR} - update case_review set `name` = #{name,jdbcType=VARCHAR}, - `status` = #{status,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - update_time = #{updateTime,jdbcType=BIGINT}, - end_time = #{endTime,jdbcType=BIGINT}, + module_id = #{moduleId,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, tags = #{tags,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, create_user = #{createUser,jdbcType=VARCHAR}, - review_pass_rule = #{reviewPassRule,jdbcType=VARCHAR} + update_time = #{updateTime,jdbcType=BIGINT}, + update_user = #{updateUser,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} insert into case_review - (id, `name`, `status`, create_time, update_time, end_time, project_id, tags, create_user, - review_pass_rule, description) + (id, `name`, module_id, project_id, `status`, review_pass_rule, start_time, end_time, + tags, description, create_time, create_user, update_time, update_user) values - (#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, - #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, #{item.endTime,jdbcType=BIGINT}, - #{item.projectId,jdbcType=VARCHAR}, #{item.tags,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR}, - #{item.reviewPassRule,jdbcType=VARCHAR}, #{item.description,jdbcType=LONGVARCHAR} - ) + (#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.moduleId,jdbcType=VARCHAR}, + #{item.projectId,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.reviewPassRule,jdbcType=VARCHAR}, + #{item.startTime,jdbcType=BIGINT}, #{item.endTime,jdbcType=BIGINT}, #{item.tags,jdbcType=VARCHAR}, + #{item.description,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, + #{item.updateTime,jdbcType=BIGINT}, #{item.updateUser,jdbcType=VARCHAR}) @@ -384,32 +379,41 @@ #{item.name,jdbcType=VARCHAR} - - #{item.status,jdbcType=VARCHAR} - - - #{item.createTime,jdbcType=BIGINT} - - - #{item.updateTime,jdbcType=BIGINT} - - - #{item.endTime,jdbcType=BIGINT} + + #{item.moduleId,jdbcType=VARCHAR} #{item.projectId,jdbcType=VARCHAR} - - #{item.tags,jdbcType=VARCHAR} - - - #{item.createUser,jdbcType=VARCHAR} + + #{item.status,jdbcType=VARCHAR} #{item.reviewPassRule,jdbcType=VARCHAR} + + #{item.startTime,jdbcType=BIGINT} + + + #{item.endTime,jdbcType=BIGINT} + + + #{item.tags,jdbcType=VARCHAR} + - #{item.description,jdbcType=LONGVARCHAR} + #{item.description,jdbcType=VARCHAR} + + + #{item.createTime,jdbcType=BIGINT} + + + #{item.createUser,jdbcType=VARCHAR} + + + #{item.updateTime,jdbcType=BIGINT} + + + #{item.updateUser,jdbcType=VARCHAR} ) diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewModuleMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewModuleMapper.java new file mode 100644 index 0000000000..e3dd001ef3 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewModuleMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.functional.mapper; + +import io.metersphere.functional.domain.CaseReviewModule; +import io.metersphere.functional.domain.CaseReviewModuleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface CaseReviewModuleMapper { + long countByExample(CaseReviewModuleExample example); + + int deleteByExample(CaseReviewModuleExample example); + + int deleteByPrimaryKey(String id); + + int insert(CaseReviewModule record); + + int insertSelective(CaseReviewModule record); + + List selectByExample(CaseReviewModuleExample example); + + CaseReviewModule selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") CaseReviewModule record, @Param("example") CaseReviewModuleExample example); + + int updateByExample(@Param("record") CaseReviewModule record, @Param("example") CaseReviewModuleExample example); + + int updateByPrimaryKeySelective(CaseReviewModule record); + + int updateByPrimaryKey(CaseReviewModule record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") CaseReviewModule.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewModuleMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewModuleMapper.xml new file mode 100644 index 0000000000..ad2a6c2747 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/CaseReviewModuleMapper.xml @@ -0,0 +1,328 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, `name`, parent_id, pos, create_time, update_time, create_user, update_user + + + + + delete from case_review_module + where id = #{id,jdbcType=VARCHAR} + + + delete from case_review_module + + + + + + insert into case_review_module (id, project_id, `name`, + parent_id, pos, create_time, + update_time, create_user, update_user + ) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{parentId,jdbcType=VARCHAR}, #{pos,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR} + ) + + + insert into case_review_module + + + id, + + + project_id, + + + `name`, + + + parent_id, + + + pos, + + + create_time, + + + update_time, + + + create_user, + + + update_user, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=VARCHAR}, + + + #{pos,jdbcType=BIGINT}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{updateUser,jdbcType=VARCHAR}, + + + + + + update case_review_module + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + parent_id = #{record.parentId,jdbcType=VARCHAR}, + + + pos = #{record.pos,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + update_user = #{record.updateUser,jdbcType=VARCHAR}, + + + + + + + + update case_review_module + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=VARCHAR}, + pos = #{record.pos,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + update_user = #{record.updateUser,jdbcType=VARCHAR} + + + + + + update case_review_module + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=VARCHAR}, + + + pos = #{pos,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + update_user = #{updateUser,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update case_review_module + set project_id = #{projectId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=VARCHAR}, + pos = #{pos,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + update_user = #{updateUser,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + insert into case_review_module + (id, project_id, `name`, parent_id, pos, create_time, update_time, create_user, update_user + ) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, + #{item.parentId,jdbcType=VARCHAR}, #{item.pos,jdbcType=BIGINT}, #{item.createTime,jdbcType=BIGINT}, + #{item.updateTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, #{item.updateUser,jdbcType=VARCHAR} + ) + + + + insert into case_review_module ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.projectId,jdbcType=VARCHAR} + + + #{item.name,jdbcType=VARCHAR} + + + #{item.parentId,jdbcType=VARCHAR} + + + #{item.pos,jdbcType=BIGINT} + + + #{item.createTime,jdbcType=BIGINT} + + + #{item.updateTime,jdbcType=BIGINT} + + + #{item.createUser,jdbcType=VARCHAR} + + + #{item.updateUser,jdbcType=VARCHAR} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseDemandMapper.java b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseDemandMapper.java new file mode 100644 index 0000000000..b3c7fd637a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseDemandMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.functional.mapper; + +import io.metersphere.functional.domain.FunctionalCaseDemand; +import io.metersphere.functional.domain.FunctionalCaseDemandExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FunctionalCaseDemandMapper { + long countByExample(FunctionalCaseDemandExample example); + + int deleteByExample(FunctionalCaseDemandExample example); + + int deleteByPrimaryKey(String id); + + int insert(FunctionalCaseDemand record); + + int insertSelective(FunctionalCaseDemand record); + + List selectByExample(FunctionalCaseDemandExample example); + + FunctionalCaseDemand selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") FunctionalCaseDemand record, @Param("example") FunctionalCaseDemandExample example); + + int updateByExample(@Param("record") FunctionalCaseDemand record, @Param("example") FunctionalCaseDemandExample example); + + int updateByPrimaryKeySelective(FunctionalCaseDemand record); + + int updateByPrimaryKey(FunctionalCaseDemand record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") FunctionalCaseDemand.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseDemandMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseDemandMapper.xml new file mode 100644 index 0000000000..5ac3f1164c --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/mapper/FunctionalCaseDemandMapper.xml @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, case_id, demand_id, demand_name, demand_url, demand_platform, create_time, update_time + + + + + delete from functional_case_demand + where id = #{id,jdbcType=VARCHAR} + + + delete from functional_case_demand + + + + + + insert into functional_case_demand (id, case_id, demand_id, + demand_name, demand_url, demand_platform, + create_time, update_time) + values (#{id,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{demandId,jdbcType=VARCHAR}, + #{demandName,jdbcType=VARCHAR}, #{demandUrl,jdbcType=VARCHAR}, #{demandPlatform,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}) + + + insert into functional_case_demand + + + id, + + + case_id, + + + demand_id, + + + demand_name, + + + demand_url, + + + demand_platform, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{caseId,jdbcType=VARCHAR}, + + + #{demandId,jdbcType=VARCHAR}, + + + #{demandName,jdbcType=VARCHAR}, + + + #{demandUrl,jdbcType=VARCHAR}, + + + #{demandPlatform,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update functional_case_demand + + + id = #{record.id,jdbcType=VARCHAR}, + + + case_id = #{record.caseId,jdbcType=VARCHAR}, + + + demand_id = #{record.demandId,jdbcType=VARCHAR}, + + + demand_name = #{record.demandName,jdbcType=VARCHAR}, + + + demand_url = #{record.demandUrl,jdbcType=VARCHAR}, + + + demand_platform = #{record.demandPlatform,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update functional_case_demand + set id = #{record.id,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + demand_id = #{record.demandId,jdbcType=VARCHAR}, + demand_name = #{record.demandName,jdbcType=VARCHAR}, + demand_url = #{record.demandUrl,jdbcType=VARCHAR}, + demand_platform = #{record.demandPlatform,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update functional_case_demand + + + case_id = #{caseId,jdbcType=VARCHAR}, + + + demand_id = #{demandId,jdbcType=VARCHAR}, + + + demand_name = #{demandName,jdbcType=VARCHAR}, + + + demand_url = #{demandUrl,jdbcType=VARCHAR}, + + + demand_platform = #{demandPlatform,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update functional_case_demand + set case_id = #{caseId,jdbcType=VARCHAR}, + demand_id = #{demandId,jdbcType=VARCHAR}, + demand_name = #{demandName,jdbcType=VARCHAR}, + demand_url = #{demandUrl,jdbcType=VARCHAR}, + demand_platform = #{demandPlatform,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + + insert into functional_case_demand + (id, case_id, demand_id, demand_name, demand_url, demand_platform, create_time, update_time + ) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.caseId,jdbcType=VARCHAR}, #{item.demandId,jdbcType=VARCHAR}, + #{item.demandName,jdbcType=VARCHAR}, #{item.demandUrl,jdbcType=VARCHAR}, #{item.demandPlatform,jdbcType=VARCHAR}, + #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}) + + + + insert into functional_case_demand ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.caseId,jdbcType=VARCHAR} + + + #{item.demandId,jdbcType=VARCHAR} + + + #{item.demandName,jdbcType=VARCHAR} + + + #{item.demandUrl,jdbcType=VARCHAR} + + + #{item.demandPlatform,jdbcType=VARCHAR} + + + #{item.createTime,jdbcType=BIGINT} + + + #{item.updateTime,jdbcType=BIGINT} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_case.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_case.sql index 59fc65a817..e5ec57923d 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_case.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_case.sql @@ -2,288 +2,360 @@ SET SESSION innodb_lock_wait_timeout = 7200; CREATE TABLE IF NOT EXISTS functional_case( - `id` VARCHAR(50) NOT NULL COMMENT 'ID' , - `num` BIGINT NOT NULL COMMENT '业务ID' , - `module_id` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '模块ID' , - `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , - `template_id` VARCHAR(50) NOT NULL COMMENT '模板ID' , - `name` VARCHAR(255) NOT NULL COMMENT '名称' , - `review_status` VARCHAR(64) NOT NULL DEFAULT 'UN_REVIEWED' COMMENT '评审状态:未评审/评审中/通过/不通过/重新提审' , - `tags` VARCHAR(1000) COMMENT '标签(JSON)' , - `case_edit_type` VARCHAR(50) NOT NULL DEFAULT 'STEP' COMMENT '编辑模式:步骤模式/文本模式' , - `pos` BIGINT NOT NULL DEFAULT 0 COMMENT '自定义排序,间隔5000' , - `version_id` VARCHAR(50) NOT NULL COMMENT '版本ID' , - `ref_id` VARCHAR(50) NOT NULL COMMENT '指向初始版本ID' , - `last_execute_result` VARCHAR(64) NOT NULL DEFAULT 'UN_EXECUTED' COMMENT '最近的执行结果:未执行/通过/失败/阻塞/跳过' , - `deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否在回收站:0-否,1-是' , - `public_case` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否是公共用例:0-否,1-是' , - `latest` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否为最新版本:0-否,1-是' , - `create_user` VARCHAR(50) NOT NULL COMMENT '创建人' , - `update_user` VARCHAR(50) COMMENT '更新人' , - `delete_user` VARCHAR(50) COMMENT '删除人' , - `create_time` BIGINT NOT NULL COMMENT '创建时间' , - `update_time` BIGINT NOT NULL COMMENT '更新时间' , - `delete_time` BIGINT COMMENT '删除时间' , + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `num` BIGINT NOT NULL COMMENT '业务ID', + `module_id` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '模块ID', + `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID', + `template_id` VARCHAR(50) NOT NULL COMMENT '模板ID', + `name` VARCHAR(255) NOT NULL COMMENT '名称', + `review_status` VARCHAR(64) NOT NULL DEFAULT 'UN_REVIEWED' COMMENT '评审状态:未评审/评审中/通过/不通过/重新提审', + `tags` VARCHAR(1000) COMMENT '标签(JSON)', + `case_edit_type` VARCHAR(50) NOT NULL DEFAULT 'STEP' COMMENT '编辑模式:步骤模式/文本模式', + `pos` BIGINT NOT NULL DEFAULT 0 COMMENT '自定义排序,间隔5000', + `version_id` VARCHAR(50) NOT NULL COMMENT '版本ID', + `ref_id` VARCHAR(50) NOT NULL COMMENT '指向初始版本ID', + `last_execute_result` VARCHAR(64) NOT NULL DEFAULT 'UN_EXECUTED' COMMENT '最近的执行结果:未执行/通过/失败/阻塞/跳过', + `deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否在回收站:0-否,1-是', + `public_case` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否是公共用例:0-否,1-是', + `latest` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否为最新版本:0-否,1-是', + `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', + `update_user` VARCHAR(50) COMMENT '更新人', + `delete_user` VARCHAR(50) COMMENT '删除人', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `update_time` BIGINT NOT NULL COMMENT '更新时间', + `delete_time` BIGINT COMMENT '删除时间', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '功能用例'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例'; -CREATE INDEX idx_num ON functional_case(num); -CREATE INDEX idx_module_id ON functional_case(module_id); -CREATE INDEX idx_project_id_pos ON functional_case(project_id,pos); -CREATE INDEX idx_public_case_pos ON functional_case(public_case,pos); -CREATE INDEX idx_ref_id ON functional_case(ref_id); -CREATE INDEX idx_project_id ON functional_case(project_id); -CREATE INDEX idx_version_id ON functional_case(version_id); -CREATE INDEX idx_create_time ON functional_case(create_time); -CREATE INDEX idx_delete_time ON functional_case(delete_time); -CREATE INDEX idx_update_time ON functional_case(update_time); +CREATE INDEX idx_module_id ON functional_case (module_id); +CREATE INDEX idx_project_id_pos ON functional_case (project_id, pos); +CREATE INDEX idx_public_case_pos ON functional_case (public_case, pos); +CREATE INDEX idx_ref_id ON functional_case (ref_id); +CREATE INDEX idx_version_id ON functional_case (version_id); +CREATE INDEX idx_create_time ON functional_case (create_time); +CREATE INDEX idx_delete_time ON functional_case (delete_time); +CREATE INDEX idx_update_time ON functional_case (update_time); +CREATE INDEX idx_num ON functional_case (num); +CREATE INDEX idx_project_id ON functional_case (project_id); CREATE TABLE IF NOT EXISTS functional_case_blob( - `id` VARCHAR(50) NOT NULL COMMENT '功能用例ID' , - `steps` LONGTEXT COMMENT '用例步骤(JSON),step_model 为 Step 时启用' , - `text_description` LONGTEXT COMMENT '文本描述,step_model 为 Text 时启用' , - `expected_result` LONGTEXT COMMENT '预期结果,step_model 为 Text 时启用' , - `prerequisite` LONGTEXT COMMENT '前置条件' , - `description` LONGTEXT COMMENT '备注' , + `id` VARCHAR(50) NOT NULL COMMENT '功能用例ID', + `steps` LONGTEXT COMMENT '用例步骤(JSON),step_model 为 Step 时启用', + `text_description` LONGTEXT COMMENT '文本描述,step_model 为 Text 时启用', + `expected_result` LONGTEXT COMMENT '预期结果,step_model 为 Text 时启用', + `prerequisite` LONGTEXT COMMENT '前置条件', + `description` LONGTEXT COMMENT '备注', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '功能用例'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例'; CREATE TABLE IF NOT EXISTS functional_case_comment( - `id` VARCHAR(50) NOT NULL COMMENT 'ID' , - `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID' , - `create_user` VARCHAR(50) NOT NULL COMMENT '评论人' , - `status` VARCHAR(64) COMMENT '评审/测试计划执行状态:通过/不通过/重新提审/通过标准变更标记/强制通过标记/强制不通过标记/状态变更标记' , - `type` VARCHAR(64) NOT NULL DEFAULT 'CASE' COMMENT '评论类型:用例评论/测试计划用例评论/评审用例评论' , - `parent_id` VARCHAR(50) COMMENT '父评论ID' , - `resource_id` VARCHAR(50) COMMENT '资源ID: 评审ID/测试计划ID' , - `notifier` VARCHAR(1000) COMMENT '通知人' , - `content` TEXT NOT NULL COMMENT '内容' , - `reply_user` VARCHAR(50) COMMENT '回复人' , - `create_time` BIGINT NOT NULL COMMENT '创建时间' , - `update_time` BIGINT NOT NULL COMMENT '更新时间' , + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID', + `create_user` VARCHAR(50) NOT NULL COMMENT '评论人', + `status` VARCHAR(64) COMMENT '评审/测试计划执行状态:通过/不通过/重新提审/通过标准变更标记/强制通过标记/强制不通过标记/状态变更标记', + `type` VARCHAR(64) NOT NULL DEFAULT 'CASE' COMMENT '评论类型:用例评论/测试计划用例评论/评审用例评论', + `parent_id` VARCHAR(50) COMMENT '父评论ID', + `resource_id` VARCHAR(50) COMMENT '资源ID: 评审ID/测试计划ID', + `notifier` VARCHAR(1000) COMMENT '通知人', + `content` TEXT NOT NULL COMMENT '内容', + `reply_user` VARCHAR(50) COMMENT '回复人', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `update_time` BIGINT NOT NULL COMMENT '更新时间', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '功能用例评论'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例评论'; -CREATE INDEX idx_create_time ON functional_case_comment(create_time); -CREATE INDEX idx_case_id ON functional_case_comment(case_id); -CREATE INDEX idx_status ON functional_case_comment(status); -CREATE INDEX idx_type ON functional_case_comment(type); -CREATE INDEX idx_resource_id ON functional_case_comment(resource_id); +CREATE INDEX idx_create_time ON functional_case_comment (create_time); +CREATE INDEX idx_case_id ON functional_case_comment (case_id); +CREATE INDEX idx_status ON functional_case_comment (status); +CREATE INDEX idx_type ON functional_case_comment (type); +CREATE INDEX idx_resource_id ON functional_case_comment (resource_id); CREATE TABLE IF NOT EXISTS functional_case_module( - `id` VARCHAR(50) NOT NULL COMMENT 'ID' , - `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , - `name` VARCHAR(100) NOT NULL COMMENT '名称' , - `parent_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '父节点ID' , - `pos` BIGINT NOT NULL DEFAULT 0 COMMENT '同一节点下的顺序' , - `create_time` BIGINT NOT NULL COMMENT '创建时间' , - `update_time` BIGINT NOT NULL COMMENT '更新时间' , - `create_user` VARCHAR(50) NOT NULL COMMENT '创建人' , - `update_user` VARCHAR(50) NOT NULL COMMENT '更新人' , + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID', + `name` VARCHAR(100) NOT NULL COMMENT '名称', + `parent_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '父节点ID', + `pos` BIGINT NOT NULL DEFAULT 0 COMMENT '同一节点下的顺序', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `update_time` BIGINT NOT NULL COMMENT '更新时间', + `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', + `update_user` VARCHAR(50) NOT NULL COMMENT '更新人', PRIMARY KEY (id) - ) COMMENT = '功能用例模块'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例模块'; -CREATE INDEX idx_project_id ON functional_case_module(project_id); -CREATE INDEX idx_name ON functional_case_module(name); -CREATE INDEX idx_pos ON functional_case_module(pos); -CREATE INDEX idx_parent_id ON functional_case_module(parent_id); -CREATE INDEX idx_create_user ON functional_case_module(create_user); -CREATE INDEX idx_update_user ON functional_case_module(update_user); -CREATE INDEX idx_create_time ON functional_case_module(create_time); -CREATE INDEX idx_update_time ON functional_case_module(update_time); +CREATE INDEX idx_project_id ON functional_case_module (project_id); +CREATE INDEX idx_name ON functional_case_module (name); +CREATE INDEX idx_pos ON functional_case_module (pos); +CREATE INDEX idx_parent_id ON functional_case_module (parent_id); +CREATE INDEX idx_create_user ON functional_case_module (create_user); +CREATE INDEX idx_update_user ON functional_case_module (update_user); +CREATE INDEX idx_create_time ON functional_case_module (create_time); +CREATE INDEX idx_update_time ON functional_case_module (update_time); CREATE TABLE IF NOT EXISTS functional_case_attachment( - `id` VARCHAR(50) NOT NULL COMMENT 'id' , - `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID' , - `file_id` VARCHAR(50) NOT NULL COMMENT '文件的ID' , - `file_name` VARCHAR(255) NOT NULL COMMENT '文件名称' , - `size` BIGINT NOT NULL COMMENT '文件大小' , - `local` BIT(1) NOT NULL COMMENT '是否本地' , - `create_user` VARCHAR(50) NOT NULL COMMENT '创建人' , - `create_time` BIGINT NOT NULL COMMENT '创建时间' , + `id` VARCHAR(50) NOT NULL COMMENT 'id', + `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID', + `file_id` VARCHAR(50) NOT NULL COMMENT '文件的ID', + `file_name` VARCHAR(255) NOT NULL COMMENT '文件名称', + `size` BIGINT NOT NULL COMMENT '文件大小', + `local` BIT(1) NOT NULL COMMENT '是否本地', + `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', + `create_time` BIGINT NOT NULL COMMENT '创建时间', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '功能用例和附件的中间表'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例和附件的中间表'; -CREATE INDEX idx_case_id ON functional_case_attachment(case_id); -CREATE INDEX idx_local ON functional_case_attachment(local); -CREATE INDEX idx_file_id ON functional_case_attachment(file_id); -CREATE INDEX idx_file_name ON functional_case_attachment(file_name); +CREATE INDEX idx_case_id ON functional_case_attachment (case_id); +CREATE INDEX idx_local ON functional_case_attachment (local); +CREATE INDEX idx_file_id ON functional_case_attachment (file_id); +CREATE INDEX idx_file_name ON functional_case_attachment (file_name); CREATE TABLE IF NOT EXISTS functional_case_follower( - `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID' , - `user_id` VARCHAR(50) NOT NULL COMMENT '关注人ID' , - PRIMARY KEY (case_id,user_id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '功能用例和关注人的中间表'; + `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID', + `user_id` VARCHAR(50) NOT NULL COMMENT '关注人ID', + PRIMARY KEY (case_id, user_id) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例和关注人的中间表'; CREATE TABLE IF NOT EXISTS functional_case_relationship_edge( - `id` VARCHAR(50) NOT NULL COMMENT 'ID' , - `source_id` VARCHAR(50) NOT NULL COMMENT '源节点的ID' , - `target_id` VARCHAR(50) NOT NULL COMMENT '目标节点的ID' , - `graph_id` VARCHAR(50) NOT NULL COMMENT '所属关系图的ID' , - `create_user` VARCHAR(50) NOT NULL COMMENT '创建人' , - `update_time` BIGINT NOT NULL COMMENT '更新时间' , - `create_time` BIGINT NOT NULL COMMENT '创建时间' , + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `source_id` VARCHAR(50) NOT NULL COMMENT '源节点的ID', + `target_id` VARCHAR(50) NOT NULL COMMENT '目标节点的ID', + `graph_id` VARCHAR(50) NOT NULL COMMENT '所属关系图的ID', + `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', + `update_time` BIGINT NOT NULL COMMENT '更新时间', + `create_time` BIGINT NOT NULL COMMENT '创建时间', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '功能用例的前后置关系'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例的前后置关系'; -CREATE INDEX source_id_index ON functional_case_relationship_edge(source_id); -CREATE INDEX target_id_index ON functional_case_relationship_edge(target_id); +CREATE INDEX source_id_index ON functional_case_relationship_edge (source_id); +CREATE INDEX target_id_index ON functional_case_relationship_edge (target_id); CREATE TABLE IF NOT EXISTS functional_case_test( - `id` VARCHAR(50) NOT NULL COMMENT 'ID' , - `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID' , - `source_id` VARCHAR(50) NOT NULL COMMENT '其他类型用例ID' , - `source_type` VARCHAR(64) NOT NULL COMMENT '用例类型:接口用例/场景用例/性能用例/UI用例' , - `create_time` BIGINT NOT NULL COMMENT '创建时间' , - `update_time` BIGINT NOT NULL COMMENT '更新时间' , + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID', + `source_id` VARCHAR(50) NOT NULL COMMENT '其他类型用例ID', + `source_type` VARCHAR(64) NOT NULL COMMENT '用例类型:接口用例/场景用例/性能用例/UI用例', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `update_time` BIGINT NOT NULL COMMENT '更新时间', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '功能用例和其他用例的中间表'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例和其他用例的中间表'; CREATE INDEX idx_case_id ON functional_case_test(case_id); CREATE INDEX idx_source_id ON functional_case_test(source_id); +CREATE TABLE IF NOT EXISTS functional_case_demand( + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID', + `demand_id` VARCHAR(50) COMMENT '需求ID', + `demand_name` VARCHAR(64) NOT NULL COMMENT '需求标题', + `demand_url` VARCHAR(255) COMMENT '需求地址', + `demand_platform` VARCHAR(64) NOT NULL DEFAULT 'LOCAL' COMMENT '需求所属平台', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `update_time` BIGINT NOT NULL COMMENT '更新时间', + PRIMARY KEY (id) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例和需求的中间表'; + + +CREATE INDEX idx_case_id ON functional_case_demand(case_id); +CREATE INDEX idx_demand_name ON functional_case_demand(demand_name); +CREATE INDEX idx_demand_platform ON functional_case_demand(demand_platform); CREATE TABLE IF NOT EXISTS functional_minder_extra_node( - `id` VARCHAR(50) NOT NULL COMMENT 'ID' , - `parent_id` VARCHAR(50) NOT NULL COMMENT '父节点的ID,即模块ID' , - `group_id` VARCHAR(50) NOT NULL COMMENT '项目ID,可扩展为其他资源ID' , - `node_data` LONGTEXT NOT NULL COMMENT '存储脑图节点额外信息' , + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `parent_id` VARCHAR(50) NOT NULL COMMENT '父节点的ID,即模块ID', + `group_id` VARCHAR(50) NOT NULL COMMENT '项目ID,可扩展为其他资源ID', + `node_data` LONGTEXT NOT NULL COMMENT '存储脑图节点额外信息', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '功能用例脑图临时节点'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例脑图临时节点'; -CREATE INDEX idx_parent_id ON functional_minder_extra_node(parent_id); +CREATE INDEX idx_parent_id ON functional_minder_extra_node (parent_id); CREATE TABLE IF NOT EXISTS functional_case_custom_field( - `case_id` VARCHAR(50) NOT NULL COMMENT '资源ID' , - `field_id` VARCHAR(50) NOT NULL COMMENT '字段ID' , - `value` VARCHAR(1000) COMMENT '字段值' , - PRIMARY KEY (case_id,field_id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '自定义字段功能用例关系'; + `case_id` VARCHAR(50) NOT NULL COMMENT '资源ID', + `field_id` VARCHAR(50) NOT NULL COMMENT '字段ID', + `value` VARCHAR(1000) COMMENT '字段值', + PRIMARY KEY (case_id, field_id) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '自定义字段功能用例关系'; CREATE TABLE IF NOT EXISTS functional_case_history( - `id` VARCHAR(50) NOT NULL COMMENT 'ID' , - `case_id` VARCHAR(50) NOT NULL COMMENT '用例ID' , - `num` INT NOT NULL COMMENT '变更记录批次号' , - `content` BLOB NOT NULL COMMENT '修改内容' , - `create_user` VARCHAR(50) NOT NULL COMMENT '操作人' , - `create_time` BIGINT NOT NULL COMMENT '操作时间' , + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `case_id` VARCHAR(50) NOT NULL COMMENT '用例ID', + `num` INT NOT NULL COMMENT '变更记录批次号', + `content` BLOB NOT NULL COMMENT '修改内容', + `create_user` VARCHAR(50) NOT NULL COMMENT '操作人', + `create_time` BIGINT NOT NULL COMMENT '操作时间', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '用例变更记录'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '用例变更记录'; -CREATE INDEX idx_case_id ON functional_case_history(case_id); +CREATE INDEX idx_case_id ON functional_case_history (case_id); CREATE TABLE IF NOT EXISTS case_review( - `id` VARCHAR(50) NOT NULL COMMENT 'ID' , - `name` VARCHAR(200) NOT NULL COMMENT '名称' , - `status` VARCHAR(64) NOT NULL DEFAULT 'PREPARE' COMMENT '评审状态:未开始/进行中/已完成/已结束/已归档' , - `create_time` BIGINT NOT NULL COMMENT '创建时间' , - `update_time` BIGINT NOT NULL COMMENT '更新时间' , - `end_time` BIGINT NOT NULL COMMENT '评审结束时间' , - `description` TEXT COMMENT '描述' , - `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , - `tags` VARCHAR(1000) COMMENT '标签' , - `create_user` VARCHAR(50) NOT NULL COMMENT '创建人' , - `review_pass_rule` VARCHAR(64) NOT NULL DEFAULT 'SINGLE' COMMENT '评审规则:单人通过/全部通过' , + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `name` VARCHAR(255) NOT NULL COMMENT '名称', + `module_id` VARCHAR(50) NOT NULL COMMENT '模块id', + `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID', + `status` VARCHAR(64) NOT NULL DEFAULT 'PREPARE' COMMENT '评审状态:未开始/进行中/已完成/已结束/已归档', + `review_pass_rule` VARCHAR(64) NOT NULL DEFAULT 'SINGLE' COMMENT '通过标准:单人通过/全部通过', + `start_time` BIGINT COMMENT '评审开始时间', + `end_time` BIGINT COMMENT '评审结束时间', + `tags` VARCHAR(1000) COMMENT '标签', + `description` VARCHAR(1000) COMMENT '描述', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', + `update_time` BIGINT NOT NULL COMMENT '更新时间', + `update_user` VARCHAR(50) NOT NULL COMMENT '更新人', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '用例评审'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '用例评审'; -CREATE INDEX idx_create_user ON case_review(create_user); -CREATE INDEX idx_project_id ON case_review(project_id); -CREATE INDEX idx_name ON case_review(name); -CREATE INDEX idx_status ON case_review(status); -CREATE INDEX idx_review_pass_rule ON case_review(review_pass_rule); -CREATE INDEX idx_create_time ON case_review(create_time); -CREATE INDEX idx_end_time ON case_review(end_time); -CREATE INDEX idx_update_time ON case_review(update_time); +CREATE INDEX idx_create_user ON case_review (create_user); +CREATE INDEX idx_project_id ON case_review (project_id); +CREATE INDEX idx_name ON case_review (name); +CREATE INDEX idx_status ON case_review (status); +CREATE INDEX idx_review_pass_rule ON case_review (review_pass_rule); +CREATE INDEX idx_create_time ON case_review (create_time); +CREATE INDEX idx_update_time ON case_review (update_time); +CREATE INDEX idx_update_user ON case_review (update_user); +CREATE INDEX idx_module_id ON case_review (module_id); CREATE TABLE IF NOT EXISTS case_review_user( - `review_id` VARCHAR(50) NOT NULL COMMENT '评审ID' , - `user_id` VARCHAR(50) NOT NULL COMMENT '评审人ID' , - PRIMARY KEY (review_id,user_id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '评审和评审人中间表'; + `review_id` VARCHAR(50) NOT NULL COMMENT '评审ID', + `user_id` VARCHAR(50) NOT NULL COMMENT '评审人ID', + PRIMARY KEY (review_id, user_id) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '评审和评审人中间表'; CREATE TABLE IF NOT EXISTS case_review_functional_case( - `id` VARCHAR(50) NOT NULL COMMENT 'ID' , - `review_id` VARCHAR(50) NOT NULL COMMENT '评审ID' , - `case_id` VARCHAR(50) NOT NULL COMMENT '用例ID' , - `status` VARCHAR(64) NOT NULL DEFAULT 'UNDERWAY' COMMENT '评审状态:进行中/通过/不通过/重新提审' , - `create_time` BIGINT NOT NULL COMMENT '创建时间' , - `update_time` BIGINT NOT NULL COMMENT '更新时间' , - `create_user` VARCHAR(50) NOT NULL COMMENT '创建人' , - `pos` BIGINT NOT NULL DEFAULT 0 COMMENT '自定义排序,间隔5000' , - `deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '关联的用例是否放入回收站' , + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `review_id` VARCHAR(50) NOT NULL COMMENT '评审ID', + `case_id` VARCHAR(50) NOT NULL COMMENT '用例ID', + `status` VARCHAR(64) NOT NULL DEFAULT 'UNDERWAY' COMMENT '评审状态:进行中/通过/不通过/重新提审', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', + `update_time` BIGINT NOT NULL COMMENT '更新时间', + `pos` BIGINT NOT NULL DEFAULT 0 COMMENT '自定义排序,间隔5000', PRIMARY KEY (id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '用例评审和功能用例的中间表'; +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '用例评审和功能用例的中间表'; -CREATE INDEX idx_case_id ON case_review_functional_case(case_id); -CREATE INDEX idx_review_id ON case_review_functional_case(review_id); +CREATE INDEX idx_case_id ON case_review_functional_case (case_id); +CREATE INDEX idx_review_id ON case_review_functional_case (review_id); +CREATE INDEX idx_status ON case_review_functional_case (status); CREATE TABLE IF NOT EXISTS case_review_functional_case_user( - `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例和评审中间表的ID' , - `review_id` VARCHAR(50) NOT NULL COMMENT '评审ID' , - `user_id` VARCHAR(50) NOT NULL COMMENT '评审人ID' - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '功能用例评审和评审人的中间表'; + `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID', + `review_id` VARCHAR(50) NOT NULL COMMENT '评审ID', + `user_id` VARCHAR(50) NOT NULL COMMENT '评审人ID' +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '功能用例评审和评审人的中间表'; -CREATE UNIQUE INDEX test_case_review_test_case_users_pk ON case_review_functional_case_user(review_id,case_id,user_id); +CREATE UNIQUE INDEX idx_case_review_user ON case_review_functional_case_user (review_id, user_id, case_id); +CREATE INDEX idx_case_id_review_id ON case_review_functional_case_user (case_id, review_id); +CREATE INDEX idx_case_id ON case_review_functional_case_user (case_id); +CREATE INDEX idx_review_id ON case_review_functional_case_user (review_id); +CREATE INDEX idx_user_id ON case_review_functional_case_user (user_id); CREATE TABLE IF NOT EXISTS case_review_follower( - `review_id` VARCHAR(50) NOT NULL COMMENT '评审ID' , - `user_id` VARCHAR(50) NOT NULL COMMENT '关注人' , - PRIMARY KEY (review_id,user_id) - ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '用例评审关注人'; + `review_id` VARCHAR(50) NOT NULL COMMENT '评审ID', + `user_id` VARCHAR(50) NOT NULL COMMENT '关注人', + PRIMARY KEY (review_id, user_id) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '用例评审和关注人的中间表'; + +CREATE TABLE IF NOT EXISTS case_review_history( + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `review_id` VARCHAR(50) NOT NULL COMMENT '评审ID', + `case_id` VARCHAR(50) NOT NULL COMMENT '用例ID', + `content` BLOB NOT NULL COMMENT '评审意见', + `status` VARCHAR(64) COMMENT '评审结果:通过/不通过', + `notifier` VARCHAR(1000) COMMENT '通知人', + `create_user` VARCHAR(50) NOT NULL COMMENT '操作人', + `create_time` BIGINT NOT NULL COMMENT '操作时间', + PRIMARY KEY (id) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '评审变更记录'; + + +CREATE INDEX idx_case_id ON case_review_history(case_id); +CREATE INDEX idx_review_id ON case_review_history(review_id); +CREATE INDEX idx_review_id_case_id ON case_review_history(review_id,case_id); + +CREATE TABLE IF NOT EXISTS case_review_module( + `id` VARCHAR(50) NOT NULL COMMENT 'ID', + `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID', + `name` VARCHAR(100) NOT NULL COMMENT '名称', + `parent_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '父节点ID', + `pos` BIGINT NOT NULL DEFAULT 0 COMMENT '同一节点下的顺序', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `update_time` BIGINT NOT NULL COMMENT '更新时间', + `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', + `update_user` VARCHAR(50) NOT NULL COMMENT '更新人', + PRIMARY KEY (id) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '用例评审模块'; + + +CREATE INDEX idx_project_id ON case_review_module (project_id); +CREATE INDEX idx_name ON case_review_module (name); +CREATE INDEX idx_pos ON case_review_module (pos); +CREATE INDEX idx_parent_id ON case_review_module (parent_id); +CREATE INDEX idx_create_user ON case_review_module (create_user); +CREATE INDEX idx_update_user ON case_review_module (update_user); +CREATE INDEX idx_create_time ON case_review_module (create_time); +CREATE INDEX idx_update_time ON case_review_module (update_time); -- set innodb lock wait timeout to default diff --git a/backend/services/system-setting/src/test/resources/dml/init_aspect.sql b/backend/services/system-setting/src/test/resources/dml/init_aspect.sql index 4679776ca1..5b8a29ff36 100644 --- a/backend/services/system-setting/src/test/resources/dml/init_aspect.sql +++ b/backend/services/system-setting/src/test/resources/dml/init_aspect.sql @@ -43,6 +43,6 @@ VALUES ('aspect_gyq_api_scenario_one', 'api_scenario', 'p1', 'test-api-status', INSERT INTO test_plan(id, project_id, parent_id, name, status, stage, tags, create_time, create_user, update_time, update_user, planned_start_time, planned_end_time, actual_start_time, actual_end_time, description) VALUES ('aspect_gyq_test_plan_one','100001100001', 'NONE', 'test_plan', 'test-api-status', 'Smock', null, UNIX_TIMESTAMP() * 1000, 'admin', UNIX_TIMESTAMP() * 1000, 'admin', UNIX_TIMESTAMP() * 2000, UNIX_TIMESTAMP() * 3000 ,UNIX_TIMESTAMP() * 2000, UNIX_TIMESTAMP() * 3000,null); -INSERT INTO case_review(id, name, status, create_time, update_time, end_time, description, project_id, tags, create_user, review_pass_rule) -VALUES ('aspect_gyq_case_review_one','case_review','test-api-status',UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000,null, '100001100001',null,'admin','single'); +INSERT INTO case_review(id, name, module_id, project_id, start_time, end_time, tags, description, create_time, create_user, update_time, update_user) +VALUES ('aspect_gyq_case_review_one','case_review','module_id', '100001100001', null, null, null, null, UNIX_TIMESTAMP() * 1000, 'admin', UNIX_TIMESTAMP() * 1000, 'admin');