feat(测试计划): 新增测试集相关的flyway及domain

This commit is contained in:
song-cc-rock 2024-05-31 14:58:06 +08:00 committed by Craftsman
parent 81ae84ad1c
commit 896520a8be
32 changed files with 3592 additions and 681 deletions

View File

@ -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 = "`";

View File

@ -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<String> values) {
addCriterion("test_resource_pool_id in", values, "testResourcePoolId");
return (Criteria) this;
}
public Criteria andTestResourcePoolIdNotIn(List<String> 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<Boolean> values) {
addCriterion("retry_on_fail in", values, "retryOnFail");
return (Criteria) this;
}
public Criteria andRetryOnFailNotIn(List<Boolean> 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<String> values) {
addCriterion("retry_type in", values, "retryType");
return (Criteria) this;
}
public Criteria andRetryTypeNotIn(List<String> 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<Integer> values) {
addCriterion("retry_times in", values, "retryTimes");
return (Criteria) this;
}
public Criteria andRetryTimesNotIn(List<Integer> 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<Integer> values) {
addCriterion("retry_interval in", values, "retryInterval");
return (Criteria) this;
}
public Criteria andRetryIntervalNotIn(List<Integer> 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<Boolean> values) {
addCriterion("stop_on_fail in", values, "stopOnFail");
return (Criteria) this;
}
public Criteria andStopOnFailNotIn(List<Boolean> 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 {

View File

@ -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<Column> 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();
}
}
}

View File

@ -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<Criteria> oredCriteria;
public TestPlanAllocationTypeExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> 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<String> values) {
addCriterion("test_plan_id in", values, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdNotIn(List<String> 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<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> 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<String> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<String> 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<String> values) {
addCriterion("execute_method in", values, "executeMethod");
return (Criteria) this;
}
public Criteria andExecuteMethodNotIn(List<String> 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<Long> values) {
addCriterion("pos in", values, "pos");
return (Criteria) this;
}
public Criteria andPosNotIn(List<Long> 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);
}
}
}

View File

@ -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 = "`";

View File

