diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocation.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocation.java index fff38e1b73..498ade0422 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocation.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocation.java @@ -4,11 +4,13 @@ import io.metersphere.validation.groups.Created; import io.metersphere.validation.groups.Updated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; +import lombok.Data; + import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; -import lombok.Data; @Data public class TestPlanAllocation implements Serializable { @@ -22,16 +24,43 @@ public class TestPlanAllocation implements Serializable { @Size(min = 1, max = 50, message = "{test_plan_allocation.test_plan_id.length_range}", groups = {Created.class, Updated.class}) private String testPlanId; - @Schema(description = "运行配置", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{test_plan_allocation.run_mode_config.not_blank}", groups = {Created.class}) - private byte[] runModeConfig; + @Schema(description = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_allocation.test_resource_pool_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_allocation.test_resource_pool_id.length_range}", groups = {Created.class, Updated.class}) + private String testResourcePoolId; + + @Schema(description = "是否失败重试", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{test_plan_allocation.retry_on_fail.not_blank}", groups = {Created.class}) + private Boolean retryOnFail; + + @Schema(description = "失败重试类型(步骤/场景)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_allocation.retry_type.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_allocation.retry_type.length_range}", groups = {Created.class, Updated.class}) + private String retryType; + + @Schema(description = "失败重试次数", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{test_plan_allocation.retry_times.not_blank}", groups = {Created.class}) + private Integer retryTimes; + + @Schema(description = "失败重试间隔(单位: ms)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{test_plan_allocation.retry_interval.not_blank}", groups = {Created.class}) + private Integer retryInterval; + + @Schema(description = "是否失败停止", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{test_plan_allocation.stop_on_fail.not_blank}", groups = {Created.class}) + private Boolean stopOnFail; private static final long serialVersionUID = 1L; public enum Column { id("id", "id", "VARCHAR", false), testPlanId("test_plan_id", "testPlanId", "VARCHAR", false), - runModeConfig("run_mode_config", "runModeConfig", "LONGVARBINARY", false); + testResourcePoolId("test_resource_pool_id", "testResourcePoolId", "VARCHAR", false), + retryOnFail("retry_on_fail", "retryOnFail", "BIT", false), + retryType("retry_type", "retryType", "VARCHAR", false), + retryTimes("retry_times", "retryTimes", "INTEGER", false), + retryInterval("retry_interval", "retryInterval", "INTEGER", false), + stopOnFail("stop_on_fail", "stopOnFail", "BIT", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocationExample.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocationExample.java index eb1d6cff01..34abde3e2e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocationExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocationExample.java @@ -243,6 +243,386 @@ public class TestPlanAllocationExample { addCriterion("test_plan_id not between", value1, value2, "testPlanId"); return (Criteria) this; } + + public Criteria andTestResourcePoolIdIsNull() { + addCriterion("test_resource_pool_id is null"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIsNotNull() { + addCriterion("test_resource_pool_id is not null"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdEqualTo(String value) { + addCriterion("test_resource_pool_id =", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotEqualTo(String value) { + addCriterion("test_resource_pool_id <>", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdGreaterThan(String value) { + addCriterion("test_resource_pool_id >", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdGreaterThanOrEqualTo(String value) { + addCriterion("test_resource_pool_id >=", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLessThan(String value) { + addCriterion("test_resource_pool_id <", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLessThanOrEqualTo(String value) { + addCriterion("test_resource_pool_id <=", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdLike(String value) { + addCriterion("test_resource_pool_id like", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotLike(String value) { + addCriterion("test_resource_pool_id not like", value, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdIn(List values) { + addCriterion("test_resource_pool_id in", values, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotIn(List values) { + addCriterion("test_resource_pool_id not in", values, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdBetween(String value1, String value2) { + addCriterion("test_resource_pool_id between", value1, value2, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andTestResourcePoolIdNotBetween(String value1, String value2) { + addCriterion("test_resource_pool_id not between", value1, value2, "testResourcePoolId"); + return (Criteria) this; + } + + public Criteria andRetryOnFailIsNull() { + addCriterion("retry_on_fail is null"); + return (Criteria) this; + } + + public Criteria andRetryOnFailIsNotNull() { + addCriterion("retry_on_fail is not null"); + return (Criteria) this; + } + + public Criteria andRetryOnFailEqualTo(Boolean value) { + addCriterion("retry_on_fail =", value, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryOnFailNotEqualTo(Boolean value) { + addCriterion("retry_on_fail <>", value, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryOnFailGreaterThan(Boolean value) { + addCriterion("retry_on_fail >", value, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryOnFailGreaterThanOrEqualTo(Boolean value) { + addCriterion("retry_on_fail >=", value, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryOnFailLessThan(Boolean value) { + addCriterion("retry_on_fail <", value, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryOnFailLessThanOrEqualTo(Boolean value) { + addCriterion("retry_on_fail <=", value, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryOnFailIn(List values) { + addCriterion("retry_on_fail in", values, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryOnFailNotIn(List values) { + addCriterion("retry_on_fail not in", values, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryOnFailBetween(Boolean value1, Boolean value2) { + addCriterion("retry_on_fail between", value1, value2, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryOnFailNotBetween(Boolean value1, Boolean value2) { + addCriterion("retry_on_fail not between", value1, value2, "retryOnFail"); + return (Criteria) this; + } + + public Criteria andRetryTypeIsNull() { + addCriterion("retry_type is null"); + return (Criteria) this; + } + + public Criteria andRetryTypeIsNotNull() { + addCriterion("retry_type is not null"); + return (Criteria) this; + } + + public Criteria andRetryTypeEqualTo(String value) { + addCriterion("retry_type =", value, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeNotEqualTo(String value) { + addCriterion("retry_type <>", value, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeGreaterThan(String value) { + addCriterion("retry_type >", value, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeGreaterThanOrEqualTo(String value) { + addCriterion("retry_type >=", value, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeLessThan(String value) { + addCriterion("retry_type <", value, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeLessThanOrEqualTo(String value) { + addCriterion("retry_type <=", value, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeLike(String value) { + addCriterion("retry_type like", value, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeNotLike(String value) { + addCriterion("retry_type not like", value, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeIn(List values) { + addCriterion("retry_type in", values, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeNotIn(List values) { + addCriterion("retry_type not in", values, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeBetween(String value1, String value2) { + addCriterion("retry_type between", value1, value2, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTypeNotBetween(String value1, String value2) { + addCriterion("retry_type not between", value1, value2, "retryType"); + return (Criteria) this; + } + + public Criteria andRetryTimesIsNull() { + addCriterion("retry_times is null"); + return (Criteria) this; + } + + public Criteria andRetryTimesIsNotNull() { + addCriterion("retry_times is not null"); + return (Criteria) this; + } + + public Criteria andRetryTimesEqualTo(Integer value) { + addCriterion("retry_times =", value, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryTimesNotEqualTo(Integer value) { + addCriterion("retry_times <>", value, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryTimesGreaterThan(Integer value) { + addCriterion("retry_times >", value, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryTimesGreaterThanOrEqualTo(Integer value) { + addCriterion("retry_times >=", value, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryTimesLessThan(Integer value) { + addCriterion("retry_times <", value, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryTimesLessThanOrEqualTo(Integer value) { + addCriterion("retry_times <=", value, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryTimesIn(List values) { + addCriterion("retry_times in", values, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryTimesNotIn(List values) { + addCriterion("retry_times not in", values, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryTimesBetween(Integer value1, Integer value2) { + addCriterion("retry_times between", value1, value2, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryTimesNotBetween(Integer value1, Integer value2) { + addCriterion("retry_times not between", value1, value2, "retryTimes"); + return (Criteria) this; + } + + public Criteria andRetryIntervalIsNull() { + addCriterion("retry_interval is null"); + return (Criteria) this; + } + + public Criteria andRetryIntervalIsNotNull() { + addCriterion("retry_interval is not null"); + return (Criteria) this; + } + + public Criteria andRetryIntervalEqualTo(Integer value) { + addCriterion("retry_interval =", value, "retryInterval"); + return (Criteria) this; + } + + public Criteria andRetryIntervalNotEqualTo(Integer value) { + addCriterion("retry_interval <>", value, "retryInterval"); + return (Criteria) this; + } + + public Criteria andRetryIntervalGreaterThan(Integer value) { + addCriterion("retry_interval >", value, "retryInterval"); + return (Criteria) this; + } + + public Criteria andRetryIntervalGreaterThanOrEqualTo(Integer value) { + addCriterion("retry_interval >=", value, "retryInterval"); + return (Criteria) this; + } + + public Criteria andRetryIntervalLessThan(Integer value) { + addCriterion("retry_interval <", value, "retryInterval"); + return (Criteria) this; + } + + public Criteria andRetryIntervalLessThanOrEqualTo(Integer value) { + addCriterion("retry_interval <=", value, "retryInterval"); + return (Criteria) this; + } + + public Criteria andRetryIntervalIn(List values) { + addCriterion("retry_interval in", values, "retryInterval"); + return (Criteria) this; + } + + public Criteria andRetryIntervalNotIn(List values) { + addCriterion("retry_interval not in", values, "retryInterval"); + return (Criteria) this; + } + + public Criteria andRetryIntervalBetween(Integer value1, Integer value2) { + addCriterion("retry_interval between", value1, value2, "retryInterval"); + return (Criteria) this; + } + + public Criteria andRetryIntervalNotBetween(Integer value1, Integer value2) { + addCriterion("retry_interval not between", value1, value2, "retryInterval"); + return (Criteria) this; + } + + public Criteria andStopOnFailIsNull() { + addCriterion("stop_on_fail is null"); + return (Criteria) this; + } + + public Criteria andStopOnFailIsNotNull() { + addCriterion("stop_on_fail is not null"); + return (Criteria) this; + } + + public Criteria andStopOnFailEqualTo(Boolean value) { + addCriterion("stop_on_fail =", value, "stopOnFail"); + return (Criteria) this; + } + + public Criteria andStopOnFailNotEqualTo(Boolean value) { + addCriterion("stop_on_fail <>", value, "stopOnFail"); + return (Criteria) this; + } + + public Criteria andStopOnFailGreaterThan(Boolean value) { + addCriterion("stop_on_fail >", value, "stopOnFail"); + return (Criteria) this; + } + + public Criteria andStopOnFailGreaterThanOrEqualTo(Boolean value) { + addCriterion("stop_on_fail >=", value, "stopOnFail"); + return (Criteria) this; + } + + public Criteria andStopOnFailLessThan(Boolean value) { + addCriterion("stop_on_fail <", value, "stopOnFail"); + return (Criteria) this; + } + + public Criteria andStopOnFailLessThanOrEqualTo(Boolean value) { + addCriterion("stop_on_fail <=", value, "stopOnFail"); + return (Criteria) this; + } + + public Criteria andStopOnFailIn(List values) { + addCriterion("stop_on_fail in", values, "stopOnFail"); + return (Criteria) this; + } + + public Criteria andStopOnFailNotIn(List values) { + addCriterion("stop_on_fail not in", values, "stopOnFail"); + return (Criteria) this; + } + + public Criteria andStopOnFailBetween(Boolean value1, Boolean value2) { + addCriterion("stop_on_fail between", value1, value2, "stopOnFail"); + return (Criteria) this; + } + + public Criteria andStopOnFailNotBetween(Boolean value1, Boolean value2) { + addCriterion("stop_on_fail not between", value1, value2, "stopOnFail"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocationType.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocationType.java new file mode 100644 index 0000000000..69a21077e8 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocationType.java @@ -0,0 +1,123 @@ +package io.metersphere.plan.domain; + +import io.metersphere.validation.groups.Created; +import io.metersphere.validation.groups.Updated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; + +@Data +public class TestPlanAllocationType implements Serializable { + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_allocation_type.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{test_plan_allocation_type.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_allocation_type.test_plan_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_allocation_type.test_plan_id.length_range}", groups = {Created.class, Updated.class}) + private String testPlanId; + + @Schema(description = "测试集类型名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_allocation_type.name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 255, message = "{test_plan_allocation_type.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(description = "测试集类型(功能/接口/场景)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_allocation_type.type.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_allocation_type.type.length_range}", groups = {Created.class, Updated.class}) + private String type; + + @Schema(description = "执行方式(串行/并行)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_allocation_type.execute_method.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_allocation_type.execute_method.length_range}", groups = {Created.class, Updated.class}) + private String executeMethod; + + @Schema(description = "自定义排序,间隔为2的N次幂", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{test_plan_allocation_type.pos.not_blank}", groups = {Created.class}) + private Long pos; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + testPlanId("test_plan_id", "testPlanId", "VARCHAR", false), + name("name", "name", "VARCHAR", true), + type("type", "type", "VARCHAR", true), + executeMethod("execute_method", "executeMethod", "VARCHAR", false), + pos("pos", "pos", "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/plan/domain/TestPlanAllocationTypeExample.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocationTypeExample.java new file mode 100644 index 0000000000..ebcaf8f1d6 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanAllocationTypeExample.java @@ -0,0 +1,610 @@ +package io.metersphere.plan.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestPlanAllocationTypeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestPlanAllocationTypeExample() { + 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 andTestPlanIdIsNull() { + addCriterion("test_plan_id is null"); + return (Criteria) this; + } + + public Criteria andTestPlanIdIsNotNull() { + addCriterion("test_plan_id is not null"); + return (Criteria) this; + } + + public Criteria andTestPlanIdEqualTo(String value) { + addCriterion("test_plan_id =", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotEqualTo(String value) { + addCriterion("test_plan_id <>", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdGreaterThan(String value) { + addCriterion("test_plan_id >", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdGreaterThanOrEqualTo(String value) { + addCriterion("test_plan_id >=", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdLessThan(String value) { + addCriterion("test_plan_id <", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdLessThanOrEqualTo(String value) { + addCriterion("test_plan_id <=", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdLike(String value) { + addCriterion("test_plan_id like", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotLike(String value) { + addCriterion("test_plan_id not like", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdIn(List values) { + addCriterion("test_plan_id in", values, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotIn(List values) { + addCriterion("test_plan_id not in", values, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdBetween(String value1, String value2) { + addCriterion("test_plan_id between", value1, value2, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotBetween(String value1, String value2) { + addCriterion("test_plan_id not between", value1, value2, "testPlanId"); + 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 andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andExecuteMethodIsNull() { + addCriterion("execute_method is null"); + return (Criteria) this; + } + + public Criteria andExecuteMethodIsNotNull() { + addCriterion("execute_method is not null"); + return (Criteria) this; + } + + public Criteria andExecuteMethodEqualTo(String value) { + addCriterion("execute_method =", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodNotEqualTo(String value) { + addCriterion("execute_method <>", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodGreaterThan(String value) { + addCriterion("execute_method >", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodGreaterThanOrEqualTo(String value) { + addCriterion("execute_method >=", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodLessThan(String value) { + addCriterion("execute_method <", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodLessThanOrEqualTo(String value) { + addCriterion("execute_method <=", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodLike(String value) { + addCriterion("execute_method like", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodNotLike(String value) { + addCriterion("execute_method not like", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodIn(List values) { + addCriterion("execute_method in", values, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodNotIn(List values) { + addCriterion("execute_method not in", values, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodBetween(String value1, String value2) { + addCriterion("execute_method between", value1, value2, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodNotBetween(String value1, String value2) { + addCriterion("execute_method not between", value1, value2, "executeMethod"); + 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 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/plan/domain/TestPlanApiCase.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCase.java index dd2bb8a196..8ccfbba1c7 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCase.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCase.java @@ -1,12 +1,16 @@ package io.metersphere.plan.domain; -import io.metersphere.validation.groups.*; +import io.metersphere.validation.groups.Created; +import io.metersphere.validation.groups.Updated; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; + import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; -import lombok.Data; @Data public class TestPlanApiCase implements Serializable { @@ -15,9 +19,6 @@ public class TestPlanApiCase implements Serializable { @Size(min = 1, max = 50, message = "{test_plan_api_case.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "num") - private Long num; - @Schema(description = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{test_plan_api_case.test_plan_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{test_plan_api_case.test_plan_id.length_range}", groups = {Created.class, Updated.class}) @@ -47,6 +48,11 @@ public class TestPlanApiCase implements Serializable { @NotNull(message = "{test_plan_api_case.pos.not_blank}", groups = {Created.class}) private Long pos; + @Schema(description = "测试计划集id", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_api_case.test_plan_collection_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_api_case.test_plan_collection_id.length_range}", groups = {Created.class, Updated.class}) + private String testPlanCollectionId; + @Schema(description = "所属环境") private String environmentId; @@ -54,7 +60,6 @@ public class TestPlanApiCase implements Serializable { public enum Column { id("id", "id", "VARCHAR", false), - num("num", "num", "BIGINT", false), testPlanId("test_plan_id", "testPlanId", "VARCHAR", false), apiCaseId("api_case_id", "apiCaseId", "VARCHAR", false), lastExecResult("last_exec_result", "lastExecResult", "VARCHAR", false), @@ -63,6 +68,7 @@ public class TestPlanApiCase implements Serializable { createTime("create_time", "createTime", "BIGINT", false), createUser("create_user", "createUser", "VARCHAR", false), pos("pos", "pos", "BIGINT", false), + testPlanCollectionId("test_plan_collection_id", "testPlanCollectionId", "VARCHAR", false), environmentId("environment_id", "environmentId", "LONGVARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCaseExample.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCaseExample.java index 70d5c421f7..3567dfed6a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCaseExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiCaseExample.java @@ -174,66 +174,6 @@ public class TestPlanApiCaseExample { return (Criteria) this; } - public Criteria andNumIsNull() { - addCriterion("num is null"); - return (Criteria) this; - } - - public Criteria andNumIsNotNull() { - addCriterion("num is not null"); - return (Criteria) this; - } - - public Criteria andNumEqualTo(Long value) { - addCriterion("num =", value, "num"); - return (Criteria) this; - } - - public Criteria andNumNotEqualTo(Long value) { - addCriterion("num <>", value, "num"); - return (Criteria) this; - } - - public Criteria andNumGreaterThan(Long value) { - addCriterion("num >", value, "num"); - return (Criteria) this; - } - - public Criteria andNumGreaterThanOrEqualTo(Long value) { - addCriterion("num >=", value, "num"); - return (Criteria) this; - } - - public Criteria andNumLessThan(Long value) { - addCriterion("num <", value, "num"); - return (Criteria) this; - } - - public Criteria andNumLessThanOrEqualTo(Long value) { - addCriterion("num <=", value, "num"); - return (Criteria) this; - } - - public Criteria andNumIn(List values) { - addCriterion("num in", values, "num"); - return (Criteria) this; - } - - public Criteria andNumNotIn(List values) { - addCriterion("num not in", values, "num"); - return (Criteria) this; - } - - public Criteria andNumBetween(Long value1, Long value2) { - addCriterion("num between", value1, value2, "num"); - return (Criteria) this; - } - - public Criteria andNumNotBetween(Long value1, Long value2) { - addCriterion("num not between", value1, value2, "num"); - return (Criteria) this; - } - public Criteria andTestPlanIdIsNull() { addCriterion("test_plan_id is null"); return (Criteria) this; @@ -773,6 +713,76 @@ public class TestPlanApiCaseExample { addCriterion("pos not between", value1, value2, "pos"); return (Criteria) this; } + + public Criteria andTestPlanCollectionIdIsNull() { + addCriterion("test_plan_collection_id is null"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdIsNotNull() { + addCriterion("test_plan_collection_id is not null"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdEqualTo(String value) { + addCriterion("test_plan_collection_id =", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdNotEqualTo(String value) { + addCriterion("test_plan_collection_id <>", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdGreaterThan(String value) { + addCriterion("test_plan_collection_id >", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdGreaterThanOrEqualTo(String value) { + addCriterion("test_plan_collection_id >=", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdLessThan(String value) { + addCriterion("test_plan_collection_id <", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdLessThanOrEqualTo(String value) { + addCriterion("test_plan_collection_id <=", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdLike(String value) { + addCriterion("test_plan_collection_id like", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdNotLike(String value) { + addCriterion("test_plan_collection_id not like", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdIn(List values) { + addCriterion("test_plan_collection_id in", values, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdNotIn(List values) { + addCriterion("test_plan_collection_id not in", values, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdBetween(String value1, String value2) { + addCriterion("test_plan_collection_id between", value1, value2, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdNotBetween(String value1, String value2) { + addCriterion("test_plan_collection_id not between", value1, value2, "testPlanCollectionId"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenario.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenario.java index 0e37be5185..bdd66b5874 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenario.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenario.java @@ -1,12 +1,16 @@ package io.metersphere.plan.domain; -import io.metersphere.validation.groups.*; +import io.metersphere.validation.groups.Created; +import io.metersphere.validation.groups.Updated; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; + import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; -import lombok.Data; @Data public class TestPlanApiScenario implements Serializable { @@ -15,9 +19,6 @@ public class TestPlanApiScenario implements Serializable { @Size(min = 1, max = 50, message = "{test_plan_api_scenario.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "num") - private Long num; - @Schema(description = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{test_plan_api_scenario.test_plan_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{test_plan_api_scenario.test_plan_id.length_range}", groups = {Created.class, Updated.class}) @@ -26,15 +27,18 @@ public class TestPlanApiScenario implements Serializable { @Schema(description = "场景ID") private String apiScenarioId; + @Schema(description = "所属环境或环境组id") + private String environmentId; + + @Schema(description = "执行人") + private String executeUser; + @Schema(description = "最后执行结果") private String lastExecResult; @Schema(description = "最后执行报告") private String lastExecReportId; - @Schema(description = "执行人") - private String executeUser; - @Schema(description = "创建时间") private Long createTime; @@ -45,23 +49,29 @@ public class TestPlanApiScenario implements Serializable { @NotNull(message = "{test_plan_api_scenario.pos.not_blank}", groups = {Created.class}) private Long pos; - @Schema(description = "所属环境") - private String environmentId; + @Schema(description = "测试计划集id", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_api_scenario.test_plan_collection_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_api_scenario.test_plan_collection_id.length_range}", groups = {Created.class, Updated.class}) + private String testPlanCollectionId; + + @Schema(description = "是否为环境组") + private Boolean grouped; private static final long serialVersionUID = 1L; public enum Column { id("id", "id", "VARCHAR", false), - num("num", "num", "BIGINT", false), testPlanId("test_plan_id", "testPlanId", "VARCHAR", false), apiScenarioId("api_scenario_id", "apiScenarioId", "VARCHAR", false), + environmentId("environment_id", "environmentId", "VARCHAR", false), + executeUser("execute_user", "executeUser", "VARCHAR", false), lastExecResult("last_exec_result", "lastExecResult", "VARCHAR", false), lastExecReportId("last_exec_report_id", "lastExecReportId", "VARCHAR", false), - executeUser("execute_user", "executeUser", "VARCHAR", false), createTime("create_time", "createTime", "BIGINT", false), createUser("create_user", "createUser", "VARCHAR", false), pos("pos", "pos", "BIGINT", false), - environmentId("environment_id", "environmentId", "LONGVARCHAR", false); + testPlanCollectionId("test_plan_collection_id", "testPlanCollectionId", "VARCHAR", false), + grouped("grouped", "grouped", "BIT", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenarioExample.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenarioExample.java index 758a318b99..9ac58b7027 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenarioExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanApiScenarioExample.java @@ -174,66 +174,6 @@ public class TestPlanApiScenarioExample { return (Criteria) this; } - public Criteria andNumIsNull() { - addCriterion("num is null"); - return (Criteria) this; - } - - public Criteria andNumIsNotNull() { - addCriterion("num is not null"); - return (Criteria) this; - } - - public Criteria andNumEqualTo(Long value) { - addCriterion("num =", value, "num"); - return (Criteria) this; - } - - public Criteria andNumNotEqualTo(Long value) { - addCriterion("num <>", value, "num"); - return (Criteria) this; - } - - public Criteria andNumGreaterThan(Long value) { - addCriterion("num >", value, "num"); - return (Criteria) this; - } - - public Criteria andNumGreaterThanOrEqualTo(Long value) { - addCriterion("num >=", value, "num"); - return (Criteria) this; - } - - public Criteria andNumLessThan(Long value) { - addCriterion("num <", value, "num"); - return (Criteria) this; - } - - public Criteria andNumLessThanOrEqualTo(Long value) { - addCriterion("num <=", value, "num"); - return (Criteria) this; - } - - public Criteria andNumIn(List values) { - addCriterion("num in", values, "num"); - return (Criteria) this; - } - - public Criteria andNumNotIn(List values) { - addCriterion("num not in", values, "num"); - return (Criteria) this; - } - - public Criteria andNumBetween(Long value1, Long value2) { - addCriterion("num between", value1, value2, "num"); - return (Criteria) this; - } - - public Criteria andNumNotBetween(Long value1, Long value2) { - addCriterion("num not between", value1, value2, "num"); - return (Criteria) this; - } - public Criteria andTestPlanIdIsNull() { addCriterion("test_plan_id is null"); return (Criteria) this; @@ -374,6 +314,146 @@ public class TestPlanApiScenarioExample { return (Criteria) this; } + public Criteria andEnvironmentIdIsNull() { + addCriterion("environment_id is null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIsNotNull() { + addCriterion("environment_id is not null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdEqualTo(String value) { + addCriterion("environment_id =", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotEqualTo(String value) { + addCriterion("environment_id <>", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThan(String value) { + addCriterion("environment_id >", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) { + addCriterion("environment_id >=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThan(String value) { + addCriterion("environment_id <", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThanOrEqualTo(String value) { + addCriterion("environment_id <=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLike(String value) { + addCriterion("environment_id like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotLike(String value) { + addCriterion("environment_id not like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIn(List values) { + addCriterion("environment_id in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotIn(List values) { + addCriterion("environment_id not in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdBetween(String value1, String value2) { + addCriterion("environment_id between", value1, value2, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotBetween(String value1, String value2) { + addCriterion("environment_id not between", value1, value2, "environmentId"); + return (Criteria) this; + } + + public Criteria andExecuteUserIsNull() { + addCriterion("execute_user is null"); + return (Criteria) this; + } + + public Criteria andExecuteUserIsNotNull() { + addCriterion("execute_user is not null"); + return (Criteria) this; + } + + public Criteria andExecuteUserEqualTo(String value) { + addCriterion("execute_user =", value, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserNotEqualTo(String value) { + addCriterion("execute_user <>", value, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserGreaterThan(String value) { + addCriterion("execute_user >", value, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserGreaterThanOrEqualTo(String value) { + addCriterion("execute_user >=", value, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserLessThan(String value) { + addCriterion("execute_user <", value, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserLessThanOrEqualTo(String value) { + addCriterion("execute_user <=", value, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserLike(String value) { + addCriterion("execute_user like", value, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserNotLike(String value) { + addCriterion("execute_user not like", value, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserIn(List values) { + addCriterion("execute_user in", values, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserNotIn(List values) { + addCriterion("execute_user not in", values, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserBetween(String value1, String value2) { + addCriterion("execute_user between", value1, value2, "executeUser"); + return (Criteria) this; + } + + public Criteria andExecuteUserNotBetween(String value1, String value2) { + addCriterion("execute_user not between", value1, value2, "executeUser"); + return (Criteria) this; + } + public Criteria andLastExecResultIsNull() { addCriterion("last_exec_result is null"); return (Criteria) this; @@ -514,76 +594,6 @@ public class TestPlanApiScenarioExample { return (Criteria) this; } - public Criteria andExecuteUserIsNull() { - addCriterion("execute_user is null"); - return (Criteria) this; - } - - public Criteria andExecuteUserIsNotNull() { - addCriterion("execute_user is not null"); - return (Criteria) this; - } - - public Criteria andExecuteUserEqualTo(String value) { - addCriterion("execute_user =", value, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserNotEqualTo(String value) { - addCriterion("execute_user <>", value, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserGreaterThan(String value) { - addCriterion("execute_user >", value, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserGreaterThanOrEqualTo(String value) { - addCriterion("execute_user >=", value, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserLessThan(String value) { - addCriterion("execute_user <", value, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserLessThanOrEqualTo(String value) { - addCriterion("execute_user <=", value, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserLike(String value) { - addCriterion("execute_user like", value, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserNotLike(String value) { - addCriterion("execute_user not like", value, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserIn(List values) { - addCriterion("execute_user in", values, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserNotIn(List values) { - addCriterion("execute_user not in", values, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserBetween(String value1, String value2) { - addCriterion("execute_user between", value1, value2, "executeUser"); - return (Criteria) this; - } - - public Criteria andExecuteUserNotBetween(String value1, String value2) { - addCriterion("execute_user not between", value1, value2, "executeUser"); - return (Criteria) this; - } - public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; @@ -773,6 +783,136 @@ public class TestPlanApiScenarioExample { addCriterion("pos not between", value1, value2, "pos"); return (Criteria) this; } + + public Criteria andTestPlanCollectionIdIsNull() { + addCriterion("test_plan_collection_id is null"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdIsNotNull() { + addCriterion("test_plan_collection_id is not null"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdEqualTo(String value) { + addCriterion("test_plan_collection_id =", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdNotEqualTo(String value) { + addCriterion("test_plan_collection_id <>", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdGreaterThan(String value) { + addCriterion("test_plan_collection_id >", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdGreaterThanOrEqualTo(String value) { + addCriterion("test_plan_collection_id >=", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdLessThan(String value) { + addCriterion("test_plan_collection_id <", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdLessThanOrEqualTo(String value) { + addCriterion("test_plan_collection_id <=", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdLike(String value) { + addCriterion("test_plan_collection_id like", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdNotLike(String value) { + addCriterion("test_plan_collection_id not like", value, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdIn(List values) { + addCriterion("test_plan_collection_id in", values, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdNotIn(List values) { + addCriterion("test_plan_collection_id not in", values, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdBetween(String value1, String value2) { + addCriterion("test_plan_collection_id between", value1, value2, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andTestPlanCollectionIdNotBetween(String value1, String value2) { + addCriterion("test_plan_collection_id not between", value1, value2, "testPlanCollectionId"); + return (Criteria) this; + } + + public Criteria andGroupedIsNull() { + addCriterion("grouped is null"); + return (Criteria) this; + } + + public Criteria andGroupedIsNotNull() { + addCriterion("grouped is not null"); + return (Criteria) this; + } + + public Criteria andGroupedEqualTo(Boolean value) { + addCriterion("grouped =", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedNotEqualTo(Boolean value) { + addCriterion("grouped <>", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedGreaterThan(Boolean value) { + addCriterion("grouped >", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedGreaterThanOrEqualTo(Boolean value) { + addCriterion("grouped >=", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedLessThan(Boolean value) { + addCriterion("grouped <", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedLessThanOrEqualTo(Boolean value) { + addCriterion("grouped <=", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedIn(List values) { + addCriterion("grouped in", values, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedNotIn(List values) { + addCriterion("grouped not in", values, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedBetween(Boolean value1, Boolean value2) { + addCriterion("grouped between", value1, value2, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedNotBetween(Boolean value1, Boolean value2) { + addCriterion("grouped not between", value1, value2, "grouped"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollection.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollection.java new file mode 100644 index 0000000000..330b1802bb --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollection.java @@ -0,0 +1,142 @@ +package io.metersphere.plan.domain; + +import io.metersphere.validation.groups.Created; +import io.metersphere.validation.groups.Updated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; + +@Data +public class TestPlanCollection implements Serializable { + @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_collection.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{test_plan_collection.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "测试计划ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_collection.test_plan_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_collection.test_plan_id.length_range}", groups = {Created.class, Updated.class}) + private String testPlanId; + + @Schema(description = "所属测试集类型ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_collection.test_collection_type_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_collection.test_collection_type_id.length_range}", groups = {Created.class, Updated.class}) + private String testCollectionTypeId; + + @Schema(description = "测试集名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_collection.name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 255, message = "{test_plan_collection.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(description = "执行方式(串行/并行)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_collection.execute_method.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_collection.execute_method.length_range}", groups = {Created.class, Updated.class}) + private String executeMethod; + + @Schema(description = "是否使用环境组", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{test_plan_collection.grouped.not_blank}", groups = {Created.class}) + private Boolean grouped; + + @Schema(description = "环境ID/环境组ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{test_plan_collection.environment_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{test_plan_collection.environment_id.length_range}", groups = {Created.class, Updated.class}) + private String environmentId; + + @Schema(description = "自定义排序,间隔为2的N次幂", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{test_plan_collection.pos.not_blank}", groups = {Created.class}) + private Long pos; + + @Schema(description = "创建人") + private String createUser; + + @Schema(description = "创建时间") + private Long createTime; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + testPlanId("test_plan_id", "testPlanId", "VARCHAR", false), + testCollectionTypeId("test_collection_type_id", "testCollectionTypeId", "VARCHAR", false), + name("name", "name", "VARCHAR", true), + executeMethod("execute_method", "executeMethod", "VARCHAR", false), + grouped("grouped", "grouped", "BIT", false), + environmentId("environment_id", "environmentId", "VARCHAR", false), + pos("pos", "pos", "BIGINT", false), + createUser("create_user", "createUser", "VARCHAR", false), + createTime("create_time", "createTime", "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/plan/domain/TestPlanCollectionExample.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollectionExample.java new file mode 100644 index 0000000000..eff51564eb --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollectionExample.java @@ -0,0 +1,870 @@ +package io.metersphere.plan.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestPlanCollectionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestPlanCollectionExample() { + 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 andTestPlanIdIsNull() { + addCriterion("test_plan_id is null"); + return (Criteria) this; + } + + public Criteria andTestPlanIdIsNotNull() { + addCriterion("test_plan_id is not null"); + return (Criteria) this; + } + + public Criteria andTestPlanIdEqualTo(String value) { + addCriterion("test_plan_id =", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotEqualTo(String value) { + addCriterion("test_plan_id <>", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdGreaterThan(String value) { + addCriterion("test_plan_id >", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdGreaterThanOrEqualTo(String value) { + addCriterion("test_plan_id >=", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdLessThan(String value) { + addCriterion("test_plan_id <", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdLessThanOrEqualTo(String value) { + addCriterion("test_plan_id <=", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdLike(String value) { + addCriterion("test_plan_id like", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotLike(String value) { + addCriterion("test_plan_id not like", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdIn(List values) { + addCriterion("test_plan_id in", values, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotIn(List values) { + addCriterion("test_plan_id not in", values, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdBetween(String value1, String value2) { + addCriterion("test_plan_id between", value1, value2, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotBetween(String value1, String value2) { + addCriterion("test_plan_id not between", value1, value2, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdIsNull() { + addCriterion("test_collection_type_id is null"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdIsNotNull() { + addCriterion("test_collection_type_id is not null"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdEqualTo(String value) { + addCriterion("test_collection_type_id =", value, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdNotEqualTo(String value) { + addCriterion("test_collection_type_id <>", value, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdGreaterThan(String value) { + addCriterion("test_collection_type_id >", value, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdGreaterThanOrEqualTo(String value) { + addCriterion("test_collection_type_id >=", value, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdLessThan(String value) { + addCriterion("test_collection_type_id <", value, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdLessThanOrEqualTo(String value) { + addCriterion("test_collection_type_id <=", value, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdLike(String value) { + addCriterion("test_collection_type_id like", value, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdNotLike(String value) { + addCriterion("test_collection_type_id not like", value, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdIn(List values) { + addCriterion("test_collection_type_id in", values, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdNotIn(List values) { + addCriterion("test_collection_type_id not in", values, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdBetween(String value1, String value2) { + addCriterion("test_collection_type_id between", value1, value2, "testCollectionTypeId"); + return (Criteria) this; + } + + public Criteria andTestCollectionTypeIdNotBetween(String value1, String value2) { + addCriterion("test_collection_type_id not between", value1, value2, "testCollectionTypeId"); + 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 andExecuteMethodIsNull() { + addCriterion("execute_method is null"); + return (Criteria) this; + } + + public Criteria andExecuteMethodIsNotNull() { + addCriterion("execute_method is not null"); + return (Criteria) this; + } + + public Criteria andExecuteMethodEqualTo(String value) { + addCriterion("execute_method =", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodNotEqualTo(String value) { + addCriterion("execute_method <>", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodGreaterThan(String value) { + addCriterion("execute_method >", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodGreaterThanOrEqualTo(String value) { + addCriterion("execute_method >=", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodLessThan(String value) { + addCriterion("execute_method <", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodLessThanOrEqualTo(String value) { + addCriterion("execute_method <=", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodLike(String value) { + addCriterion("execute_method like", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodNotLike(String value) { + addCriterion("execute_method not like", value, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodIn(List values) { + addCriterion("execute_method in", values, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodNotIn(List values) { + addCriterion("execute_method not in", values, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodBetween(String value1, String value2) { + addCriterion("execute_method between", value1, value2, "executeMethod"); + return (Criteria) this; + } + + public Criteria andExecuteMethodNotBetween(String value1, String value2) { + addCriterion("execute_method not between", value1, value2, "executeMethod"); + return (Criteria) this; + } + + public Criteria andGroupedIsNull() { + addCriterion("grouped is null"); + return (Criteria) this; + } + + public Criteria andGroupedIsNotNull() { + addCriterion("grouped is not null"); + return (Criteria) this; + } + + public Criteria andGroupedEqualTo(Boolean value) { + addCriterion("grouped =", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedNotEqualTo(Boolean value) { + addCriterion("grouped <>", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedGreaterThan(Boolean value) { + addCriterion("grouped >", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedGreaterThanOrEqualTo(Boolean value) { + addCriterion("grouped >=", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedLessThan(Boolean value) { + addCriterion("grouped <", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedLessThanOrEqualTo(Boolean value) { + addCriterion("grouped <=", value, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedIn(List values) { + addCriterion("grouped in", values, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedNotIn(List values) { + addCriterion("grouped not in", values, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedBetween(Boolean value1, Boolean value2) { + addCriterion("grouped between", value1, value2, "grouped"); + return (Criteria) this; + } + + public Criteria andGroupedNotBetween(Boolean value1, Boolean value2) { + addCriterion("grouped not between", value1, value2, "grouped"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIsNull() { + addCriterion("environment_id is null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIsNotNull() { + addCriterion("environment_id is not null"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdEqualTo(String value) { + addCriterion("environment_id =", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotEqualTo(String value) { + addCriterion("environment_id <>", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThan(String value) { + addCriterion("environment_id >", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) { + addCriterion("environment_id >=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThan(String value) { + addCriterion("environment_id <", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLessThanOrEqualTo(String value) { + addCriterion("environment_id <=", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdLike(String value) { + addCriterion("environment_id like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotLike(String value) { + addCriterion("environment_id not like", value, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdIn(List values) { + addCriterion("environment_id in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotIn(List values) { + addCriterion("environment_id not in", values, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdBetween(String value1, String value2) { + addCriterion("environment_id between", value1, value2, "environmentId"); + return (Criteria) this; + } + + public Criteria andEnvironmentIdNotBetween(String value1, String value2) { + addCriterion("environment_id not between", value1, value2, "environmentId"); + 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 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/plan/domain/TestPlanConfig.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfig.java index 58c2896695..26075a6e5b 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfig.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfig.java @@ -27,11 +27,7 @@ public class TestPlanConfig implements Serializable { @NotNull(message = "{test_plan_config.repeat_case.not_blank}", groups = {Created.class}) private Boolean repeatCase; - @Schema(description = "是否开启测试规划", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "{test_plan_config.test_planning.not_blank}", groups = {Created.class}) - private Boolean testPlanning; - - @Schema(title = "测试计划通过阈值; 0-100, 保留两位小数", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "测试计划通过阈值; 0-100, 保留两位小数", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "{test_plan_config.pass_threshold.not_blank}", groups = {Created.class}) private Double passThreshold; @@ -41,7 +37,6 @@ public class TestPlanConfig implements Serializable { testPlanId("test_plan_id", "testPlanId", "VARCHAR", false), automaticStatusUpdate("automatic_status_update", "automaticStatusUpdate", "BIT", false), repeatCase("repeat_case", "repeatCase", "BIT", false), - testPlanning("test_planning", "testPlanning", "BIT", false), passThreshold("pass_threshold", "passThreshold", "DECIMAL", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfigExample.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfigExample.java index dc815e22a0..1e1e3ca8e0 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfigExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanConfigExample.java @@ -1,5 +1,6 @@ package io.metersphere.plan.domain; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -294,66 +295,6 @@ public class TestPlanConfigExample { return (Criteria) this; } - public Criteria andTestPlanningIsNull() { - addCriterion("test_planning is null"); - return (Criteria) this; - } - - public Criteria andTestPlanningIsNotNull() { - addCriterion("test_planning is not null"); - return (Criteria) this; - } - - public Criteria andTestPlanningEqualTo(Boolean value) { - addCriterion("test_planning =", value, "testPlanning"); - return (Criteria) this; - } - - public Criteria andTestPlanningNotEqualTo(Boolean value) { - addCriterion("test_planning <>", value, "testPlanning"); - return (Criteria) this; - } - - public Criteria andTestPlanningGreaterThan(Boolean value) { - addCriterion("test_planning >", value, "testPlanning"); - return (Criteria) this; - } - - public Criteria andTestPlanningGreaterThanOrEqualTo(Boolean value) { - addCriterion("test_planning >=", value, "testPlanning"); - return (Criteria) this; - } - - public Criteria andTestPlanningLessThan(Boolean value) { - addCriterion("test_planning <", value, "testPlanning"); - return (Criteria) this; - } - - public Criteria andTestPlanningLessThanOrEqualTo(Boolean value) { - addCriterion("test_planning <=", value, "testPlanning"); - return (Criteria) this; - } - - public Criteria andTestPlanningIn(List values) { - addCriterion("test_planning in", values, "testPlanning"); - return (Criteria) this; - } - - public Criteria andTestPlanningNotIn(List values) { - addCriterion("test_planning not in", values, "testPlanning"); - return (Criteria) this; - } - - public Criteria andTestPlanningBetween(Boolean value1, Boolean value2) { - addCriterion("test_planning between", value1, value2, "testPlanning"); - return (Criteria) this; - } - - public Criteria andTestPlanningNotBetween(Boolean value1, Boolean value2) { - addCriterion("test_planning not between", value1, value2, "testPlanning"); - return (Criteria) this; - } - public Criteria andPassThresholdIsNull() { addCriterion("pass_threshold is null"); return (Criteria) this; @@ -364,52 +305,52 @@ public class TestPlanConfigExample { return (Criteria) this; } - public Criteria andPassThresholdEqualTo(Long value) { + public Criteria andPassThresholdEqualTo(BigDecimal value) { addCriterion("pass_threshold =", value, "passThreshold"); return (Criteria) this; } - public Criteria andPassThresholdNotEqualTo(Long value) { + public Criteria andPassThresholdNotEqualTo(BigDecimal value) { addCriterion("pass_threshold <>", value, "passThreshold"); return (Criteria) this; } - public Criteria andPassThresholdGreaterThan(Long value) { + public Criteria andPassThresholdGreaterThan(BigDecimal value) { addCriterion("pass_threshold >", value, "passThreshold"); return (Criteria) this; } - public Criteria andPassThresholdGreaterThanOrEqualTo(Long value) { + public Criteria andPassThresholdGreaterThanOrEqualTo(BigDecimal value) { addCriterion("pass_threshold >=", value, "passThreshold"); return (Criteria) this; } - public Criteria andPassThresholdLessThan(Long value) { + public Criteria andPassThresholdLessThan(BigDecimal value) { addCriterion("pass_threshold <", value, "passThreshold"); return (Criteria) this; } - public Criteria andPassThresholdLessThanOrEqualTo(Long value) { + public Criteria andPassThresholdLessThanOrEqualTo(BigDecimal value) { addCriterion("pass_threshold <=", value, "passThreshold"); return (Criteria) this; } - public Criteria andPassThresholdIn(List values) { + public Criteria andPassThresholdIn(List values) { addCriterion("pass_threshold in", values, "passThreshold"); return (Criteria) this; } - public Criteria andPassThresholdNotIn(List values) { + public Criteria andPassThresholdNotIn(List values) { addCriterion("pass_threshold not in", values, "passThreshold"); return (Criteria) this; } - public Criteria andPassThresholdBetween(Long value1, Long value2) { + public Criteria andPassThresholdBetween(BigDecimal value1, BigDecimal value2) { addCriterion("pass_threshold between", value1, value2, "passThreshold"); return (Criteria) this; } - public Criteria andPassThresholdNotBetween(Long value1, Long value2) { + public Criteria andPassThresholdNotBetween(BigDecimal value1, BigDecimal value2) { addCriterion("pass_threshold not between", value1, value2, "passThreshold"); return (Criteria) this; } diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportSummary.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportSummary.java index de282c283d..9a7238110d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportSummary.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportSummary.java @@ -43,9 +43,6 @@ public class TestPlanReportSummary implements Serializable { @Schema(description = "总结") private String summary; - @Schema(description = "报告统计内容") - private byte[] reportCount; - private static final long serialVersionUID = 1L; public enum Column { @@ -55,8 +52,7 @@ public class TestPlanReportSummary implements Serializable { apiScenarioCount("api_scenario_count", "apiScenarioCount", "BIGINT", false), bugCount("bug_count", "bugCount", "BIGINT", false), testPlanReportId("test_plan_report_id", "testPlanReportId", "VARCHAR", false), - summary("summary", "summary", "VARCHAR", false), - reportCount("report_count", "reportCount", "LONGVARBINARY", false); + summary("summary", "summary", "LONGVARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportSummaryExample.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportSummaryExample.java index 1fcdaa697a..a4f98da5e0 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportSummaryExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanReportSummaryExample.java @@ -483,76 +483,6 @@ public class TestPlanReportSummaryExample { addCriterion("test_plan_report_id not between", value1, value2, "testPlanReportId"); return (Criteria) this; } - - public Criteria andSummaryIsNull() { - addCriterion("summary is null"); - return (Criteria) this; - } - - public Criteria andSummaryIsNotNull() { - addCriterion("summary is not null"); - return (Criteria) this; - } - - public Criteria andSummaryEqualTo(String value) { - addCriterion("summary =", value, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryNotEqualTo(String value) { - addCriterion("summary <>", value, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryGreaterThan(String value) { - addCriterion("summary >", value, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryGreaterThanOrEqualTo(String value) { - addCriterion("summary >=", value, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryLessThan(String value) { - addCriterion("summary <", value, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryLessThanOrEqualTo(String value) { - addCriterion("summary <=", value, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryLike(String value) { - addCriterion("summary like", value, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryNotLike(String value) { - addCriterion("summary not like", value, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryIn(List values) { - addCriterion("summary in", values, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryNotIn(List values) { - addCriterion("summary not in", values, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryBetween(String value1, String value2) { - addCriterion("summary between", value1, value2, "summary"); - return (Criteria) this; - } - - public Criteria andSummaryNotBetween(String value1, String value2) { - addCriterion("summary not between", value1, value2, "summary"); - return (Criteria) this; - } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationMapper.java b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationMapper.java index d24598113f..b75eed3900 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationMapper.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationMapper.java @@ -2,9 +2,10 @@ package io.metersphere.plan.mapper; import io.metersphere.plan.domain.TestPlanAllocation; import io.metersphere.plan.domain.TestPlanAllocationExample; -import java.util.List; import org.apache.ibatis.annotations.Param; +import java.util.List; + public interface TestPlanAllocationMapper { long countByExample(TestPlanAllocationExample example); @@ -16,22 +17,16 @@ public interface TestPlanAllocationMapper { int insertSelective(TestPlanAllocation record); - List selectByExampleWithBLOBs(TestPlanAllocationExample example); - List selectByExample(TestPlanAllocationExample example); TestPlanAllocation selectByPrimaryKey(String id); int updateByExampleSelective(@Param("record") TestPlanAllocation record, @Param("example") TestPlanAllocationExample example); - int updateByExampleWithBLOBs(@Param("record") TestPlanAllocation record, @Param("example") TestPlanAllocationExample example); - int updateByExample(@Param("record") TestPlanAllocation record, @Param("example") TestPlanAllocationExample example); int updateByPrimaryKeySelective(TestPlanAllocation record); - int updateByPrimaryKeyWithBLOBs(TestPlanAllocation record); - int updateByPrimaryKey(TestPlanAllocation record); int batchInsert(@Param("list") List list); diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationMapper.xml index fbf2083c79..f40535dd69 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationMapper.xml @@ -4,9 +4,12 @@ - - - + + + + + + @@ -67,27 +70,9 @@ - id, test_plan_id + id, test_plan_id, test_resource_pool_id, retry_on_fail, retry_type, retry_times, + retry_interval, stop_on_fail - - run_mode_config - - - select - , - from test_plan_allocation where id = #{id,jdbcType=VARCHAR} @@ -121,10 +104,12 @@ - insert into test_plan_allocation (id, test_plan_id, run_mode_config - ) - values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{runModeConfig,jdbcType=LONGVARBINARY} - ) + insert into test_plan_allocation (id, test_plan_id, test_resource_pool_id, + retry_on_fail, retry_type, retry_times, + retry_interval, stop_on_fail) + values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{testResourcePoolId,jdbcType=VARCHAR}, + #{retryOnFail,jdbcType=BIT}, #{retryType,jdbcType=VARCHAR}, #{retryTimes,jdbcType=INTEGER}, + #{retryInterval,jdbcType=INTEGER}, #{stopOnFail,jdbcType=BIT}) insert into test_plan_allocation @@ -135,8 +120,23 @@ test_plan_id, - - run_mode_config, + + test_resource_pool_id, + + + retry_on_fail, + + + retry_type, + + + retry_times, + + + retry_interval, + + + stop_on_fail, @@ -146,8 +146,23 @@ #{testPlanId,jdbcType=VARCHAR}, - - #{runModeConfig,jdbcType=LONGVARBINARY}, + + #{testResourcePoolId,jdbcType=VARCHAR}, + + + #{retryOnFail,jdbcType=BIT}, + + + #{retryType,jdbcType=VARCHAR}, + + + #{retryTimes,jdbcType=INTEGER}, + + + #{retryInterval,jdbcType=INTEGER}, + + + #{stopOnFail,jdbcType=BIT}, @@ -166,27 +181,39 @@ test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, - - run_mode_config = #{record.runModeConfig,jdbcType=LONGVARBINARY}, + + test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}, + + + retry_on_fail = #{record.retryOnFail,jdbcType=BIT}, + + + retry_type = #{record.retryType,jdbcType=VARCHAR}, + + + retry_times = #{record.retryTimes,jdbcType=INTEGER}, + + + retry_interval = #{record.retryInterval,jdbcType=INTEGER}, + + + stop_on_fail = #{record.stopOnFail,jdbcType=BIT}, - - update test_plan_allocation - set id = #{record.id,jdbcType=VARCHAR}, - test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, - run_mode_config = #{record.runModeConfig,jdbcType=LONGVARBINARY} - - - - update test_plan_allocation set id = #{record.id,jdbcType=VARCHAR}, - test_plan_id = #{record.testPlanId,jdbcType=VARCHAR} + test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, + test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR}, + retry_on_fail = #{record.retryOnFail,jdbcType=BIT}, + retry_type = #{record.retryType,jdbcType=VARCHAR}, + retry_times = #{record.retryTimes,jdbcType=INTEGER}, + retry_interval = #{record.retryInterval,jdbcType=INTEGER}, + stop_on_fail = #{record.stopOnFail,jdbcType=BIT} @@ -197,30 +224,47 @@ test_plan_id = #{testPlanId,jdbcType=VARCHAR}, - - run_mode_config = #{runModeConfig,jdbcType=LONGVARBINARY}, + + test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}, + + + retry_on_fail = #{retryOnFail,jdbcType=BIT}, + + + retry_type = #{retryType,jdbcType=VARCHAR}, + + + retry_times = #{retryTimes,jdbcType=INTEGER}, + + + retry_interval = #{retryInterval,jdbcType=INTEGER}, + + + stop_on_fail = #{stopOnFail,jdbcType=BIT}, where id = #{id,jdbcType=VARCHAR} - - update test_plan_allocation - set test_plan_id = #{testPlanId,jdbcType=VARCHAR}, - run_mode_config = #{runModeConfig,jdbcType=LONGVARBINARY} - where id = #{id,jdbcType=VARCHAR} - update test_plan_allocation - set test_plan_id = #{testPlanId,jdbcType=VARCHAR} + set test_plan_id = #{testPlanId,jdbcType=VARCHAR}, + test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR}, + retry_on_fail = #{retryOnFail,jdbcType=BIT}, + retry_type = #{retryType,jdbcType=VARCHAR}, + retry_times = #{retryTimes,jdbcType=INTEGER}, + retry_interval = #{retryInterval,jdbcType=INTEGER}, + stop_on_fail = #{stopOnFail,jdbcType=BIT} where id = #{id,jdbcType=VARCHAR} insert into test_plan_allocation - (id, test_plan_id, run_mode_config) + (id, test_plan_id, test_resource_pool_id, retry_on_fail, retry_type, retry_times, + retry_interval, stop_on_fail) values - (#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.runModeConfig,jdbcType=LONGVARBINARY} - ) + (#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.testResourcePoolId,jdbcType=VARCHAR}, + #{item.retryOnFail,jdbcType=BIT}, #{item.retryType,jdbcType=VARCHAR}, #{item.retryTimes,jdbcType=INTEGER}, + #{item.retryInterval,jdbcType=INTEGER}, #{item.stopOnFail,jdbcType=BIT}) @@ -239,8 +283,23 @@ #{item.testPlanId,jdbcType=VARCHAR} - - #{item.runModeConfig,jdbcType=LONGVARBINARY} + + #{item.testResourcePoolId,jdbcType=VARCHAR} + + + #{item.retryOnFail,jdbcType=BIT} + + + #{item.retryType,jdbcType=VARCHAR} + + + #{item.retryTimes,jdbcType=INTEGER} + + + #{item.retryInterval,jdbcType=INTEGER} + + + #{item.stopOnFail,jdbcType=BIT} ) diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationTypeMapper.java b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationTypeMapper.java new file mode 100644 index 0000000000..da50a3a269 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationTypeMapper.java @@ -0,0 +1,35 @@ +package io.metersphere.plan.mapper; + +import io.metersphere.plan.domain.TestPlanAllocationType; +import io.metersphere.plan.domain.TestPlanAllocationTypeExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface TestPlanAllocationTypeMapper { + long countByExample(TestPlanAllocationTypeExample example); + + int deleteByExample(TestPlanAllocationTypeExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestPlanAllocationType record); + + int insertSelective(TestPlanAllocationType record); + + List selectByExample(TestPlanAllocationTypeExample example); + + TestPlanAllocationType selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestPlanAllocationType record, @Param("example") TestPlanAllocationTypeExample example); + + int updateByExample(@Param("record") TestPlanAllocationType record, @Param("example") TestPlanAllocationTypeExample example); + + int updateByPrimaryKeySelective(TestPlanAllocationType record); + + int updateByPrimaryKey(TestPlanAllocationType record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") TestPlanAllocationType.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationTypeMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationTypeMapper.xml new file mode 100644 index 0000000000..ee87ff8f8a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanAllocationTypeMapper.xml @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + 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, test_plan_id, `name`, `type`, execute_method, pos + + + + + delete from test_plan_allocation_type + where id = #{id,jdbcType=VARCHAR} + + + delete from test_plan_allocation_type + + + + + + insert into test_plan_allocation_type (id, test_plan_id, `name`, + `type`, execute_method, pos + ) + values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{type,jdbcType=VARCHAR}, #{executeMethod,jdbcType=VARCHAR}, #{pos,jdbcType=BIGINT} + ) + + + insert into test_plan_allocation_type + + + id, + + + test_plan_id, + + + `name`, + + + `type`, + + + execute_method, + + + pos, + + + + + #{id,jdbcType=VARCHAR}, + + + #{testPlanId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{executeMethod,jdbcType=VARCHAR}, + + + #{pos,jdbcType=BIGINT}, + + + + + + update test_plan_allocation_type + + + id = #{record.id,jdbcType=VARCHAR}, + + + test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + `type` = #{record.type,jdbcType=VARCHAR}, + + + execute_method = #{record.executeMethod,jdbcType=VARCHAR}, + + + pos = #{record.pos,jdbcType=BIGINT}, + + + + + + + + update test_plan_allocation_type + set id = #{record.id,jdbcType=VARCHAR}, + test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + `type` = #{record.type,jdbcType=VARCHAR}, + execute_method = #{record.executeMethod,jdbcType=VARCHAR}, + pos = #{record.pos,jdbcType=BIGINT} + + + + + + update test_plan_allocation_type + + + test_plan_id = #{testPlanId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + `type` = #{type,jdbcType=VARCHAR}, + + + execute_method = #{executeMethod,jdbcType=VARCHAR}, + + + pos = #{pos,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_plan_allocation_type + set test_plan_id = #{testPlanId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + `type` = #{type,jdbcType=VARCHAR}, + execute_method = #{executeMethod,jdbcType=VARCHAR}, + pos = #{pos,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + + insert into test_plan_allocation_type + (id, test_plan_id, `name`, `type`, execute_method, pos) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, + #{item.type,jdbcType=VARCHAR}, #{item.executeMethod,jdbcType=VARCHAR}, #{item.pos,jdbcType=BIGINT} + ) + + + + insert into test_plan_allocation_type ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.testPlanId,jdbcType=VARCHAR} + + + #{item.name,jdbcType=VARCHAR} + + + #{item.type,jdbcType=VARCHAR} + + + #{item.executeMethod,jdbcType=VARCHAR} + + + #{item.pos,jdbcType=BIGINT} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiCaseMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiCaseMapper.xml index 1af9033e27..fa4e4f251d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiCaseMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiCaseMapper.xml @@ -3,7 +3,6 @@ - @@ -12,6 +11,7 @@ + @@ -75,8 +75,8 @@ - id, num, test_plan_id, api_case_id, last_exec_result, last_exec_report_id, execute_user, - create_time, create_user, pos + id, test_plan_id, api_case_id, last_exec_result, last_exec_report_id, execute_user, + create_time, create_user, pos, test_plan_collection_id environment_id @@ -130,14 +130,16 @@ - insert into test_plan_api_case (id, num, test_plan_id, - api_case_id, last_exec_result, last_exec_report_id, - execute_user, create_time, create_user, - pos, environment_id) - values (#{id,jdbcType=VARCHAR}, #{num,jdbcType=BIGINT}, #{testPlanId,jdbcType=VARCHAR}, - #{apiCaseId,jdbcType=VARCHAR}, #{lastExecResult,jdbcType=VARCHAR}, #{lastExecReportId,jdbcType=VARCHAR}, - #{executeUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, - #{pos,jdbcType=BIGINT}, #{environmentId,jdbcType=LONGVARCHAR}) + insert into test_plan_api_case (id, test_plan_id, api_case_id, + last_exec_result, last_exec_report_id, execute_user, + create_time, create_user, pos, + test_plan_collection_id, environment_id + ) + values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{apiCaseId,jdbcType=VARCHAR}, + #{lastExecResult,jdbcType=VARCHAR}, #{lastExecReportId,jdbcType=VARCHAR}, #{executeUser,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, #{pos,jdbcType=BIGINT}, + #{testPlanCollectionId,jdbcType=VARCHAR}, #{environmentId,jdbcType=LONGVARCHAR} + ) insert into test_plan_api_case @@ -145,9 +147,6 @@ id, - - num, - test_plan_id, @@ -172,6 +171,9 @@ pos, + + test_plan_collection_id, + environment_id, @@ -180,9 +182,6 @@ #{id,jdbcType=VARCHAR}, - - #{num,jdbcType=BIGINT}, - #{testPlanId,jdbcType=VARCHAR}, @@ -207,6 +206,9 @@ #{pos,jdbcType=BIGINT}, + + #{testPlanCollectionId,jdbcType=VARCHAR}, + #{environmentId,jdbcType=LONGVARCHAR}, @@ -224,9 +226,6 @@ id = #{record.id,jdbcType=VARCHAR}, - - num = #{record.num,jdbcType=BIGINT}, - test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, @@ -251,6 +250,9 @@ pos = #{record.pos,jdbcType=BIGINT}, + + test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR}, + environment_id = #{record.environmentId,jdbcType=LONGVARCHAR}, @@ -262,7 +264,6 @@ update test_plan_api_case set id = #{record.id,jdbcType=VARCHAR}, - num = #{record.num,jdbcType=BIGINT}, test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, api_case_id = #{record.apiCaseId,jdbcType=VARCHAR}, last_exec_result = #{record.lastExecResult,jdbcType=VARCHAR}, @@ -271,6 +272,7 @@ create_time = #{record.createTime,jdbcType=BIGINT}, create_user = #{record.createUser,jdbcType=VARCHAR}, pos = #{record.pos,jdbcType=BIGINT}, + test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR}, environment_id = #{record.environmentId,jdbcType=LONGVARCHAR} @@ -279,7 +281,6 @@ update test_plan_api_case set id = #{record.id,jdbcType=VARCHAR}, - num = #{record.num,jdbcType=BIGINT}, test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, api_case_id = #{record.apiCaseId,jdbcType=VARCHAR}, last_exec_result = #{record.lastExecResult,jdbcType=VARCHAR}, @@ -287,7 +288,8 @@ execute_user = #{record.executeUser,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, create_user = #{record.createUser,jdbcType=VARCHAR}, - pos = #{record.pos,jdbcType=BIGINT} + pos = #{record.pos,jdbcType=BIGINT}, + test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR} @@ -295,9 +297,6 @@ update test_plan_api_case - - num = #{num,jdbcType=BIGINT}, - test_plan_id = #{testPlanId,jdbcType=VARCHAR}, @@ -322,6 +321,9 @@ pos = #{pos,jdbcType=BIGINT}, + + test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR}, + environment_id = #{environmentId,jdbcType=LONGVARCHAR}, @@ -330,8 +332,7 @@ update test_plan_api_case - set num = #{num,jdbcType=BIGINT}, - test_plan_id = #{testPlanId,jdbcType=VARCHAR}, + set test_plan_id = #{testPlanId,jdbcType=VARCHAR}, api_case_id = #{apiCaseId,jdbcType=VARCHAR}, last_exec_result = #{lastExecResult,jdbcType=VARCHAR}, last_exec_report_id = #{lastExecReportId,jdbcType=VARCHAR}, @@ -339,32 +340,34 @@ create_time = #{createTime,jdbcType=BIGINT}, create_user = #{createUser,jdbcType=VARCHAR}, pos = #{pos,jdbcType=BIGINT}, + test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR}, environment_id = #{environmentId,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} update test_plan_api_case - set num = #{num,jdbcType=BIGINT}, - test_plan_id = #{testPlanId,jdbcType=VARCHAR}, + set test_plan_id = #{testPlanId,jdbcType=VARCHAR}, api_case_id = #{apiCaseId,jdbcType=VARCHAR}, last_exec_result = #{lastExecResult,jdbcType=VARCHAR}, last_exec_report_id = #{lastExecReportId,jdbcType=VARCHAR}, execute_user = #{executeUser,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, create_user = #{createUser,jdbcType=VARCHAR}, - pos = #{pos,jdbcType=BIGINT} + pos = #{pos,jdbcType=BIGINT}, + test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} insert into test_plan_api_case - (id, num, test_plan_id, api_case_id, last_exec_result, last_exec_report_id, execute_user, - create_time, create_user, pos, environment_id) + (id, test_plan_id, api_case_id, last_exec_result, last_exec_report_id, execute_user, + create_time, create_user, pos, test_plan_collection_id, environment_id) values - (#{item.id,jdbcType=VARCHAR}, #{item.num,jdbcType=BIGINT}, #{item.testPlanId,jdbcType=VARCHAR}, - #{item.apiCaseId,jdbcType=VARCHAR}, #{item.lastExecResult,jdbcType=VARCHAR}, #{item.lastExecReportId,jdbcType=VARCHAR}, + (#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.apiCaseId,jdbcType=VARCHAR}, + #{item.lastExecResult,jdbcType=VARCHAR}, #{item.lastExecReportId,jdbcType=VARCHAR}, #{item.executeUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, - #{item.pos,jdbcType=BIGINT}, #{item.environmentId,jdbcType=LONGVARCHAR}) + #{item.pos,jdbcType=BIGINT}, #{item.testPlanCollectionId,jdbcType=VARCHAR}, #{item.environmentId,jdbcType=LONGVARCHAR} + ) @@ -380,9 +383,6 @@ #{item.id,jdbcType=VARCHAR} - - #{item.num,jdbcType=BIGINT} - #{item.testPlanId,jdbcType=VARCHAR} @@ -407,6 +407,9 @@ #{item.pos,jdbcType=BIGINT} + + #{item.testPlanCollectionId,jdbcType=VARCHAR} + #{item.environmentId,jdbcType=LONGVARCHAR} diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiScenarioMapper.java b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiScenarioMapper.java index 928141232f..fc042ddede 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiScenarioMapper.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiScenarioMapper.java @@ -2,9 +2,10 @@ package io.metersphere.plan.mapper; import io.metersphere.plan.domain.TestPlanApiScenario; import io.metersphere.plan.domain.TestPlanApiScenarioExample; -import java.util.List; import org.apache.ibatis.annotations.Param; +import java.util.List; + public interface TestPlanApiScenarioMapper { long countByExample(TestPlanApiScenarioExample example); @@ -16,22 +17,16 @@ public interface TestPlanApiScenarioMapper { int insertSelective(TestPlanApiScenario record); - List selectByExampleWithBLOBs(TestPlanApiScenarioExample example); - List selectByExample(TestPlanApiScenarioExample example); TestPlanApiScenario selectByPrimaryKey(String id); int updateByExampleSelective(@Param("record") TestPlanApiScenario record, @Param("example") TestPlanApiScenarioExample example); - int updateByExampleWithBLOBs(@Param("record") TestPlanApiScenario record, @Param("example") TestPlanApiScenarioExample example); - int updateByExample(@Param("record") TestPlanApiScenario record, @Param("example") TestPlanApiScenarioExample example); int updateByPrimaryKeySelective(TestPlanApiScenario record); - int updateByPrimaryKeyWithBLOBs(TestPlanApiScenario record); - int updateByPrimaryKey(TestPlanApiScenario record); int batchInsert(@Param("list") List list); diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiScenarioMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiScenarioMapper.xml index d0882a63c1..72c4a146d3 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiScenarioMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanApiScenarioMapper.xml @@ -3,18 +3,17 @@ - + + - - - - + + @@ -75,28 +74,9 @@ - id, num, test_plan_id, api_scenario_id, last_exec_result, last_exec_report_id, execute_user, - create_time, create_user, pos + id, test_plan_id, api_scenario_id, environment_id, execute_user, last_exec_result, + last_exec_report_id, create_time, create_user, pos, test_plan_collection_id, grouped - - environment_id - - - select - , - from test_plan_api_scenario where id = #{id,jdbcType=VARCHAR} @@ -130,14 +108,16 @@ - insert into test_plan_api_scenario (id, num, test_plan_id, - api_scenario_id, last_exec_result, last_exec_report_id, - execute_user, create_time, create_user, - pos, environment_id) - values (#{id,jdbcType=VARCHAR}, #{num,jdbcType=BIGINT}, #{testPlanId,jdbcType=VARCHAR}, - #{apiScenarioId,jdbcType=VARCHAR}, #{lastExecResult,jdbcType=VARCHAR}, #{lastExecReportId,jdbcType=VARCHAR}, - #{executeUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, - #{pos,jdbcType=BIGINT}, #{environmentId,jdbcType=LONGVARCHAR}) + insert into test_plan_api_scenario (id, test_plan_id, api_scenario_id, + environment_id, execute_user, last_exec_result, + last_exec_report_id, create_time, create_user, + pos, test_plan_collection_id, grouped + ) + values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{apiScenarioId,jdbcType=VARCHAR}, + #{environmentId,jdbcType=VARCHAR}, #{executeUser,jdbcType=VARCHAR}, #{lastExecResult,jdbcType=VARCHAR}, + #{lastExecReportId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{pos,jdbcType=BIGINT}, #{testPlanCollectionId,jdbcType=VARCHAR}, #{grouped,jdbcType=BIT} + ) insert into test_plan_api_scenario @@ -145,24 +125,24 @@ id, - - num, - test_plan_id, api_scenario_id, + + environment_id, + + + execute_user, + last_exec_result, last_exec_report_id, - - execute_user, - create_time, @@ -172,32 +152,35 @@ pos, - - environment_id, + + test_plan_collection_id, + + + grouped, #{id,jdbcType=VARCHAR}, - - #{num,jdbcType=BIGINT}, - #{testPlanId,jdbcType=VARCHAR}, #{apiScenarioId,jdbcType=VARCHAR}, + + #{environmentId,jdbcType=VARCHAR}, + + + #{executeUser,jdbcType=VARCHAR}, + #{lastExecResult,jdbcType=VARCHAR}, #{lastExecReportId,jdbcType=VARCHAR}, - - #{executeUser,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, @@ -207,8 +190,11 @@ #{pos,jdbcType=BIGINT}, - - #{environmentId,jdbcType=LONGVARCHAR}, + + #{testPlanCollectionId,jdbcType=VARCHAR}, + + + #{grouped,jdbcType=BIT}, @@ -224,24 +210,24 @@ id = #{record.id,jdbcType=VARCHAR}, - - num = #{record.num,jdbcType=BIGINT}, - test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR}, + + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + + + execute_user = #{record.executeUser,jdbcType=VARCHAR}, + last_exec_result = #{record.lastExecResult,jdbcType=VARCHAR}, last_exec_report_id = #{record.lastExecReportId,jdbcType=VARCHAR}, - - execute_user = #{record.executeUser,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, @@ -251,43 +237,31 @@ pos = #{record.pos,jdbcType=BIGINT}, - - environment_id = #{record.environmentId,jdbcType=LONGVARCHAR}, + + test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR}, + + + grouped = #{record.grouped,jdbcType=BIT}, - - update test_plan_api_scenario - set id = #{record.id,jdbcType=VARCHAR}, - num = #{record.num,jdbcType=BIGINT}, - test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, - api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR}, - last_exec_result = #{record.lastExecResult,jdbcType=VARCHAR}, - last_exec_report_id = #{record.lastExecReportId,jdbcType=VARCHAR}, - execute_user = #{record.executeUser,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - create_user = #{record.createUser,jdbcType=VARCHAR}, - pos = #{record.pos,jdbcType=BIGINT}, - environment_id = #{record.environmentId,jdbcType=LONGVARCHAR} - - - - update test_plan_api_scenario set id = #{record.id,jdbcType=VARCHAR}, - num = #{record.num,jdbcType=BIGINT}, test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR}, + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + execute_user = #{record.executeUser,jdbcType=VARCHAR}, last_exec_result = #{record.lastExecResult,jdbcType=VARCHAR}, last_exec_report_id = #{record.lastExecReportId,jdbcType=VARCHAR}, - execute_user = #{record.executeUser,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, create_user = #{record.createUser,jdbcType=VARCHAR}, - pos = #{record.pos,jdbcType=BIGINT} + pos = #{record.pos,jdbcType=BIGINT}, + test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR}, + grouped = #{record.grouped,jdbcType=BIT} @@ -295,24 +269,24 @@ update test_plan_api_scenario - - num = #{num,jdbcType=BIGINT}, - test_plan_id = #{testPlanId,jdbcType=VARCHAR}, api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR}, + + environment_id = #{environmentId,jdbcType=VARCHAR}, + + + execute_user = #{executeUser,jdbcType=VARCHAR}, + last_exec_result = #{lastExecResult,jdbcType=VARCHAR}, last_exec_report_id = #{lastExecReportId,jdbcType=VARCHAR}, - - execute_user = #{executeUser,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, @@ -322,50 +296,42 @@ pos = #{pos,jdbcType=BIGINT}, - - environment_id = #{environmentId,jdbcType=LONGVARCHAR}, + + test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR}, + + + grouped = #{grouped,jdbcType=BIT}, where id = #{id,jdbcType=VARCHAR} - + update test_plan_api_scenario - set num = #{num,jdbcType=BIGINT}, - test_plan_id = #{testPlanId,jdbcType=VARCHAR}, + set test_plan_id = #{testPlanId,jdbcType=VARCHAR}, api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR}, + environment_id = #{environmentId,jdbcType=VARCHAR}, + execute_user = #{executeUser,jdbcType=VARCHAR}, last_exec_result = #{lastExecResult,jdbcType=VARCHAR}, last_exec_report_id = #{lastExecReportId,jdbcType=VARCHAR}, - execute_user = #{executeUser,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, create_user = #{createUser,jdbcType=VARCHAR}, pos = #{pos,jdbcType=BIGINT}, - environment_id = #{environmentId,jdbcType=LONGVARCHAR} - where id = #{id,jdbcType=VARCHAR} - - - update test_plan_api_scenario - set num = #{num,jdbcType=BIGINT}, - test_plan_id = #{testPlanId,jdbcType=VARCHAR}, - api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR}, - last_exec_result = #{lastExecResult,jdbcType=VARCHAR}, - last_exec_report_id = #{lastExecReportId,jdbcType=VARCHAR}, - execute_user = #{executeUser,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - create_user = #{createUser,jdbcType=VARCHAR}, - pos = #{pos,jdbcType=BIGINT} + test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR}, + grouped = #{grouped,jdbcType=BIT} where id = #{id,jdbcType=VARCHAR} insert into test_plan_api_scenario - (id, num, test_plan_id, api_scenario_id, last_exec_result, last_exec_report_id, execute_user, - create_time, create_user, pos, environment_id) + (id, test_plan_id, api_scenario_id, environment_id, execute_user, last_exec_result, + last_exec_report_id, create_time, create_user, pos, test_plan_collection_id, grouped + ) values - (#{item.id,jdbcType=VARCHAR}, #{item.num,jdbcType=BIGINT}, #{item.testPlanId,jdbcType=VARCHAR}, - #{item.apiScenarioId,jdbcType=VARCHAR}, #{item.lastExecResult,jdbcType=VARCHAR}, - #{item.lastExecReportId,jdbcType=VARCHAR}, #{item.executeUser,jdbcType=VARCHAR}, - #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, #{item.pos,jdbcType=BIGINT}, - #{item.environmentId,jdbcType=LONGVARCHAR}) + (#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.apiScenarioId,jdbcType=VARCHAR}, + #{item.environmentId,jdbcType=VARCHAR}, #{item.executeUser,jdbcType=VARCHAR}, #{item.lastExecResult,jdbcType=VARCHAR}, + #{item.lastExecReportId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, + #{item.createUser,jdbcType=VARCHAR}, #{item.pos,jdbcType=BIGINT}, #{item.testPlanCollectionId,jdbcType=VARCHAR}, + #{item.grouped,jdbcType=BIT}) @@ -381,24 +347,24 @@ #{item.id,jdbcType=VARCHAR} - - #{item.num,jdbcType=BIGINT} - #{item.testPlanId,jdbcType=VARCHAR} #{item.apiScenarioId,jdbcType=VARCHAR} + + #{item.environmentId,jdbcType=VARCHAR} + + + #{item.executeUser,jdbcType=VARCHAR} + #{item.lastExecResult,jdbcType=VARCHAR} #{item.lastExecReportId,jdbcType=VARCHAR} - - #{item.executeUser,jdbcType=VARCHAR} - #{item.createTime,jdbcType=BIGINT} @@ -408,8 +374,11 @@ #{item.pos,jdbcType=BIGINT} - - #{item.environmentId,jdbcType=LONGVARCHAR} + + #{item.testPlanCollectionId,jdbcType=VARCHAR} + + + #{item.grouped,jdbcType=BIT} ) diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.java b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.java new file mode 100644 index 0000000000..1c74986109 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.java @@ -0,0 +1,35 @@ +package io.metersphere.plan.mapper; + +import io.metersphere.plan.domain.TestPlanCollection; +import io.metersphere.plan.domain.TestPlanCollectionExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface TestPlanCollectionMapper { + long countByExample(TestPlanCollectionExample example); + + int deleteByExample(TestPlanCollectionExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestPlanCollection record); + + int insertSelective(TestPlanCollection record); + + List selectByExample(TestPlanCollectionExample example); + + TestPlanCollection selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestPlanCollection record, @Param("example") TestPlanCollectionExample example); + + int updateByExample(@Param("record") TestPlanCollection record, @Param("example") TestPlanCollectionExample example); + + int updateByPrimaryKeySelective(TestPlanCollection record); + + int updateByPrimaryKey(TestPlanCollection record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") TestPlanCollection.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.xml new file mode 100644 index 0000000000..474acd8d5a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.xml @@ -0,0 +1,347 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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, test_plan_id, test_collection_type_id, `name`, execute_method, grouped, environment_id, + pos, create_user, create_time + + + + + delete from test_plan_collection + where id = #{id,jdbcType=VARCHAR} + + + delete from test_plan_collection + + + + + + insert into test_plan_collection (id, test_plan_id, test_collection_type_id, + `name`, execute_method, grouped, + environment_id, pos, create_user, + create_time) + values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{testCollectionTypeId,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, #{executeMethod,jdbcType=VARCHAR}, #{grouped,jdbcType=BIT}, + #{environmentId,jdbcType=VARCHAR}, #{pos,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}) + + + insert into test_plan_collection + + + id, + + + test_plan_id, + + + test_collection_type_id, + + + `name`, + + + execute_method, + + + grouped, + + + environment_id, + + + pos, + + + create_user, + + + create_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{testPlanId,jdbcType=VARCHAR}, + + + #{testCollectionTypeId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{executeMethod,jdbcType=VARCHAR}, + + + #{grouped,jdbcType=BIT}, + + + #{environmentId,jdbcType=VARCHAR}, + + + #{pos,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + + + + update test_plan_collection + + + id = #{record.id,jdbcType=VARCHAR}, + + + test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, + + + test_collection_type_id = #{record.testCollectionTypeId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + execute_method = #{record.executeMethod,jdbcType=VARCHAR}, + + + grouped = #{record.grouped,jdbcType=BIT}, + + + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + + + pos = #{record.pos,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + + + + + + update test_plan_collection + set id = #{record.id,jdbcType=VARCHAR}, + test_plan_id = #{record.testPlanId,jdbcType=VARCHAR}, + test_collection_type_id = #{record.testCollectionTypeId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + execute_method = #{record.executeMethod,jdbcType=VARCHAR}, + grouped = #{record.grouped,jdbcType=BIT}, + environment_id = #{record.environmentId,jdbcType=VARCHAR}, + pos = #{record.pos,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT} + + + + + + update test_plan_collection + + + test_plan_id = #{testPlanId,jdbcType=VARCHAR}, + + + test_collection_type_id = #{testCollectionTypeId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + execute_method = #{executeMethod,jdbcType=VARCHAR}, + + + grouped = #{grouped,jdbcType=BIT}, + + + environment_id = #{environmentId,jdbcType=VARCHAR}, + + + pos = #{pos,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_plan_collection + set test_plan_id = #{testPlanId,jdbcType=VARCHAR}, + test_collection_type_id = #{testCollectionTypeId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + execute_method = #{executeMethod,jdbcType=VARCHAR}, + grouped = #{grouped,jdbcType=BIT}, + environment_id = #{environmentId,jdbcType=VARCHAR}, + pos = #{pos,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + + insert into test_plan_collection + (id, test_plan_id, test_collection_type_id, `name`, execute_method, grouped, environment_id, + pos, create_user, create_time) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.testCollectionTypeId,jdbcType=VARCHAR}, + #{item.name,jdbcType=VARCHAR}, #{item.executeMethod,jdbcType=VARCHAR}, #{item.grouped,jdbcType=BIT}, + #{item.environmentId,jdbcType=VARCHAR}, #{item.pos,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, + #{item.createTime,jdbcType=BIGINT}) + + + + insert into test_plan_collection ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.testPlanId,jdbcType=VARCHAR} + + + #{item.testCollectionTypeId,jdbcType=VARCHAR} + + + #{item.name,jdbcType=VARCHAR} + + + #{item.executeMethod,jdbcType=VARCHAR} + + + #{item.grouped,jdbcType=BIT} + + + #{item.environmentId,jdbcType=VARCHAR} + + + #{item.pos,jdbcType=BIGINT} + + + #{item.createUser,jdbcType=VARCHAR} + + + #{item.createTime,jdbcType=BIGINT} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanConfigMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanConfigMapper.xml index 02c2316dfc..857fed0a40 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanConfigMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanConfigMapper.xml @@ -5,7 +5,6 @@ - @@ -67,7 +66,7 @@ - test_plan_id, automatic_status_update, repeat_case, test_planning, pass_threshold + test_plan_id, automatic_status_update, repeat_case, pass_threshold select @@ -129,10 +127,10 @@ insert into test_plan_report_summary (id, functional_case_count, api_case_count, api_scenario_count, bug_count, test_plan_report_id, - summary, report_count) + summary) values (#{id,jdbcType=VARCHAR}, #{functionalCaseCount,jdbcType=BIGINT}, #{apiCaseCount,jdbcType=BIGINT}, #{apiScenarioCount,jdbcType=BIGINT}, #{bugCount,jdbcType=BIGINT}, #{testPlanReportId,jdbcType=VARCHAR}, - #{summary,jdbcType=VARCHAR}, #{reportCount,jdbcType=LONGVARBINARY}) + #{summary,jdbcType=LONGVARCHAR}) insert into test_plan_report_summary @@ -158,9 +156,6 @@ summary, - - report_count, - @@ -182,10 +177,7 @@ #{testPlanReportId,jdbcType=VARCHAR}, - #{summary,jdbcType=VARCHAR}, - - - #{reportCount,jdbcType=LONGVARBINARY}, + #{summary,jdbcType=LONGVARCHAR}, @@ -217,10 +209,7 @@ test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR}, - summary = #{record.summary,jdbcType=VARCHAR}, - - - report_count = #{record.reportCount,jdbcType=LONGVARBINARY}, + summary = #{record.summary,jdbcType=LONGVARCHAR}, @@ -235,8 +224,7 @@ api_scenario_count = #{record.apiScenarioCount,jdbcType=BIGINT}, bug_count = #{record.bugCount,jdbcType=BIGINT}, test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR}, - summary = #{record.summary,jdbcType=VARCHAR}, - report_count = #{record.reportCount,jdbcType=LONGVARBINARY} + summary = #{record.summary,jdbcType=LONGVARCHAR} @@ -248,8 +236,7 @@ api_case_count = #{record.apiCaseCount,jdbcType=BIGINT}, api_scenario_count = #{record.apiScenarioCount,jdbcType=BIGINT}, bug_count = #{record.bugCount,jdbcType=BIGINT}, - test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR}, - summary = #{record.summary,jdbcType=VARCHAR} + test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR} @@ -273,10 +260,7 @@ test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR}, - summary = #{summary,jdbcType=VARCHAR}, - - - report_count = #{reportCount,jdbcType=LONGVARBINARY}, + summary = #{summary,jdbcType=LONGVARCHAR}, where id = #{id,jdbcType=VARCHAR} @@ -288,8 +272,7 @@ api_scenario_count = #{apiScenarioCount,jdbcType=BIGINT}, bug_count = #{bugCount,jdbcType=BIGINT}, test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR}, - summary = #{summary,jdbcType=VARCHAR}, - report_count = #{reportCount,jdbcType=LONGVARBINARY} + summary = #{summary,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} @@ -298,19 +281,18 @@ api_case_count = #{apiCaseCount,jdbcType=BIGINT}, api_scenario_count = #{apiScenarioCount,jdbcType=BIGINT}, bug_count = #{bugCount,jdbcType=BIGINT}, - test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR}, - summary = #{summary,jdbcType=VARCHAR} + test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} insert into test_plan_report_summary (id, functional_case_count, api_case_count, api_scenario_count, bug_count, test_plan_report_id, - summary, report_count) + summary) values (#{item.id,jdbcType=VARCHAR}, #{item.functionalCaseCount,jdbcType=BIGINT}, #{item.apiCaseCount,jdbcType=BIGINT}, #{item.apiScenarioCount,jdbcType=BIGINT}, #{item.bugCount,jdbcType=BIGINT}, #{item.testPlanReportId,jdbcType=VARCHAR}, - #{item.summary,jdbcType=VARCHAR}, #{item.reportCount,jdbcType=LONGVARBINARY}) + #{item.summary,jdbcType=LONGVARCHAR}) @@ -342,10 +324,7 @@ #{item.testPlanReportId,jdbcType=VARCHAR} - #{item.summary,jdbcType=VARCHAR} - - - #{item.reportCount,jdbcType=LONGVARBINARY} + #{item.summary,jdbcType=LONGVARCHAR} ) diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_13__ga_ddl.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_13__ga_ddl.sql index 1365124c97..a24eef0e72 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_13__ga_ddl.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_13__ga_ddl.sql @@ -11,6 +11,73 @@ CREATE TABLE IF NOT EXISTS platform_source( DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '平台对接保存参数'; +-- 修改计划配置表 +ALTER TABLE test_plan_config DROP `test_planning`; + +-- 修改计划报告详情表字段 +ALTER TABLE test_plan_report_summary MODIFY `bug_count` BIGINT NOT NULL DEFAULT 0 COMMENT '缺陷数量'; +ALTER TABLE test_plan_report_summary DROP `report_count`; + +-- 修改计划报告功能用例表字段 +ALTER TABLE test_plan_report_function_case MODIFY `function_case_bug_count` BIGINT NOT NULL DEFAULT 0 COMMENT '功能用例关联缺陷数'; + +-- 修改计划报告缺陷表字段 +ALTER TABLE test_plan_report_bug MODIFY `bug_case_count` BIGINT NOT NULL DEFAULT 0 COMMENT '缺陷用例数'; + +-- 修改测试计划关联接口表字段 +ALTER TABLE test_plan_api_case DROP COLUMN num; +ALTER TABLE test_plan_api_case ADD COLUMN test_plan_collection_id VARCHAR(50) NOT NULL COMMENT '测试计划集id'; +CREATE INDEX idx_test_plan_collection_id ON test_plan_api_case(test_plan_collection_id); +CREATE INDEX idx_pos ON test_plan_api_case(pos); + +-- 修改测试计划关联场景表字段 +ALTER TABLE test_plan_api_scenario DROP COLUMN num; +ALTER TABLE test_plan_api_scenario ADD COLUMN test_plan_collection_id VARCHAR(50) NOT NULL COMMENT '测试计划集id'; +ALTER TABLE test_plan_api_scenario ADD COLUMN grouped BIT DEFAULT 0 COMMENT '是否为环境组'; +ALTER TABLE test_plan_api_scenario MODIFY COLUMN `environment_id` VARCHAR(50) COMMENT '所属环境或环境组id'; +CREATE INDEX idx_test_plan_collection_id ON test_plan_api_scenario(test_plan_collection_id); +CREATE INDEX idx_pos ON test_plan_api_scenario(pos); + +-- 修改测试规划配置表 +ALTER TABLE test_plan_allocation DROP `run_mode_config`; +ALTER TABLE test_plan_allocation ADD `test_resource_pool_id` VARCHAR(50) NOT NULL COMMENT '资源池ID'; +ALTER TABLE test_plan_allocation ADD `retry_on_fail` BIT NOT NULL DEFAULT 0 COMMENT '是否失败重试' ; +ALTER TABLE test_plan_allocation ADD `retry_type` VARCHAR(50) NOT NULL COMMENT '失败重试类型(步骤/场景)' ; +ALTER TABLE test_plan_allocation ADD `retry_times` INT NOT NULL DEFAULT 1 COMMENT '失败重试次数' ; +ALTER TABLE test_plan_allocation ADD `retry_interval` INT NOT NULL DEFAULT 1000 COMMENT '失败重试间隔(单位: ms)' ; +ALTER TABLE test_plan_allocation ADD `stop_on_fail` BIT NOT NULL DEFAULT 0 COMMENT '是否失败停止' ; +CREATE INDEX idx_resource_pool_id ON test_plan_allocation(test_resource_pool_id); + +-- 测试规划集类型 +CREATE TABLE IF NOT EXISTS test_plan_allocation_type( + `id` VARCHAR(50) NOT NULL COMMENT 'ID' , + `test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' , + `name` VARCHAR(255) NOT NULL COMMENT '测试集类型名称' , + `type` VARCHAR(50) NOT NULL COMMENT '测试集类型(功能/接口/场景)' , + `execute_method` VARCHAR(50) NOT NULL COMMENT '执行方式(串行/并行)' , + `pos` BIGINT NOT NULL COMMENT '自定义排序,间隔为2的N次幂' , + PRIMARY KEY (id) +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试集类型'; +CREATE INDEX idx_test_plan_id ON test_plan_allocation_type(test_plan_id); + +-- 测试集 +CREATE TABLE IF NOT EXISTS test_plan_collection( + `id` VARCHAR(50) NOT NULL COMMENT 'ID' , + `test_plan_id` VARCHAR(50) NOT NULL COMMENT '测试计划ID' , + `test_collection_type_id` VARCHAR(50) NOT NULL COMMENT '所属测试集类型ID' , + `name` VARCHAR(255) NOT NULL COMMENT '测试集名称' , + `execute_method` VARCHAR(50) NOT NULL COMMENT '执行方式(串行/并行)' , + `grouped` BIT NOT NULL DEFAULT 0 COMMENT '是否使用环境组' , + `environment_id` VARCHAR(50) NOT NULL COMMENT '环境ID/环境组ID' , + `pos` BIGINT NOT NULL COMMENT '自定义排序,间隔为2的N次幂' , + `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_test_plan_id ON test_plan_collection(test_plan_id); +CREATE INDEX idx_collection_type_id ON test_plan_collection(test_collection_type_id); +CREATE INDEX idx_env_id ON test_plan_collection(environment_id); +CREATE INDEX idx_create_user ON test_plan_collection(create_user); -- set innodb lock wait timeout to default SET SESSION innodb_lock_wait_timeout = DEFAULT; diff --git a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/FunctionalCaseControllerTests.java b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/FunctionalCaseControllerTests.java index b104f3890a..e6c6914897 100644 --- a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/FunctionalCaseControllerTests.java +++ b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/FunctionalCaseControllerTests.java @@ -506,7 +506,6 @@ public class FunctionalCaseControllerTests extends BaseTest { testPlanConfig.setTestPlanId(IDGenerator.nextStr()); testPlanConfig.setRepeatCase(false); testPlanConfig.setAutomaticStatusUpdate(false); - testPlanConfig.setTestPlanning(false); testPlanConfig.setPassThreshold(100.00); request.setTestPlanId(testPlanConfig.getTestPlanId()); diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanBatchCopyService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanBatchCopyService.java index 4e196d6502..11b7762c21 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanBatchCopyService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanBatchCopyService.java @@ -64,7 +64,7 @@ public class TestPlanBatchCopyService { //测试规划配置信息 TestPlanAllocationExample allocationExample = new TestPlanAllocationExample(); allocationExample.createCriteria().andTestPlanIdIn(ids); - List testPlanAllocations = testPlanAllocationMapper.selectByExampleWithBLOBs(allocationExample); + List testPlanAllocations = testPlanAllocationMapper.selectByExample(allocationExample); batchInsertPlan(testPlans, testPlanConfigs, testPlanAllocations, request, userId); } } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java index 62ce69133b..0c206e9c02 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -125,7 +125,6 @@ public class TestPlanService extends TestPlanBaseUtilsService { testPlanConfig.setAutomaticStatusUpdate(createOrCopyRequest.isAutomaticStatusUpdate()); testPlanConfig.setRepeatCase(createOrCopyRequest.isRepeatCase()); testPlanConfig.setPassThreshold(createOrCopyRequest.getPassThreshold()); - testPlanConfig.setTestPlanning(createOrCopyRequest.isTestPlanning()); if (StringUtils.isBlank(id)) { handleAssociateCase(createOrCopyRequest.getBaseAssociateCaseRequest(), operator, createTestPlan); @@ -317,7 +316,6 @@ public class TestPlanService extends TestPlanBaseUtilsService { testPlanConfig.setAutomaticStatusUpdate(request.getAutomaticStatusUpdate()); testPlanConfig.setRepeatCase(request.getRepeatCase()); testPlanConfig.setPassThreshold(request.getPassThreshold()); - testPlanConfig.setTestPlanning(request.getTestPlanning()); testPlanConfigMapper.updateByPrimaryKeySelective(testPlanConfig); } testPlanLogService.saveUpdateLog(testPlan, testPlanMapper.selectByPrimaryKey(request.getId()), testPlan.getProjectId(), userId, requestUrl, requestMethod); @@ -505,7 +503,6 @@ public class TestPlanService extends TestPlanBaseUtilsService { response.setAutomaticStatusUpdate(testPlanConfig.getAutomaticStatusUpdate()); response.setRepeatCase(testPlanConfig.getRepeatCase()); response.setPassThreshold(testPlanConfig.getPassThreshold()); - response.setTestPlanning(testPlanConfig.getTestPlanning()); } private void getGroupName(TestPlanDetailResponse response, TestPlan testPlan) { diff --git a/backend/services/test-plan/src/test/resources/dml/init_test_plan_association.sql b/backend/services/test-plan/src/test/resources/dml/init_test_plan_association.sql index ec0842125e..00ead3c752 100644 --- a/backend/services/test-plan/src/test/resources/dml/init_test_plan_association.sql +++ b/backend/services/test-plan/src/test/resources/dml/init_test_plan_association.sql @@ -4,10 +4,10 @@ VALUES ('wxx_2', 10000, '123', 'NONE', '1', 'eeew', 'PREPARED', 'TEST_PLAN', NULL, 1714980158000, 'WX', 1714980158000, 'WX', 1714980158000, 1714980158000, 1714980158000, 1714980158000, '11'); -INSERT INTO `test_plan_config`(`test_plan_id`, `automatic_status_update`, `repeat_case`, `pass_threshold`, `test_planning`) +INSERT INTO `test_plan_config`(`test_plan_id`, `automatic_status_update`, `repeat_case`, `pass_threshold`) VALUES - ('wxx_1', b'0', b'0', 100, b'0'), - ('wxx_2', b'0', b'0', 100, b'0'); + ('wxx_1', b'0', b'0', 100), + ('wxx_2', b'0', b'0', 100); INSERT INTO `test_plan_functional_case`(`id`, `test_plan_id`, `functional_case_id`, `create_time`, `create_user`, `execute_user`, `last_exec_time`, `last_exec_result`, `pos`) VALUES ('wxx_tpfc_1', 'wxx_1', 'wxx_test_1', 1714980158000, 'admin', NULL, NULL, NULL, 1); diff --git a/backend/services/test-plan/src/test/resources/dml/init_test_plan_report_gen.sql b/backend/services/test-plan/src/test/resources/dml/init_test_plan_report_gen.sql index 9c904ab3ff..6ccaa0bc28 100644 --- a/backend/services/test-plan/src/test/resources/dml/init_test_plan_report_gen.sql +++ b/backend/services/test-plan/src/test/resources/dml/init_test_plan_report_gen.sql @@ -2,9 +2,9 @@ INSERT INTO `test_plan`(`id`, `num`, `project_id`, `group_id`, `module_id`, `name`, `status`, `type`, `tags`, `create_time`, `create_user`, `update_time`, `update_user`, `planned_start_time`, `planned_end_time`, `actual_start_time`, `actual_end_time`, `description`) VALUES ('plan_id_for_gen_report', 100001, '100001100001', 'NONE', '1', 'gen-report-plan', 'PREPARED', 'TEST_PLAN', NULL, CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '11'), ('plan_id_for_gen_report_1', 100001, '100001100001', 'NONE', '1', 'gen-report-plan-1', 'PREPARED', 'TEST_PLAN', NULL, CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '11'); -INSERT INTO `test_plan_config`(`test_plan_id`, `automatic_status_update`, `repeat_case`, `pass_threshold`, `test_planning`) VALUES -('plan_id_for_gen_report', b'0', b'0', 100.00, b'0'), -('plan_id_for_gen_report_1', b'0', b'0', 0.00, b'0'); +INSERT INTO `test_plan_config`(`test_plan_id`, `automatic_status_update`, `repeat_case`, `pass_threshold`) VALUES +('plan_id_for_gen_report', b'0', b'0', 100.00), +('plan_id_for_gen_report_1', b'0', b'0', 0.00); -- 计划关联用例执行的测试数据 INSERT INTO `test_plan_functional_case` (`id`, `test_plan_id`, `functional_case_id`, `create_time`, `create_user`, `execute_user`, `last_exec_time`, `last_exec_result`, `pos`) VALUES diff --git a/backend/services/test-plan/src/test/resources/dml/init_test_plan_test.sql b/backend/services/test-plan/src/test/resources/dml/init_test_plan_test.sql index 7ae0336264..c05999f5b4 100644 --- a/backend/services/test-plan/src/test/resources/dml/init_test_plan_test.sql +++ b/backend/services/test-plan/src/test/resources/dml/init_test_plan_test.sql @@ -30,11 +30,11 @@ VALUES ('1', '123', 'wx_测试模块名称', 'ROOT', 1, 1714980158000, 1714980158000, 'admin', 'admin'); -INSERT INTO `test_plan_config`(`test_plan_id`, `automatic_status_update`, `repeat_case`, `pass_threshold`, `test_planning`) +INSERT INTO `test_plan_config`(`test_plan_id`, `automatic_status_update`, `repeat_case`, `pass_threshold`) VALUES - ('wx_test_plan_id_1', b'0', b'0', 100, b'0'), - ('wx_test_plan_id_4', b'0', b'0', 100, b'0'), - ('wx_test_plan_id_7', b'0', b'0', 100, b'0'); + ('wx_test_plan_id_1', b'0', b'0', 100), + ('wx_test_plan_id_4', b'0', b'0', 100), + ('wx_test_plan_id_7', b'0', b'0', 100); INSERT INTO project (id, num, organization_id, name, description, create_user, update_user, create_time, update_time, module_setting) @@ -42,9 +42,8 @@ VALUES ('123', 2, 1, 'wx', 'wx', 'admin', 'admin', unix_timestamp() * 1000, unix_timestamp() * 1000,'["bugManagement","caseManagement","apiTest","testPlan"]'); -INSERT INTO `test_plan_allocation`(`id`, `test_plan_id`, `run_mode_config`) -VALUES - ('1', 'wx_test_plan_id_1', '111'); +INSERT INTO `test_plan_allocation`(`id`, `test_plan_id`, `test_resource_pool_id`, `retry_on_fail`, `retry_type`, `retry_times`, `retry_interval`, `stop_on_fail`) +VALUES ('1', 'wx_test_plan_id_1', '111', b'0', 'scenario', '10', '1000', b'0'); INSERT INTO functional_case(id, num, module_id, project_id, template_id, name, review_status, tags, case_edit_type, pos, version_id, ref_id, last_execute_result, deleted, public_case, latest, create_user, update_user, delete_user, create_time, update_time, delete_time)