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 ea997e16d9..0987992258 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 @@ -40,6 +40,10 @@ public class CaseReview implements Serializable { @Size(min = 1, max = 64, message = "{case_review.review_pass_rule.length_range}", groups = {Created.class, Updated.class}) private String reviewPassRule; + @Schema(description = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{case_review.pos.not_blank}", groups = {Created.class}) + private Long pos; + @Schema(description = "评审开始时间") private Long startTime; @@ -73,6 +77,7 @@ public class CaseReview implements Serializable { projectId("project_id", "projectId", "VARCHAR", false), status("status", "status", "VARCHAR", true), reviewPassRule("review_pass_rule", "reviewPassRule", "VARCHAR", false), + pos("pos", "pos", "BIGINT", false), startTime("start_time", "startTime", "BIGINT", false), endTime("end_time", "endTime", "BIGINT", false), tags("tags", "tags", "VARCHAR", false), 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 bcdbee68ff..892c60b3c1 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 @@ -524,6 +524,66 @@ public class CaseReviewExample { 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 andStartTimeIsNull() { addCriterion("start_time is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCase.java b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCase.java index c3740657ea..ce3826604e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCase.java +++ b/backend/framework/domain/src/main/java/io/metersphere/functional/domain/FunctionalCase.java @@ -1,11 +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.NotNull; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; @@ -13,99 +10,94 @@ import lombok.Data; @Data public class FunctionalCase implements Serializable { - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{functional_case.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "业务ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "{functional_case.num.not_blank}", groups = {Created.class}) + @Schema(description = "业务ID") private Long num; - @Schema(description = "模块ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "模块ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.module_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{functional_case.module_id.length_range}", groups = {Created.class, Updated.class}) private String moduleId; - @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.project_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{functional_case.project_id.length_range}", groups = {Created.class, Updated.class}) private String projectId; - @Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "模板ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.template_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{functional_case.template_id.length_range}", groups = {Created.class, Updated.class}) private String templateId; - @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.name.not_blank}", groups = {Created.class}) @Size(min = 1, max = 255, message = "{functional_case.name.length_range}", groups = {Created.class, Updated.class}) private String name; - @Schema(description = "评审状态:未评审/评审中/通过/不通过/重新提审", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "评审状态:未评审/评审中/通过/不通过/重新提审", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.review_status.not_blank}", groups = {Created.class}) @Size(min = 1, max = 64, message = "{functional_case.review_status.length_range}", groups = {Created.class, Updated.class}) private String reviewStatus; - @Schema(description = "标签(JSON)") + @Schema(description = "标签(JSON)") private String tags; - @Schema(description = "编辑模式:步骤模式/文本模式", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "编辑模式:步骤模式/文本模式", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.case_edit_type.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{functional_case.case_edit_type.length_range}", groups = {Created.class, Updated.class}) private String caseEditType; - @Schema(description = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.pos.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 19, message = "{functional_case.pos.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "自定义排序,间隔5000", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{functional_case.pos.not_blank}", groups = {Created.class}) private Long pos; - @Schema(description = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "版本ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.version_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{functional_case.version_id.length_range}", groups = {Created.class, Updated.class}) private String versionId; - @Schema(description = "指向初始版本ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "指向初始版本ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.ref_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{functional_case.ref_id.length_range}", groups = {Created.class, Updated.class}) private String refId; - @Schema(description = "最近的执行结果:未执行/通过/失败/阻塞/跳过", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "最近的执行结果:未执行/通过/失败/阻塞/跳过", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{functional_case.last_execute_result.not_blank}", groups = {Created.class}) @Size(min = 1, max = 64, message = "{functional_case.last_execute_result.length_range}", groups = {Created.class, Updated.class}) private String lastExecuteResult; - @Schema(description = "是否在回收站:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.deleted.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 1, message = "{functional_case.deleted.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "是否在回收站:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{functional_case.deleted.not_blank}", groups = {Created.class}) private Boolean deleted; - @Schema(description = "是否是公共用例:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.public_case.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 1, message = "{functional_case.public_case.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "是否是公共用例:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{functional_case.public_case.not_blank}", groups = {Created.class}) private Boolean publicCase; - @Schema(description = "是否为最新版本:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{functional_case.latest.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 1, message = "{functional_case.latest.length_range}", groups = {Created.class, Updated.class}) + @Schema(description = "是否为最新版本:0-否,1-是", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{functional_case.latest.not_blank}", groups = {Created.class}) private Boolean latest; - @Schema(description = "创建人") + @Schema(description = "创建人") private String createUser; - @Schema(description = "更新人") + @Schema(description = "更新人") private String updateUser; - @Schema(description = "删除人") + @Schema(description = "删除人") private String deleteUser; - @Schema(description = "创建时间") + @Schema(description = "创建时间") private Long createTime; - @Schema(description = "更新时间") + @Schema(description = "更新时间") private Long updateTime; - @Schema(description = "删除时间") + @Schema(description = "删除时间") private Long deleteTime; private static final long serialVersionUID = 1L; 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 60495656e5..2404ae8c77 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 @@ -8,6 +8,7 @@ + @@ -76,7 +77,7 @@ - id, `name`, module_id, project_id, `status`, review_pass_rule, start_time, end_time, + id, `name`, module_id, project_id, `status`, review_pass_rule, pos, start_time, end_time, tags, description, create_time, create_user, update_time, update_user