@ -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<Long> values) {
addCriterion("num in", values, "num");
return (Criteria) this;
}
public Criteria andNumNotIn(List<Long> 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<String> values) {
addCriterion("test_plan_collection_id in", values, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotIn(List<String> 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 {

View File

@ -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 = "`";

View File

@ -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<Long> values) {
addCriterion("num in", values, "num");
return (Criteria) this;
}
public Criteria andNumNotIn(List<Long> 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<String> values) {
addCriterion("environment_id in", values, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotIn(List<String> 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<String> values) {
addCriterion("execute_user in", values, "executeUser");
return (Criteria) this;
}
public Criteria andExecuteUserNotIn(List<String> 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<String> values) {
addCriterion("execute_user in", values, "executeUser");
return (Criteria) this;
}
public Criteria andExecuteUserNotIn(List<String> 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<String> values) {
addCriterion("test_plan_collection_id in", values, "testPlanCollectionId");
return (Criteria) this;
}
public Criteria andTestPlanCollectionIdNotIn(List<String> 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<Boolean> values) {
addCriterion("grouped in", values, "grouped");
return (Criteria) this;
}
public Criteria andGroupedNotIn(List<Boolean> 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 {

View File

@ -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<Column> 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();
}
}
}

View File

@ -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<Criteria> oredCriteria;
public TestPlanCollectionExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> 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<String> values) {
addCriterion("test_plan_id in", values, "testPlanId");
return (Criteria) this;
}
public Criteria andTestPlanIdNotIn(List<String> 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<String> values) {
addCriterion("test_collection_type_id in", values, "testCollectionTypeId");
return (Criteria) this;
}
public Criteria andTestCollectionTypeIdNotIn(List<String> 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<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> 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<String> values) {
addCriterion("execute_method in", values, "executeMethod");
return (Criteria) this;
}
public Criteria andExecuteMethodNotIn(List<String> 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<Boolean> values) {
addCriterion("grouped in", values, "grouped");
return (Criteria) this;
}
public Criteria andGroupedNotIn(List<Boolean> 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<String> values) {
addCriterion("environment_id in", values, "environmentId");
return (Criteria) this;
}
public Criteria andEnvironmentIdNotIn(List<String> 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<Long> values) {
addCriterion("pos in", values, "pos");
return (Criteria) this;
}
public Criteria andPosNotIn(List<Long> 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<String> values) {
addCriterion("create_user in", values, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotIn(List<String> 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<Long> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Long> 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);
}
}
}

View File

@ -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 = "`";

View File

@ -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<Boolean> values) {
addCriterion("test_planning in", values, "testPlanning");
return (Criteria) this;
}
public Criteria andTestPlanningNotIn(List<Boolean> 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<Long> values) {
public Criteria andPassThresholdIn(List<BigDecimal> values) {
addCriterion("pass_threshold in", values, "passThreshold");
return (Criteria) this;
}
public Criteria andPassThresholdNotIn(List<Long> values) {
public Criteria andPassThresholdNotIn(List<BigDecimal> 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;
}

View File

@ -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 = "`";

View File

@ -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<String> values) {
addCriterion("summary in", values, "summary");
return (Criteria) this;
}
public Criteria andSummaryNotIn(List<String> 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 {

View File

@ -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<TestPlanAllocation> selectByExampleWithBLOBs(TestPlanAllocationExample example);
List<TestPlanAllocation> 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<TestPlanAllocation> list);

View File

@ -4,9 +4,12 @@
<resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanAllocation">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="test_plan_id" jdbcType="VARCHAR" property="testPlanId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.plan.domain.TestPlanAllocation">
<result column="run_mode_config" jdbcType="LONGVARBINARY" property="runModeConfig" />
<result column="test_resource_pool_id" jdbcType="VARCHAR" property="testResourcePoolId" />
<result column="retry_on_fail" jdbcType="BIT" property="retryOnFail" />
<result column="retry_type" jdbcType="VARCHAR" property="retryType" />
<result column="retry_times" jdbcType="INTEGER" property="retryTimes" />
<result column="retry_interval" jdbcType="INTEGER" property="retryInterval" />
<result column="stop_on_fail" jdbcType="BIT" property="stopOnFail" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -67,27 +70,9 @@
</where>
</sql>
<sql id="Base_Column_List">
id, test_plan_id
id, test_plan_id, test_resource_pool_id, retry_on_fail, retry_type, retry_times,
retry_interval, stop_on_fail
</sql>
<sql id="Blob_Column_List">
run_mode_config
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.plan.domain.TestPlanAllocationExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from test_plan_allocation
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanAllocationExample" resultMap="BaseResultMap">
select
<if test="distinct">
@ -102,11 +87,9 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from test_plan_allocation
where id = #{id,jdbcType=VARCHAR}
</select>
@ -121,10 +104,12 @@
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanAllocation">
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>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanAllocation">
insert into test_plan_allocation
@ -135,8 +120,23 @@
<if test="testPlanId != null">
test_plan_id,
</if>
<if test="runModeConfig != null">
run_mode_config,
<if test="testResourcePoolId != null">
test_resource_pool_id,
</if>
<if test="retryOnFail != null">
retry_on_fail,
</if>
<if test="retryType != null">
retry_type,
</if>
<if test="retryTimes != null">
retry_times,
</if>
<if test="retryInterval != null">
retry_interval,
</if>
<if test="stopOnFail != null">
stop_on_fail,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -146,8 +146,23 @@
<if test="testPlanId != null">
#{testPlanId,jdbcType=VARCHAR},
</if>
<if test="runModeConfig != null">
#{runModeConfig,jdbcType=LONGVARBINARY},
<if test="testResourcePoolId != null">
#{testResourcePoolId,jdbcType=VARCHAR},
</if>
<if test="retryOnFail != null">
#{retryOnFail,jdbcType=BIT},
</if>
<if test="retryType != null">
#{retryType,jdbcType=VARCHAR},
</if>
<if test="retryTimes != null">
#{retryTimes,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
#{retryInterval,jdbcType=INTEGER},
</if>
<if test="stopOnFail != null">
#{stopOnFail,jdbcType=BIT},
</if>
</trim>
</insert>
@ -166,27 +181,39 @@
<if test="record.testPlanId != null">
test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
</if>
<if test="record.runModeConfig != null">
run_mode_config = #{record.runModeConfig,jdbcType=LONGVARBINARY},
<if test="record.testResourcePoolId != null">
test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR},
</if>
<if test="record.retryOnFail != null">
retry_on_fail = #{record.retryOnFail,jdbcType=BIT},
</if>
<if test="record.retryType != null">
retry_type = #{record.retryType,jdbcType=VARCHAR},
</if>
<if test="record.retryTimes != null">
retry_times = #{record.retryTimes,jdbcType=INTEGER},
</if>
<if test="record.retryInterval != null">
retry_interval = #{record.retryInterval,jdbcType=INTEGER},
</if>
<if test="record.stopOnFail != null">
stop_on_fail = #{record.stopOnFail,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update test_plan_allocation
set id = #{record.id,jdbcType=VARCHAR},
test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
run_mode_config = #{record.runModeConfig,jdbcType=LONGVARBINARY}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -197,30 +224,47 @@
<if test="testPlanId != null">
test_plan_id = #{testPlanId,jdbcType=VARCHAR},
</if>
<if test="runModeConfig != null">
run_mode_config = #{runModeConfig,jdbcType=LONGVARBINARY},
<if test="testResourcePoolId != null">
test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR},
</if>
<if test="retryOnFail != null">
retry_on_fail = #{retryOnFail,jdbcType=BIT},
</if>
<if test="retryType != null">
retry_type = #{retryType,jdbcType=VARCHAR},
</if>
<if test="retryTimes != null">
retry_times = #{retryTimes,jdbcType=INTEGER},
</if>
<if test="retryInterval != null">
retry_interval = #{retryInterval,jdbcType=INTEGER},
</if>
<if test="stopOnFail != null">
stop_on_fail = #{stopOnFail,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.plan.domain.TestPlanAllocation">
update test_plan_allocation
set test_plan_id = #{testPlanId,jdbcType=VARCHAR},
run_mode_config = #{runModeConfig,jdbcType=LONGVARBINARY}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanAllocation">
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}
</update>
<insert id="batchInsert" parameterType="map">
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
<foreach collection="list" item="item" separator=",">
(#{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})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
@ -239,8 +283,23 @@
<if test="'test_plan_id'.toString() == column.value">
#{item.testPlanId,jdbcType=VARCHAR}
</if>
<if test="'run_mode_config'.toString() == column.value">
#{item.runModeConfig,jdbcType=LONGVARBINARY}
<if test="'test_resource_pool_id'.toString() == column.value">
#{item.testResourcePoolId,jdbcType=VARCHAR}
</if>
<if test="'retry_on_fail'.toString() == column.value">
#{item.retryOnFail,jdbcType=BIT}
</if>
<if test="'retry_type'.toString() == column.value">
#{item.retryType,jdbcType=VARCHAR}
</if>
<if test="'retry_times'.toString() == column.value">
#{item.retryTimes,jdbcType=INTEGER}
</if>
<if test="'retry_interval'.toString() == column.value">
#{item.retryInterval,jdbcType=INTEGER}
</if>
<if test="'stop_on_fail'.toString() == column.value">
#{item.stopOnFail,jdbcType=BIT}
</if>
</foreach>
)

View File

@ -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<TestPlanAllocationType> 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<TestPlanAllocationType> list);
int batchInsertSelective(@Param("list") List<TestPlanAllocationType> list, @Param("selective") TestPlanAllocationType.Column ... selective);
}

View File

@ -0,0 +1,270 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.plan.mapper.TestPlanAllocationTypeMapper">
<resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanAllocationType">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="test_plan_id" jdbcType="VARCHAR" property="testPlanId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="execute_method" jdbcType="VARCHAR" property="executeMethod" />
<result column="pos" jdbcType="BIGINT" property="pos" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, test_plan_id, `name`, `type`, execute_method, pos
</sql>
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanAllocationTypeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from test_plan_allocation_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from test_plan_allocation_type
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from test_plan_allocation_type
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.plan.domain.TestPlanAllocationTypeExample">
delete from test_plan_allocation_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanAllocationType">
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>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanAllocationType">
insert into test_plan_allocation_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="testPlanId != null">
test_plan_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="type != null">
`type`,
</if>
<if test="executeMethod != null">
execute_method,
</if>
<if test="pos != null">
pos,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="testPlanId != null">
#{testPlanId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="executeMethod != null">
#{executeMethod,jdbcType=VARCHAR},
</if>
<if test="pos != null">
#{pos,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanAllocationTypeExample" resultType="java.lang.Long">
select count(*) from test_plan_allocation_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_plan_allocation_type
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.testPlanId != null">
test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.executeMethod != null">
execute_method = #{record.executeMethod,jdbcType=VARCHAR},
</if>
<if test="record.pos != null">
pos = #{record.pos,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.plan.domain.TestPlanAllocationType">
update test_plan_allocation_type
<set>
<if test="testPlanId != null">
test_plan_id = #{testPlanId,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=VARCHAR},
</if>
<if test="executeMethod != null">
execute_method = #{executeMethod,jdbcType=VARCHAR},
</if>
<if test="pos != null">
pos = #{pos,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanAllocationType">
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}
</update>
<insert id="batchInsert" parameterType="map">
insert into test_plan_allocation_type
(id, test_plan_id, `name`, `type`, execute_method, pos)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR},
#{item.type,jdbcType=VARCHAR}, #{item.executeMethod,jdbcType=VARCHAR}, #{item.pos,jdbcType=BIGINT}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
insert into test_plan_allocation_type (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=VARCHAR}
</if>
<if test="'test_plan_id'.toString() == column.value">
#{item.testPlanId,jdbcType=VARCHAR}
</if>
<if test="'name'.toString() == column.value">
#{item.name,jdbcType=VARCHAR}
</if>
<if test="'type'.toString() == column.value">
#{item.type,jdbcType=VARCHAR}
</if>
<if test="'execute_method'.toString() == column.value">
#{item.executeMethod,jdbcType=VARCHAR}
</if>
<if test="'pos'.toString() == column.value">
#{item.pos,jdbcType=BIGINT}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

View File

@ -3,7 +3,6 @@
<mapper namespace="io.metersphere.plan.mapper.TestPlanApiCaseMapper">
<resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanApiCase">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="num" jdbcType="BIGINT" property="num" />
<result column="test_plan_id" jdbcType="VARCHAR" property="testPlanId" />
<result column="api_case_id" jdbcType="VARCHAR" property="apiCaseId" />
<result column="last_exec_result" jdbcType="VARCHAR" property="lastExecResult" />
@ -12,6 +11,7 @@
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="pos" jdbcType="BIGINT" property="pos" />
<result column="test_plan_collection_id" jdbcType="VARCHAR" property="testPlanCollectionId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.plan.domain.TestPlanApiCase">
<result column="environment_id" jdbcType="LONGVARCHAR" property="environmentId" />
@ -75,8 +75,8 @@
</where>
</sql>
<sql id="Base_Column_List">
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
</sql>
<sql id="Blob_Column_List">
environment_id
@ -130,14 +130,16 @@
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanApiCase">
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>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanApiCase">
insert into test_plan_api_case
@ -145,9 +147,6 @@
<if test="id != null">
id,
</if>
<if test="num != null">
num,
</if>
<if test="testPlanId != null">
test_plan_id,
</if>
@ -172,6 +171,9 @@
<if test="pos != null">
pos,
</if>
<if test="testPlanCollectionId != null">
test_plan_collection_id,
</if>
<if test="environmentId != null">
environment_id,
</if>
@ -180,9 +182,6 @@
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="num != null">
#{num,jdbcType=BIGINT},
</if>
<if test="testPlanId != null">
#{testPlanId,jdbcType=VARCHAR},
</if>
@ -207,6 +206,9 @@
<if test="pos != null">
#{pos,jdbcType=BIGINT},
</if>
<if test="testPlanCollectionId != null">
#{testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="environmentId != null">
#{environmentId,jdbcType=LONGVARCHAR},
</if>
@ -224,9 +226,6 @@
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.num != null">
num = #{record.num,jdbcType=BIGINT},
</if>
<if test="record.testPlanId != null">
test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
</if>
@ -251,6 +250,9 @@
<if test="record.pos != null">
pos = #{record.pos,jdbcType=BIGINT},
</if>
<if test="record.testPlanCollectionId != null">
test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="record.environmentId != null">
environment_id = #{record.environmentId,jdbcType=LONGVARCHAR},
</if>
@ -262,7 +264,6 @@
<update id="updateByExampleWithBLOBs" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -279,7 +281,6 @@
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -295,9 +297,6 @@
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.plan.domain.TestPlanApiCase">
update test_plan_api_case
<set>
<if test="num != null">
num = #{num,jdbcType=BIGINT},
</if>
<if test="testPlanId != null">
test_plan_id = #{testPlanId,jdbcType=VARCHAR},
</if>
@ -322,6 +321,9 @@
<if test="pos != null">
pos = #{pos,jdbcType=BIGINT},
</if>
<if test="testPlanCollectionId != null">
test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="environmentId != null">
environment_id = #{environmentId,jdbcType=LONGVARCHAR},
</if>
@ -330,8 +332,7 @@
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.plan.domain.TestPlanApiCase">
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>
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanApiCase">
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}
</update>
<insert id="batchInsert" parameterType="map">
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
<foreach collection="list" item="item" separator=",">
(#{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}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
@ -380,9 +383,6 @@
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=VARCHAR}
</if>
<if test="'num'.toString() == column.value">
#{item.num,jdbcType=BIGINT}
</if>
<if test="'test_plan_id'.toString() == column.value">
#{item.testPlanId,jdbcType=VARCHAR}
</if>
@ -407,6 +407,9 @@
<if test="'pos'.toString() == column.value">
#{item.pos,jdbcType=BIGINT}
</if>
<if test="'test_plan_collection_id'.toString() == column.value">
#{item.testPlanCollectionId,jdbcType=VARCHAR}
</if>
<if test="'environment_id'.toString() == column.value">
#{item.environmentId,jdbcType=LONGVARCHAR}
</if>

View File

@ -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<TestPlanApiScenario> selectByExampleWithBLOBs(TestPlanApiScenarioExample example);
List<TestPlanApiScenario> 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<TestPlanApiScenario> list);

View File

@ -3,18 +3,17 @@
<mapper namespace="io.metersphere.plan.mapper.TestPlanApiScenarioMapper">
<resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanApiScenario">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="num" jdbcType="BIGINT" property="num" />
<result column="test_plan_id" jdbcType="VARCHAR" property="testPlanId" />
<result column="api_scenario_id" jdbcType="VARCHAR" property="apiScenarioId" />
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
<result column="execute_user" jdbcType="VARCHAR" property="executeUser" />
<result column="last_exec_result" jdbcType="VARCHAR" property="lastExecResult" />
<result column="last_exec_report_id" jdbcType="VARCHAR" property="lastExecReportId" />
<result column="execute_user" jdbcType="VARCHAR" property="executeUser" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="pos" jdbcType="BIGINT" property="pos" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.plan.domain.TestPlanApiScenario">
<result column="environment_id" jdbcType="LONGVARCHAR" property="environmentId" />
<result column="test_plan_collection_id" jdbcType="VARCHAR" property="testPlanCollectionId" />
<result column="grouped" jdbcType="BIT" property="grouped" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -75,28 +74,9 @@
</where>
</sql>
<sql id="Base_Column_List">
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
</sql>
<sql id="Blob_Column_List">
environment_id
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.plan.domain.TestPlanApiScenarioExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from test_plan_api_scenario
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanApiScenarioExample" resultMap="BaseResultMap">
select
<if test="distinct">
@ -111,11 +91,9 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from test_plan_api_scenario
where id = #{id,jdbcType=VARCHAR}
</select>
@ -130,14 +108,16 @@
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanApiScenario">
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>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanApiScenario">
insert into test_plan_api_scenario
@ -145,24 +125,24 @@
<if test="id != null">
id,
</if>
<if test="num != null">
num,
</if>
<if test="testPlanId != null">
test_plan_id,
</if>
<if test="apiScenarioId != null">
api_scenario_id,
</if>
<if test="environmentId != null">
environment_id,
</if>
<if test="executeUser != null">
execute_user,
</if>
<if test="lastExecResult != null">
last_exec_result,
</if>
<if test="lastExecReportId != null">
last_exec_report_id,
</if>
<if test="executeUser != null">
execute_user,
</if>
<if test="createTime != null">
create_time,
</if>
@ -172,32 +152,35 @@
<if test="pos != null">
pos,
</if>
<if test="environmentId != null">
environment_id,
<if test="testPlanCollectionId != null">
test_plan_collection_id,
</if>
<if test="grouped != null">
grouped,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="num != null">
#{num,jdbcType=BIGINT},
</if>
<if test="testPlanId != null">
#{testPlanId,jdbcType=VARCHAR},
</if>
<if test="apiScenarioId != null">
#{apiScenarioId,jdbcType=VARCHAR},
</if>
<if test="environmentId != null">
#{environmentId,jdbcType=VARCHAR},
</if>
<if test="executeUser != null">
#{executeUser,jdbcType=VARCHAR},
</if>
<if test="lastExecResult != null">
#{lastExecResult,jdbcType=VARCHAR},
</if>
<if test="lastExecReportId != null">
#{lastExecReportId,jdbcType=VARCHAR},
</if>
<if test="executeUser != null">
#{executeUser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
@ -207,8 +190,11 @@
<if test="pos != null">
#{pos,jdbcType=BIGINT},
</if>
<if test="environmentId != null">
#{environmentId,jdbcType=LONGVARCHAR},
<if test="testPlanCollectionId != null">
#{testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="grouped != null">
#{grouped,jdbcType=BIT},
</if>
</trim>
</insert>
@ -224,24 +210,24 @@
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.num != null">
num = #{record.num,jdbcType=BIGINT},
</if>
<if test="record.testPlanId != null">
test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
</if>
<if test="record.apiScenarioId != null">
api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR},
</if>
<if test="record.environmentId != null">
environment_id = #{record.environmentId,jdbcType=VARCHAR},
</if>
<if test="record.executeUser != null">
execute_user = #{record.executeUser,jdbcType=VARCHAR},
</if>
<if test="record.lastExecResult != null">
last_exec_result = #{record.lastExecResult,jdbcType=VARCHAR},
</if>
<if test="record.lastExecReportId != null">
last_exec_report_id = #{record.lastExecReportId,jdbcType=VARCHAR},
</if>
<if test="record.executeUser != null">
execute_user = #{record.executeUser,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
@ -251,43 +237,31 @@
<if test="record.pos != null">
pos = #{record.pos,jdbcType=BIGINT},
</if>
<if test="record.environmentId != null">
environment_id = #{record.environmentId,jdbcType=LONGVARCHAR},
<if test="record.testPlanCollectionId != null">
test_plan_collection_id = #{record.testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="record.grouped != null">
grouped = #{record.grouped,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -295,24 +269,24 @@
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.plan.domain.TestPlanApiScenario">
update test_plan_api_scenario
<set>
<if test="num != null">
num = #{num,jdbcType=BIGINT},
</if>
<if test="testPlanId != null">
test_plan_id = #{testPlanId,jdbcType=VARCHAR},
</if>
<if test="apiScenarioId != null">
api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR},
</if>
<if test="environmentId != null">
environment_id = #{environmentId,jdbcType=VARCHAR},
</if>
<if test="executeUser != null">
execute_user = #{executeUser,jdbcType=VARCHAR},
</if>
<if test="lastExecResult != null">
last_exec_result = #{lastExecResult,jdbcType=VARCHAR},
</if>
<if test="lastExecReportId != null">
last_exec_report_id = #{lastExecReportId,jdbcType=VARCHAR},
</if>
<if test="executeUser != null">
execute_user = #{executeUser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
@ -322,50 +296,42 @@
<if test="pos != null">
pos = #{pos,jdbcType=BIGINT},
</if>
<if test="environmentId != null">
environment_id = #{environmentId,jdbcType=LONGVARCHAR},
<if test="testPlanCollectionId != null">
test_plan_collection_id = #{testPlanCollectionId,jdbcType=VARCHAR},
</if>
<if test="grouped != null">
grouped = #{grouped,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.plan.domain.TestPlanApiScenario">
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanApiScenario">
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>
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanApiScenario">
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}
</update>
<insert id="batchInsert" parameterType="map">
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
<foreach collection="list" item="item" separator=",">
(#{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})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
@ -381,24 +347,24 @@
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=VARCHAR}
</if>
<if test="'num'.toString() == column.value">
#{item.num,jdbcType=BIGINT}
</if>
<if test="'test_plan_id'.toString() == column.value">
#{item.testPlanId,jdbcType=VARCHAR}
</if>
<if test="'api_scenario_id'.toString() == column.value">
#{item.apiScenarioId,jdbcType=VARCHAR}
</if>
<if test="'environment_id'.toString() == column.value">
#{item.environmentId,jdbcType=VARCHAR}
</if>
<if test="'execute_user'.toString() == column.value">
#{item.executeUser,jdbcType=VARCHAR}
</if>
<if test="'last_exec_result'.toString() == column.value">
#{item.lastExecResult,jdbcType=VARCHAR}
</if>
<if test="'last_exec_report_id'.toString() == column.value">
#{item.lastExecReportId,jdbcType=VARCHAR}
</if>
<if test="'execute_user'.toString() == column.value">
#{item.executeUser,jdbcType=VARCHAR}
</if>
<if test="'create_time'.toString() == column.value">
#{item.createTime,jdbcType=BIGINT}
</if>
@ -408,8 +374,11 @@
<if test="'pos'.toString() == column.value">
#{item.pos,jdbcType=BIGINT}
</if>
<if test="'environment_id'.toString() == column.value">
#{item.environmentId,jdbcType=LONGVARCHAR}
<if test="'test_plan_collection_id'.toString() == column.value">
#{item.testPlanCollectionId,jdbcType=VARCHAR}
</if>
<if test="'grouped'.toString() == column.value">
#{item.grouped,jdbcType=BIT}
</if>
</foreach>
)

View File

@ -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<TestPlanCollection> 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<TestPlanCollection> list);
int batchInsertSelective(@Param("list") List<TestPlanCollection> list, @Param("selective") TestPlanCollection.Column ... selective);
}

View File

@ -0,0 +1,347 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.plan.mapper.TestPlanCollectionMapper">
<resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanCollection">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="test_plan_id" jdbcType="VARCHAR" property="testPlanId" />
<result column="test_collection_type_id" jdbcType="VARCHAR" property="testCollectionTypeId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="execute_method" jdbcType="VARCHAR" property="executeMethod" />
<result column="grouped" jdbcType="BIT" property="grouped" />
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
<result column="pos" jdbcType="BIGINT" property="pos" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, test_plan_id, test_collection_type_id, `name`, execute_method, grouped, environment_id,
pos, create_user, create_time
</sql>
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanCollectionExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from test_plan_collection
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from test_plan_collection
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from test_plan_collection
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.plan.domain.TestPlanCollectionExample">
delete from test_plan_collection
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanCollection">
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>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanCollection">
insert into test_plan_collection
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="testPlanId != null">
test_plan_id,
</if>
<if test="testCollectionTypeId != null">
test_collection_type_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="executeMethod != null">
execute_method,
</if>
<if test="grouped != null">
grouped,
</if>
<if test="environmentId != null">
environment_id,
</if>
<if test="pos != null">
pos,
</if>
<if test="createUser != null">
create_user,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="testPlanId != null">
#{testPlanId,jdbcType=VARCHAR},
</if>
<if test="testCollectionTypeId != null">
#{testCollectionTypeId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="executeMethod != null">
#{executeMethod,jdbcType=VARCHAR},
</if>
<if test="grouped != null">
#{grouped,jdbcType=BIT},
</if>
<if test="environmentId != null">
#{environmentId,jdbcType=VARCHAR},
</if>
<if test="pos != null">
#{pos,jdbcType=BIGINT},
</if>
<if test="createUser != null">
#{createUser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanCollectionExample" resultType="java.lang.Long">
select count(*) from test_plan_collection
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_plan_collection
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.testPlanId != null">
test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
</if>
<if test="record.testCollectionTypeId != null">
test_collection_type_id = #{record.testCollectionTypeId,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.executeMethod != null">
execute_method = #{record.executeMethod,jdbcType=VARCHAR},
</if>
<if test="record.grouped != null">
grouped = #{record.grouped,jdbcType=BIT},
</if>
<if test="record.environmentId != null">
environment_id = #{record.environmentId,jdbcType=VARCHAR},
</if>
<if test="record.pos != null">
pos = #{record.pos,jdbcType=BIGINT},
</if>
<if test="record.createUser != null">
create_user = #{record.createUser,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.plan.domain.TestPlanCollection">
update test_plan_collection
<set>
<if test="testPlanId != null">
test_plan_id = #{testPlanId,jdbcType=VARCHAR},
</if>
<if test="testCollectionTypeId != null">
test_collection_type_id = #{testCollectionTypeId,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="executeMethod != null">
execute_method = #{executeMethod,jdbcType=VARCHAR},
</if>
<if test="grouped != null">
grouped = #{grouped,jdbcType=BIT},
</if>
<if test="environmentId != null">
environment_id = #{environmentId,jdbcType=VARCHAR},
</if>
<if test="pos != null">
pos = #{pos,jdbcType=BIGINT},
</if>
<if test="createUser != null">
create_user = #{createUser,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanCollection">
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}
</update>
<insert id="batchInsert" parameterType="map">
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
<foreach collection="list" item="item" separator=",">
(#{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})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
insert into test_plan_collection (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=VARCHAR}
</if>
<if test="'test_plan_id'.toString() == column.value">
#{item.testPlanId,jdbcType=VARCHAR}
</if>
<if test="'test_collection_type_id'.toString() == column.value">
#{item.testCollectionTypeId,jdbcType=VARCHAR}
</if>
<if test="'name'.toString() == column.value">
#{item.name,jdbcType=VARCHAR}
</if>
<if test="'execute_method'.toString() == column.value">
#{item.executeMethod,jdbcType=VARCHAR}
</if>
<if test="'grouped'.toString() == column.value">
#{item.grouped,jdbcType=BIT}
</if>
<if test="'environment_id'.toString() == column.value">
#{item.environmentId,jdbcType=VARCHAR}
</if>
<if test="'pos'.toString() == column.value">
#{item.pos,jdbcType=BIGINT}
</if>
<if test="'create_user'.toString() == column.value">
#{item.createUser,jdbcType=VARCHAR}
</if>
<if test="'create_time'.toString() == column.value">
#{item.createTime,jdbcType=BIGINT}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

View File

@ -5,7 +5,6 @@
<id column="test_plan_id" jdbcType="VARCHAR" property="testPlanId" />
<result column="automatic_status_update" jdbcType="BIT" property="automaticStatusUpdate" />
<result column="repeat_case" jdbcType="BIT" property="repeatCase" />
<result column="test_planning" jdbcType="BIT" property="testPlanning" />
<result column="pass_threshold" jdbcType="DECIMAL" property="passThreshold" />
</resultMap>
<sql id="Example_Where_Clause">
@ -67,7 +66,7 @@
</where>
</sql>
<sql id="Base_Column_List">
test_plan_id, automatic_status_update, repeat_case, test_planning, pass_threshold
test_plan_id, automatic_status_update, repeat_case, pass_threshold
</sql>
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanConfigExample" resultMap="BaseResultMap">
select
@ -101,9 +100,9 @@
</delete>
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanConfig">
insert into test_plan_config (test_plan_id, automatic_status_update, repeat_case,
test_planning, pass_threshold)
pass_threshold)
values (#{testPlanId,jdbcType=VARCHAR}, #{automaticStatusUpdate,jdbcType=BIT}, #{repeatCase,jdbcType=BIT},
#{testPlanning,jdbcType=BIT}, #{passThreshold,jdbcType=DECIMAL})
#{passThreshold,jdbcType=DECIMAL})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanConfig">
insert into test_plan_config
@ -117,9 +116,6 @@
<if test="repeatCase != null">
repeat_case,
</if>
<if test="testPlanning != null">
test_planning,
</if>
<if test="passThreshold != null">
pass_threshold,
</if>
@ -134,9 +130,6 @@
<if test="repeatCase != null">
#{repeatCase,jdbcType=BIT},
</if>
<if test="testPlanning != null">
#{testPlanning,jdbcType=BIT},
</if>
<if test="passThreshold != null">
#{passThreshold,jdbcType=DECIMAL},
</if>
@ -160,9 +153,6 @@
<if test="record.repeatCase != null">
repeat_case = #{record.repeatCase,jdbcType=BIT},
</if>
<if test="record.testPlanning != null">
test_planning = #{record.testPlanning,jdbcType=BIT},
</if>
<if test="record.passThreshold != null">
pass_threshold = #{record.passThreshold,jdbcType=DECIMAL},
</if>
@ -176,7 +166,6 @@
set test_plan_id = #{record.testPlanId,jdbcType=VARCHAR},
automatic_status_update = #{record.automaticStatusUpdate,jdbcType=BIT},
repeat_case = #{record.repeatCase,jdbcType=BIT},
test_planning = #{record.testPlanning,jdbcType=BIT},
pass_threshold = #{record.passThreshold,jdbcType=DECIMAL}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -191,9 +180,6 @@
<if test="repeatCase != null">
repeat_case = #{repeatCase,jdbcType=BIT},
</if>
<if test="testPlanning != null">
test_planning = #{testPlanning,jdbcType=BIT},
</if>
<if test="passThreshold != null">
pass_threshold = #{passThreshold,jdbcType=DECIMAL},
</if>
@ -204,19 +190,16 @@
update test_plan_config
set automatic_status_update = #{automaticStatusUpdate,jdbcType=BIT},
repeat_case = #{repeatCase,jdbcType=BIT},
test_planning = #{testPlanning,jdbcType=BIT},
pass_threshold = #{passThreshold,jdbcType=DECIMAL}
where test_plan_id = #{testPlanId,jdbcType=VARCHAR}
</update>
<insert id="batchInsert" parameterType="map">
insert into test_plan_config
(test_plan_id, automatic_status_update, repeat_case, test_planning, pass_threshold
)
(test_plan_id, automatic_status_update, repeat_case, pass_threshold)
values
<foreach collection="list" item="item" separator=",">
(#{item.testPlanId,jdbcType=VARCHAR}, #{item.automaticStatusUpdate,jdbcType=BIT},
#{item.repeatCase,jdbcType=BIT}, #{item.testPlanning,jdbcType=BIT}, #{item.passThreshold,jdbcType=DECIMAL}
)
#{item.repeatCase,jdbcType=BIT}, #{item.passThreshold,jdbcType=DECIMAL})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
@ -238,9 +221,6 @@
<if test="'repeat_case'.toString() == column.value">
#{item.repeatCase,jdbcType=BIT}
</if>
<if test="'test_planning'.toString() == column.value">
#{item.testPlanning,jdbcType=BIT}
</if>
<if test="'pass_threshold'.toString() == column.value">
#{item.passThreshold,jdbcType=DECIMAL}
</if>

View File

@ -8,10 +8,9 @@
<result column="api_scenario_count" jdbcType="BIGINT" property="apiScenarioCount" />
<result column="bug_count" jdbcType="BIGINT" property="bugCount" />
<result column="test_plan_report_id" jdbcType="VARCHAR" property="testPlanReportId" />
<result column="summary" jdbcType="VARCHAR" property="summary" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.plan.domain.TestPlanReportSummary">
<result column="report_count" jdbcType="LONGVARBINARY" property="reportCount" />
<result column="summary" jdbcType="LONGVARCHAR" property="summary" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -72,11 +71,10 @@
</where>
</sql>
<sql id="Base_Column_List">
id, functional_case_count, api_case_count, api_scenario_count, bug_count, test_plan_report_id,
summary
id, functional_case_count, api_case_count, api_scenario_count, bug_count, test_plan_report_id
</sql>
<sql id="Blob_Column_List">
report_count
summary
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.plan.domain.TestPlanReportSummaryExample" resultMap="ResultMapWithBLOBs">
select
@ -129,10 +127,10 @@
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanReportSummary">
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>
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReportSummary">
insert into test_plan_report_summary
@ -158,9 +156,6 @@
<if test="summary != null">
summary,
</if>
<if test="reportCount != null">
report_count,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@ -182,10 +177,7 @@
#{testPlanReportId,jdbcType=VARCHAR},
</if>
<if test="summary != null">
#{summary,jdbcType=VARCHAR},
</if>
<if test="reportCount != null">
#{reportCount,jdbcType=LONGVARBINARY},
#{summary,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
@ -217,10 +209,7 @@
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
</if>
<if test="record.summary != null">
summary = #{record.summary,jdbcType=VARCHAR},
</if>
<if test="record.reportCount != null">
report_count = #{record.reportCount,jdbcType=LONGVARBINARY},
summary = #{record.summary,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
@ -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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -273,10 +260,7 @@
test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
</if>
<if test="summary != null">
summary = #{summary,jdbcType=VARCHAR},
</if>
<if test="reportCount != null">
report_count = #{reportCount,jdbcType=LONGVARBINARY},
summary = #{summary,jdbcType=LONGVARCHAR},
</if>
</set>
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}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanReportSummary">
@ -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}
</update>
<insert id="batchInsert" parameterType="map">
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
<foreach collection="list" item="item" separator=",">
(#{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})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
@ -342,10 +324,7 @@
#{item.testPlanReportId,jdbcType=VARCHAR}
</if>
<if test="'summary'.toString() == column.value">
#{item.summary,jdbcType=VARCHAR}
</if>
<if test="'report_count'.toString() == column.value">
#{item.reportCount,jdbcType=LONGVARBINARY}
#{item.summary,jdbcType=LONGVARCHAR}
</if>
</foreach>
)

View File

@ -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;

View File

@ -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());

View File

@ -64,7 +64,7 @@ public class TestPlanBatchCopyService {
//测试规划配置信息
TestPlanAllocationExample allocationExample = new TestPlanAllocationExample();
allocationExample.createCriteria().andTestPlanIdIn(ids);
List<TestPlanAllocation> testPlanAllocations = testPlanAllocationMapper.selectByExampleWithBLOBs(allocationExample);
List<TestPlanAllocation> testPlanAllocations = testPlanAllocationMapper.selectByExample(allocationExample);
batchInsertPlan(testPlans, testPlanConfigs, testPlanAllocations, request, userId);
}
}

View File

@ -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) {

View File

@ -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);

View File

@ -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

View File

@ -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)