diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java index 271442babb..0fd50835e8 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java @@ -6,11 +6,12 @@ import jakarta.validation.constraints.*; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import lombok.Data; @Data public class ApiScenario implements Serializable { - @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{api_scenario.id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{api_scenario.id.length_range}", groups = {Created.class, Updated.class}) private String id; @@ -30,11 +31,6 @@ public class ApiScenario implements Serializable { @Size(min = 1, max = 20, message = "{api_scenario.status.length_range}", groups = {Created.class, Updated.class}) private String status; - @Schema(description = "责任人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{api_scenario.principal.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{api_scenario.principal.length_range}", groups = {Created.class, Updated.class}) - private String principal; - @Schema(description = "场景步骤总数", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "{api_scenario.step_total.not_blank}", groups = {Created.class}) private Integer stepTotal; @@ -52,9 +48,6 @@ public class ApiScenario implements Serializable { @Schema(description = "编号") private Long num; - @Schema(description = "自定义id") - private String customNum; - @Schema(description = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "{api_scenario.deleted.not_blank}", groups = {Created.class}) private Boolean deleted; @@ -84,7 +77,7 @@ public class ApiScenario implements Serializable { private String description; @Schema(description = "标签") - private String tags; + private java.util.List tags; @Schema(description = "是否为环境组", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "{api_scenario.grouped.not_blank}", groups = {Created.class}) @@ -115,13 +108,11 @@ public class ApiScenario implements Serializable { name("name", "name", "VARCHAR", true), priority("priority", "priority", "VARCHAR", false), status("status", "status", "VARCHAR", true), - principal("principal", "principal", "VARCHAR", false), stepTotal("step_total", "stepTotal", "INTEGER", false), passRate("pass_rate", "passRate", "BIGINT", false), lastReportStatus("last_report_status", "lastReportStatus", "VARCHAR", false), lastReportId("last_report_id", "lastReportId", "VARCHAR", false), num("num", "num", "BIGINT", false), - customNum("custom_num", "customNum", "VARCHAR", false), deleted("deleted", "deleted", "BIT", false), pos("pos", "pos", "BIGINT", false), versionId("version_id", "versionId", "VARCHAR", false), diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioExample.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioExample.java index 7ea4f20f99..4faedfac2f 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioExample.java @@ -64,19 +64,50 @@ public class ApiScenarioExample { } protected abstract static class GeneratedCriteria { + protected List tagsCriteria; + + protected List allCriteria; + protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); + tagsCriteria = new ArrayList(); + } + + public List getTagsCriteria() { + return tagsCriteria; + } + + protected void addTagsCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + tagsCriteria.add(new Criterion(condition, value, "io.metersphere.handler.ListTypeHandler")); + allCriteria = null; + } + + protected void addTagsCriterion(String condition, List value1, List value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + tagsCriteria.add(new Criterion(condition, value1, value2, "io.metersphere.handler.ListTypeHandler")); + allCriteria = null; } public boolean isValid() { - return criteria.size() > 0; + return criteria.size() > 0 + || tagsCriteria.size() > 0; } public List getAllCriteria() { - return criteria; + if (allCriteria == null) { + allCriteria = new ArrayList(); + allCriteria.addAll(criteria); + allCriteria.addAll(tagsCriteria); + } + return allCriteria; } public List getCriteria() { @@ -88,6 +119,7 @@ public class ApiScenarioExample { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); + allCriteria = null; } protected void addCriterion(String condition, Object value, String property) { @@ -95,6 +127,7 @@ public class ApiScenarioExample { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); + allCriteria = null; } protected void addCriterion(String condition, Object value1, Object value2, String property) { @@ -102,6 +135,7 @@ public class ApiScenarioExample { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); + allCriteria = null; } public Criteria andIdIsNull() { @@ -384,76 +418,6 @@ public class ApiScenarioExample { return (Criteria) this; } - public Criteria andPrincipalIsNull() { - addCriterion("principal is null"); - return (Criteria) this; - } - - public Criteria andPrincipalIsNotNull() { - addCriterion("principal is not null"); - return (Criteria) this; - } - - public Criteria andPrincipalEqualTo(String value) { - addCriterion("principal =", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalNotEqualTo(String value) { - addCriterion("principal <>", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalGreaterThan(String value) { - addCriterion("principal >", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalGreaterThanOrEqualTo(String value) { - addCriterion("principal >=", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalLessThan(String value) { - addCriterion("principal <", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalLessThanOrEqualTo(String value) { - addCriterion("principal <=", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalLike(String value) { - addCriterion("principal like", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalNotLike(String value) { - addCriterion("principal not like", value, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalIn(List values) { - addCriterion("principal in", values, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalNotIn(List values) { - addCriterion("principal not in", values, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalBetween(String value1, String value2) { - addCriterion("principal between", value1, value2, "principal"); - return (Criteria) this; - } - - public Criteria andPrincipalNotBetween(String value1, String value2) { - addCriterion("principal not between", value1, value2, "principal"); - return (Criteria) this; - } - public Criteria andStepTotalIsNull() { addCriterion("step_total is null"); return (Criteria) this; @@ -774,76 +738,6 @@ public class ApiScenarioExample { return (Criteria) this; } - public Criteria andCustomNumIsNull() { - addCriterion("custom_num is null"); - return (Criteria) this; - } - - public Criteria andCustomNumIsNotNull() { - addCriterion("custom_num is not null"); - return (Criteria) this; - } - - public Criteria andCustomNumEqualTo(String value) { - addCriterion("custom_num =", value, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumNotEqualTo(String value) { - addCriterion("custom_num <>", value, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumGreaterThan(String value) { - addCriterion("custom_num >", value, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumGreaterThanOrEqualTo(String value) { - addCriterion("custom_num >=", value, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumLessThan(String value) { - addCriterion("custom_num <", value, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumLessThanOrEqualTo(String value) { - addCriterion("custom_num <=", value, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumLike(String value) { - addCriterion("custom_num like", value, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumNotLike(String value) { - addCriterion("custom_num not like", value, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumIn(List values) { - addCriterion("custom_num in", values, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumNotIn(List values) { - addCriterion("custom_num not in", values, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumBetween(String value1, String value2) { - addCriterion("custom_num between", value1, value2, "customNum"); - return (Criteria) this; - } - - public Criteria andCustomNumNotBetween(String value1, String value2) { - addCriterion("custom_num not between", value1, value2, "customNum"); - return (Criteria) this; - } - public Criteria andDeletedIsNull() { addCriterion("deleted is null"); return (Criteria) this; @@ -1384,63 +1278,63 @@ public class ApiScenarioExample { return (Criteria) this; } - public Criteria andTagsEqualTo(String value) { - addCriterion("tags =", value, "tags"); + public Criteria andTagsEqualTo(List value) { + addTagsCriterion("tags =", value, "tags"); return (Criteria) this; } - public Criteria andTagsNotEqualTo(String value) { - addCriterion("tags <>", value, "tags"); + public Criteria andTagsNotEqualTo(List value) { + addTagsCriterion("tags <>", value, "tags"); return (Criteria) this; } - public Criteria andTagsGreaterThan(String value) { - addCriterion("tags >", value, "tags"); + public Criteria andTagsGreaterThan(List value) { + addTagsCriterion("tags >", value, "tags"); return (Criteria) this; } - public Criteria andTagsGreaterThanOrEqualTo(String value) { - addCriterion("tags >=", value, "tags"); + public Criteria andTagsGreaterThanOrEqualTo(List value) { + addTagsCriterion("tags >=", value, "tags"); return (Criteria) this; } - public Criteria andTagsLessThan(String value) { - addCriterion("tags <", value, "tags"); + public Criteria andTagsLessThan(List value) { + addTagsCriterion("tags <", value, "tags"); return (Criteria) this; } - public Criteria andTagsLessThanOrEqualTo(String value) { - addCriterion("tags <=", value, "tags"); + public Criteria andTagsLessThanOrEqualTo(List value) { + addTagsCriterion("tags <=", value, "tags"); return (Criteria) this; } - public Criteria andTagsLike(String value) { - addCriterion("tags like", value, "tags"); + public Criteria andTagsLike(List value) { + addTagsCriterion("tags like", value, "tags"); return (Criteria) this; } - public Criteria andTagsNotLike(String value) { - addCriterion("tags not like", value, "tags"); + public Criteria andTagsNotLike(List value) { + addTagsCriterion("tags not like", value, "tags"); return (Criteria) this; } - public Criteria andTagsIn(List values) { - addCriterion("tags in", values, "tags"); + public Criteria andTagsIn(List> values) { + addTagsCriterion("tags in", values, "tags"); return (Criteria) this; } - public Criteria andTagsNotIn(List values) { - addCriterion("tags not in", values, "tags"); + public Criteria andTagsNotIn(List> values) { + addTagsCriterion("tags not in", values, "tags"); return (Criteria) this; } - public Criteria andTagsBetween(String value1, String value2) { - addCriterion("tags between", value1, value2, "tags"); + public Criteria andTagsBetween(List value1, List value2) { + addTagsCriterion("tags between", value1, value2, "tags"); return (Criteria) this; } - public Criteria andTagsNotBetween(String value1, String value2) { - addCriterion("tags not between", value1, value2, "tags"); + public Criteria andTagsNotBetween(List value1, List value2) { + addTagsCriterion("tags not between", value1, value2, "tags"); return (Criteria) this; } diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReferenceExample.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReferenceExample.java deleted file mode 100644 index dc112c49b3..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReferenceExample.java +++ /dev/null @@ -1,680 +0,0 @@ -package io.metersphere.api.domain; - -import java.util.ArrayList; -import java.util.List; - -public class ApiScenarioReferenceExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ApiScenarioReferenceExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(String value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(String value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(String value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(String value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(String value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(String value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLike(String value) { - addCriterion("id like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotLike(String value) { - addCriterion("id not like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(String value1, String value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(String value1, String value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdIsNull() { - addCriterion("api_scenario_id is null"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdIsNotNull() { - addCriterion("api_scenario_id is not null"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdEqualTo(String value) { - addCriterion("api_scenario_id =", value, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdNotEqualTo(String value) { - addCriterion("api_scenario_id <>", value, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdGreaterThan(String value) { - addCriterion("api_scenario_id >", value, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdGreaterThanOrEqualTo(String value) { - addCriterion("api_scenario_id >=", value, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdLessThan(String value) { - addCriterion("api_scenario_id <", value, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdLessThanOrEqualTo(String value) { - addCriterion("api_scenario_id <=", value, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdLike(String value) { - addCriterion("api_scenario_id like", value, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdNotLike(String value) { - addCriterion("api_scenario_id not like", value, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdIn(List values) { - addCriterion("api_scenario_id in", values, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdNotIn(List values) { - addCriterion("api_scenario_id not in", values, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdBetween(String value1, String value2) { - addCriterion("api_scenario_id between", value1, value2, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andApiScenarioIdNotBetween(String value1, String value2) { - addCriterion("api_scenario_id not between", value1, value2, "apiScenarioId"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("create_time is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("create_time is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Long value) { - addCriterion("create_time =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Long value) { - addCriterion("create_time <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Long value) { - addCriterion("create_time >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { - addCriterion("create_time >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Long value) { - addCriterion("create_time <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Long value) { - addCriterion("create_time <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("create_time in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("create_time not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Long value1, Long value2) { - addCriterion("create_time between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Long value1, Long value2) { - addCriterion("create_time not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateUserIsNull() { - addCriterion("create_user is null"); - return (Criteria) this; - } - - public Criteria andCreateUserIsNotNull() { - addCriterion("create_user is not null"); - return (Criteria) this; - } - - public Criteria andCreateUserEqualTo(String value) { - addCriterion("create_user =", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserNotEqualTo(String value) { - addCriterion("create_user <>", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserGreaterThan(String value) { - addCriterion("create_user >", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserGreaterThanOrEqualTo(String value) { - addCriterion("create_user >=", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserLessThan(String value) { - addCriterion("create_user <", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserLessThanOrEqualTo(String value) { - addCriterion("create_user <=", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserLike(String value) { - addCriterion("create_user like", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserNotLike(String value) { - addCriterion("create_user not like", value, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserIn(List values) { - addCriterion("create_user in", values, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserNotIn(List values) { - addCriterion("create_user not in", values, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserBetween(String value1, String value2) { - addCriterion("create_user between", value1, value2, "createUser"); - return (Criteria) this; - } - - public Criteria andCreateUserNotBetween(String value1, String value2) { - addCriterion("create_user not between", value1, value2, "createUser"); - return (Criteria) this; - } - - public Criteria andReferenceIdIsNull() { - addCriterion("reference_id is null"); - return (Criteria) this; - } - - public Criteria andReferenceIdIsNotNull() { - addCriterion("reference_id is not null"); - return (Criteria) this; - } - - public Criteria andReferenceIdEqualTo(String value) { - addCriterion("reference_id =", value, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdNotEqualTo(String value) { - addCriterion("reference_id <>", value, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdGreaterThan(String value) { - addCriterion("reference_id >", value, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdGreaterThanOrEqualTo(String value) { - addCriterion("reference_id >=", value, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdLessThan(String value) { - addCriterion("reference_id <", value, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdLessThanOrEqualTo(String value) { - addCriterion("reference_id <=", value, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdLike(String value) { - addCriterion("reference_id like", value, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdNotLike(String value) { - addCriterion("reference_id not like", value, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdIn(List values) { - addCriterion("reference_id in", values, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdNotIn(List values) { - addCriterion("reference_id not in", values, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdBetween(String value1, String value2) { - addCriterion("reference_id between", value1, value2, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceIdNotBetween(String value1, String value2) { - addCriterion("reference_id not between", value1, value2, "referenceId"); - return (Criteria) this; - } - - public Criteria andReferenceTypeIsNull() { - addCriterion("reference_type is null"); - return (Criteria) this; - } - - public Criteria andReferenceTypeIsNotNull() { - addCriterion("reference_type is not null"); - return (Criteria) this; - } - - public Criteria andReferenceTypeEqualTo(String value) { - addCriterion("reference_type =", value, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeNotEqualTo(String value) { - addCriterion("reference_type <>", value, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeGreaterThan(String value) { - addCriterion("reference_type >", value, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeGreaterThanOrEqualTo(String value) { - addCriterion("reference_type >=", value, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeLessThan(String value) { - addCriterion("reference_type <", value, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeLessThanOrEqualTo(String value) { - addCriterion("reference_type <=", value, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeLike(String value) { - addCriterion("reference_type like", value, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeNotLike(String value) { - addCriterion("reference_type not like", value, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeIn(List values) { - addCriterion("reference_type in", values, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeNotIn(List values) { - addCriterion("reference_type not in", values, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeBetween(String value1, String value2) { - addCriterion("reference_type between", value1, value2, "referenceType"); - return (Criteria) this; - } - - public Criteria andReferenceTypeNotBetween(String value1, String value2) { - addCriterion("reference_type not between", value1, value2, "referenceType"); - return (Criteria) this; - } - - public Criteria andDataTypeIsNull() { - addCriterion("data_type is null"); - return (Criteria) this; - } - - public Criteria andDataTypeIsNotNull() { - addCriterion("data_type is not null"); - return (Criteria) this; - } - - public Criteria andDataTypeEqualTo(String value) { - addCriterion("data_type =", value, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeNotEqualTo(String value) { - addCriterion("data_type <>", value, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeGreaterThan(String value) { - addCriterion("data_type >", value, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeGreaterThanOrEqualTo(String value) { - addCriterion("data_type >=", value, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeLessThan(String value) { - addCriterion("data_type <", value, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeLessThanOrEqualTo(String value) { - addCriterion("data_type <=", value, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeLike(String value) { - addCriterion("data_type like", value, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeNotLike(String value) { - addCriterion("data_type not like", value, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeIn(List values) { - addCriterion("data_type in", values, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeNotIn(List values) { - addCriterion("data_type not in", values, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeBetween(String value1, String value2) { - addCriterion("data_type between", value1, value2, "dataType"); - return (Criteria) this; - } - - public Criteria andDataTypeNotBetween(String value1, String value2) { - addCriterion("data_type not between", value1, value2, "dataType"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReference.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStep.java similarity index 51% rename from backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReference.java rename to backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStep.java index 56c5b2f319..a989de4ec0 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioReference.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStep.java @@ -9,44 +9,67 @@ import java.util.Arrays; import lombok.Data; @Data -public class ApiScenarioReference implements Serializable { - @Schema(description = "引用关系pk", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{api_scenario_reference.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{api_scenario_reference.id.length_range}", groups = {Created.class, Updated.class}) +public class ApiScenarioStep implements Serializable { + @Schema(description = "步骤id", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_scenario_step.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{api_scenario_step.id.length_range}", groups = {Created.class, Updated.class}) private String id; - @Schema(description = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{api_scenario_reference.api_scenario_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{api_scenario_reference.api_scenario_id.length_range}", groups = {Created.class, Updated.class}) - private String apiScenarioId; + @Schema(description = "场景id", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_scenario_step.scenario_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{api_scenario_step.scenario_id.length_range}", groups = {Created.class, Updated.class}) + private String scenarioId; - @Schema(description = "创建时间") - private Long createTime; + @Schema(description = "步骤名称") + private String name; - @Schema(description = "创建人") - private String createUser; + @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{api_scenario_step.sort.not_blank}", groups = {Created.class}) + private Long sort; - @Schema(description = "引用步骤fk", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{api_scenario_reference.reference_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{api_scenario_reference.reference_id.length_range}", groups = {Created.class, Updated.class}) - private String referenceId; + @Schema(description = "启用/禁用") + private Boolean enable; - @Schema(description = "引用步骤类型/REF/COPY") - private String referenceType; + @Schema(description = "资源id") + private Long resourceId; - @Schema(description = "步骤类型/CASE/API") - private String dataType; + @Schema(description = "资源编号") + private String resourceNum; + + @Schema(description = "步骤类型/API/CASE等") + private String stepType; + + @Schema(description = "项目fk") + private String projectId; + + @Schema(description = "父级fk") + private String parentId; + + @Schema(description = "版本号") + private String versionId; + + @Schema(description = "引用/复制/自定义") + private String source; + + @Schema(description = "循环等组件基础数据") + private String config; private static final long serialVersionUID = 1L; public enum Column { id("id", "id", "VARCHAR", false), - apiScenarioId("api_scenario_id", "apiScenarioId", "VARCHAR", false), - createTime("create_time", "createTime", "BIGINT", false), - createUser("create_user", "createUser", "VARCHAR", false), - referenceId("reference_id", "referenceId", "VARCHAR", false), - referenceType("reference_type", "referenceType", "VARCHAR", false), - dataType("data_type", "dataType", "VARCHAR", false); + scenarioId("scenario_id", "scenarioId", "VARCHAR", false), + name("name", "name", "VARCHAR", true), + sort("sort", "sort", "BIGINT", false), + enable("enable", "enable", "BIT", true), + resourceId("resource_id", "resourceId", "BIGINT", false), + resourceNum("resource_num", "resourceNum", "VARCHAR", false), + stepType("step_type", "stepType", "VARCHAR", false), + projectId("project_id", "projectId", "VARCHAR", false), + parentId("parent_id", "parentId", "VARCHAR", false), + versionId("version_id", "versionId", "VARCHAR", false), + source("source", "source", "VARCHAR", true), + config("config", "config", "VARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlob.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStepBlob.java similarity index 87% rename from backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlob.java rename to backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStepBlob.java index 0008fe7199..6eabaf8077 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStepBlob.java @@ -9,10 +9,10 @@ import java.util.Arrays; import lombok.Data; @Data -public class ApiScenarioBlob implements Serializable { - @Schema(description = "场景pk", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{api_scenario_blob.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{api_scenario_blob.id.length_range}", groups = {Created.class, Updated.class}) +public class ApiScenarioStepBlob implements Serializable { + @Schema(description = "场景步骤id", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_scenario_step_blob.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{api_scenario_step_blob.id.length_range}", groups = {Created.class, Updated.class}) private String id; @Schema(description = "场景步骤内容") diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStepBlobExample.java similarity index 98% rename from backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlobExample.java rename to backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStepBlobExample.java index 38da7bca8a..b99f7ef2fd 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioBlobExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStepBlobExample.java @@ -3,14 +3,14 @@ package io.metersphere.api.domain; import java.util.ArrayList; import java.util.List; -public class ApiScenarioBlobExample { +public class ApiScenarioStepBlobExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; - public ApiScenarioBlobExample() { + public ApiScenarioStepBlobExample() { oredCriteria = new ArrayList(); } diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStepExample.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStepExample.java new file mode 100644 index 0000000000..684ea20731 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioStepExample.java @@ -0,0 +1,1080 @@ +package io.metersphere.api.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ApiScenarioStepExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApiScenarioStepExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andScenarioIdIsNull() { + addCriterion("scenario_id is null"); + return (Criteria) this; + } + + public Criteria andScenarioIdIsNotNull() { + addCriterion("scenario_id is not null"); + return (Criteria) this; + } + + public Criteria andScenarioIdEqualTo(String value) { + addCriterion("scenario_id =", value, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdNotEqualTo(String value) { + addCriterion("scenario_id <>", value, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdGreaterThan(String value) { + addCriterion("scenario_id >", value, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdGreaterThanOrEqualTo(String value) { + addCriterion("scenario_id >=", value, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdLessThan(String value) { + addCriterion("scenario_id <", value, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdLessThanOrEqualTo(String value) { + addCriterion("scenario_id <=", value, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdLike(String value) { + addCriterion("scenario_id like", value, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdNotLike(String value) { + addCriterion("scenario_id not like", value, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdIn(List values) { + addCriterion("scenario_id in", values, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdNotIn(List values) { + addCriterion("scenario_id not in", values, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdBetween(String value1, String value2) { + addCriterion("scenario_id between", value1, value2, "scenarioId"); + return (Criteria) this; + } + + public Criteria andScenarioIdNotBetween(String value1, String value2) { + addCriterion("scenario_id not between", value1, value2, "scenarioId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andSortIsNull() { + addCriterion("sort is null"); + return (Criteria) this; + } + + public Criteria andSortIsNotNull() { + addCriterion("sort is not null"); + return (Criteria) this; + } + + public Criteria andSortEqualTo(Long value) { + addCriterion("sort =", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotEqualTo(Long value) { + addCriterion("sort <>", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThan(Long value) { + addCriterion("sort >", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortGreaterThanOrEqualTo(Long value) { + addCriterion("sort >=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThan(Long value) { + addCriterion("sort <", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortLessThanOrEqualTo(Long value) { + addCriterion("sort <=", value, "sort"); + return (Criteria) this; + } + + public Criteria andSortIn(List values) { + addCriterion("sort in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotIn(List values) { + addCriterion("sort not in", values, "sort"); + return (Criteria) this; + } + + public Criteria andSortBetween(Long value1, Long value2) { + addCriterion("sort between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andSortNotBetween(Long value1, Long value2) { + addCriterion("sort not between", value1, value2, "sort"); + return (Criteria) this; + } + + public Criteria andEnableIsNull() { + addCriterion("`enable` is null"); + return (Criteria) this; + } + + public Criteria andEnableIsNotNull() { + addCriterion("`enable` is not null"); + return (Criteria) this; + } + + public Criteria andEnableEqualTo(Boolean value) { + addCriterion("`enable` =", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableNotEqualTo(Boolean value) { + addCriterion("`enable` <>", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableGreaterThan(Boolean value) { + addCriterion("`enable` >", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableGreaterThanOrEqualTo(Boolean value) { + addCriterion("`enable` >=", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableLessThan(Boolean value) { + addCriterion("`enable` <", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableLessThanOrEqualTo(Boolean value) { + addCriterion("`enable` <=", value, "enable"); + return (Criteria) this; + } + + public Criteria andEnableIn(List values) { + addCriterion("`enable` in", values, "enable"); + return (Criteria) this; + } + + public Criteria andEnableNotIn(List values) { + addCriterion("`enable` not in", values, "enable"); + return (Criteria) this; + } + + public Criteria andEnableBetween(Boolean value1, Boolean value2) { + addCriterion("`enable` between", value1, value2, "enable"); + return (Criteria) this; + } + + public Criteria andEnableNotBetween(Boolean value1, Boolean value2) { + addCriterion("`enable` not between", value1, value2, "enable"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNull() { + addCriterion("resource_id is null"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNotNull() { + addCriterion("resource_id is not null"); + return (Criteria) this; + } + + public Criteria andResourceIdEqualTo(Long value) { + addCriterion("resource_id =", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotEqualTo(Long value) { + addCriterion("resource_id <>", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThan(Long value) { + addCriterion("resource_id >", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThanOrEqualTo(Long value) { + addCriterion("resource_id >=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThan(Long value) { + addCriterion("resource_id <", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThanOrEqualTo(Long value) { + addCriterion("resource_id <=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdIn(List values) { + addCriterion("resource_id in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotIn(List values) { + addCriterion("resource_id not in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdBetween(Long value1, Long value2) { + addCriterion("resource_id between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotBetween(Long value1, Long value2) { + addCriterion("resource_id not between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceNumIsNull() { + addCriterion("resource_num is null"); + return (Criteria) this; + } + + public Criteria andResourceNumIsNotNull() { + addCriterion("resource_num is not null"); + return (Criteria) this; + } + + public Criteria andResourceNumEqualTo(String value) { + addCriterion("resource_num =", value, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumNotEqualTo(String value) { + addCriterion("resource_num <>", value, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumGreaterThan(String value) { + addCriterion("resource_num >", value, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumGreaterThanOrEqualTo(String value) { + addCriterion("resource_num >=", value, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumLessThan(String value) { + addCriterion("resource_num <", value, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumLessThanOrEqualTo(String value) { + addCriterion("resource_num <=", value, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumLike(String value) { + addCriterion("resource_num like", value, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumNotLike(String value) { + addCriterion("resource_num not like", value, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumIn(List values) { + addCriterion("resource_num in", values, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumNotIn(List values) { + addCriterion("resource_num not in", values, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumBetween(String value1, String value2) { + addCriterion("resource_num between", value1, value2, "resourceNum"); + return (Criteria) this; + } + + public Criteria andResourceNumNotBetween(String value1, String value2) { + addCriterion("resource_num not between", value1, value2, "resourceNum"); + return (Criteria) this; + } + + public Criteria andStepTypeIsNull() { + addCriterion("step_type is null"); + return (Criteria) this; + } + + public Criteria andStepTypeIsNotNull() { + addCriterion("step_type is not null"); + return (Criteria) this; + } + + public Criteria andStepTypeEqualTo(String value) { + addCriterion("step_type =", value, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeNotEqualTo(String value) { + addCriterion("step_type <>", value, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeGreaterThan(String value) { + addCriterion("step_type >", value, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeGreaterThanOrEqualTo(String value) { + addCriterion("step_type >=", value, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeLessThan(String value) { + addCriterion("step_type <", value, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeLessThanOrEqualTo(String value) { + addCriterion("step_type <=", value, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeLike(String value) { + addCriterion("step_type like", value, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeNotLike(String value) { + addCriterion("step_type not like", value, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeIn(List values) { + addCriterion("step_type in", values, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeNotIn(List values) { + addCriterion("step_type not in", values, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeBetween(String value1, String value2) { + addCriterion("step_type between", value1, value2, "stepType"); + return (Criteria) this; + } + + public Criteria andStepTypeNotBetween(String value1, String value2) { + addCriterion("step_type not between", value1, value2, "stepType"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(String value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(String value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(String value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(String value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(String value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(String value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLike(String value) { + addCriterion("parent_id like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotLike(String value) { + addCriterion("parent_id not like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(String value1, String value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(String value1, String value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNull() { + addCriterion("version_id is null"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNotNull() { + addCriterion("version_id is not null"); + return (Criteria) this; + } + + public Criteria andVersionIdEqualTo(String value) { + addCriterion("version_id =", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotEqualTo(String value) { + addCriterion("version_id <>", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThan(String value) { + addCriterion("version_id >", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThanOrEqualTo(String value) { + addCriterion("version_id >=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThan(String value) { + addCriterion("version_id <", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThanOrEqualTo(String value) { + addCriterion("version_id <=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLike(String value) { + addCriterion("version_id like", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotLike(String value) { + addCriterion("version_id not like", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdIn(List values) { + addCriterion("version_id in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotIn(List values) { + addCriterion("version_id not in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdBetween(String value1, String value2) { + addCriterion("version_id between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotBetween(String value1, String value2) { + addCriterion("version_id not between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andSourceIsNull() { + addCriterion("`source` is null"); + return (Criteria) this; + } + + public Criteria andSourceIsNotNull() { + addCriterion("`source` is not null"); + return (Criteria) this; + } + + public Criteria andSourceEqualTo(String value) { + addCriterion("`source` =", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotEqualTo(String value) { + addCriterion("`source` <>", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThan(String value) { + addCriterion("`source` >", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThanOrEqualTo(String value) { + addCriterion("`source` >=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThan(String value) { + addCriterion("`source` <", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThanOrEqualTo(String value) { + addCriterion("`source` <=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLike(String value) { + addCriterion("`source` like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotLike(String value) { + addCriterion("`source` not like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceIn(List values) { + addCriterion("`source` in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotIn(List values) { + addCriterion("`source` not in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceBetween(String value1, String value2) { + addCriterion("`source` between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotBetween(String value1, String value2) { + addCriterion("`source` not between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andConfigIsNull() { + addCriterion("config is null"); + return (Criteria) this; + } + + public Criteria andConfigIsNotNull() { + addCriterion("config is not null"); + return (Criteria) this; + } + + public Criteria andConfigEqualTo(String value) { + addCriterion("config =", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigNotEqualTo(String value) { + addCriterion("config <>", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigGreaterThan(String value) { + addCriterion("config >", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigGreaterThanOrEqualTo(String value) { + addCriterion("config >=", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigLessThan(String value) { + addCriterion("config <", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigLessThanOrEqualTo(String value) { + addCriterion("config <=", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigLike(String value) { + addCriterion("config like", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigNotLike(String value) { + addCriterion("config not like", value, "config"); + return (Criteria) this; + } + + public Criteria andConfigIn(List values) { + addCriterion("config in", values, "config"); + return (Criteria) this; + } + + public Criteria andConfigNotIn(List values) { + addCriterion("config not in", values, "config"); + return (Criteria) this; + } + + public Criteria andConfigBetween(String value1, String value2) { + addCriterion("config between", value1, value2, "config"); + return (Criteria) this; + } + + public Criteria andConfigNotBetween(String value1, String value2) { + addCriterion("config not between", value1, value2, "config"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioBlobMapper.java deleted file mode 100644 index a2fbf330cc..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioBlobMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -package io.metersphere.api.mapper; - -import io.metersphere.api.domain.ApiScenarioBlob; -import io.metersphere.api.domain.ApiScenarioBlobExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface ApiScenarioBlobMapper { - long countByExample(ApiScenarioBlobExample example); - - int deleteByExample(ApiScenarioBlobExample example); - - int deleteByPrimaryKey(String id); - - int insert(ApiScenarioBlob record); - - int insertSelective(ApiScenarioBlob record); - - List selectByExampleWithBLOBs(ApiScenarioBlobExample example); - - List selectByExample(ApiScenarioBlobExample example); - - ApiScenarioBlob selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") ApiScenarioBlob record, @Param("example") ApiScenarioBlobExample example); - - int updateByExampleWithBLOBs(@Param("record") ApiScenarioBlob record, @Param("example") ApiScenarioBlobExample example); - - int updateByExample(@Param("record") ApiScenarioBlob record, @Param("example") ApiScenarioBlobExample example); - - int updateByPrimaryKeySelective(ApiScenarioBlob record); - - int updateByPrimaryKeyWithBLOBs(ApiScenarioBlob record); - - int batchInsert(@Param("list") List list); - - int batchInsertSelective(@Param("list") List list, @Param("selective") ApiScenarioBlob.Column ... selective); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioMapper.xml index f55050cc57..26a2f3abf6 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioMapper.xml @@ -6,13 +6,11 @@ - - @@ -21,7 +19,7 @@ - + @@ -54,6 +52,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=io.metersphere.handler.ListTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=io.metersphere.handler.ListTypeHandler} and #{criterion.secondValue,typeHandler=io.metersphere.handler.ListTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=io.metersphere.handler.ListTypeHandler} + + + + @@ -83,16 +100,34 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=io.metersphere.handler.ListTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=io.metersphere.handler.ListTypeHandler} and #{criterion.secondValue,typeHandler=io.metersphere.handler.ListTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=io.metersphere.handler.ListTypeHandler} + + + + - id, `name`, priority, `status`, principal, step_total, pass_rate, last_report_status, - last_report_id, num, custom_num, deleted, pos, version_id, ref_id, latest, project_id, - module_id, description, tags, grouped, create_user, create_time, delete_time, delete_user, - update_user, update_time + id, `name`, priority, `status`, step_total, pass_rate, last_report_status, last_report_id, + num, deleted, pos, version_id, ref_id, latest, project_id, module_id, description, + tags, grouped, create_user, create_time, delete_time, delete_user, update_user, update_time - select - - distinct - - - from api_scenario_reference - - - - - order by ${orderByClause} - - - - - delete from api_scenario_reference - where id = #{id,jdbcType=VARCHAR} - - - delete from api_scenario_reference - - - - - - insert into api_scenario_reference (id, api_scenario_id, create_time, - create_user, reference_id, reference_type, - data_type) - values (#{id,jdbcType=VARCHAR}, #{apiScenarioId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, - #{createUser,jdbcType=VARCHAR}, #{referenceId,jdbcType=VARCHAR}, #{referenceType,jdbcType=VARCHAR}, - #{dataType,jdbcType=VARCHAR}) - - - insert into api_scenario_reference - - - id, - - - api_scenario_id, - - - create_time, - - - create_user, - - - reference_id, - - - reference_type, - - - data_type, - - - - - #{id,jdbcType=VARCHAR}, - - - #{apiScenarioId,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=BIGINT}, - - - #{createUser,jdbcType=VARCHAR}, - - - #{referenceId,jdbcType=VARCHAR}, - - - #{referenceType,jdbcType=VARCHAR}, - - - #{dataType,jdbcType=VARCHAR}, - - - - - - update api_scenario_reference - - - id = #{record.id,jdbcType=VARCHAR}, - - - api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR}, - - - create_time = #{record.createTime,jdbcType=BIGINT}, - - - create_user = #{record.createUser,jdbcType=VARCHAR}, - - - reference_id = #{record.referenceId,jdbcType=VARCHAR}, - - - reference_type = #{record.referenceType,jdbcType=VARCHAR}, - - - data_type = #{record.dataType,jdbcType=VARCHAR}, - - - - - - - - update api_scenario_reference - set id = #{record.id,jdbcType=VARCHAR}, - api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - create_user = #{record.createUser,jdbcType=VARCHAR}, - reference_id = #{record.referenceId,jdbcType=VARCHAR}, - reference_type = #{record.referenceType,jdbcType=VARCHAR}, - data_type = #{record.dataType,jdbcType=VARCHAR} - - - - - - update api_scenario_reference - - - api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=BIGINT}, - - - create_user = #{createUser,jdbcType=VARCHAR}, - - - reference_id = #{referenceId,jdbcType=VARCHAR}, - - - reference_type = #{referenceType,jdbcType=VARCHAR}, - - - data_type = #{dataType,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=VARCHAR} - - - update api_scenario_reference - set api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - create_user = #{createUser,jdbcType=VARCHAR}, - reference_id = #{referenceId,jdbcType=VARCHAR}, - reference_type = #{referenceType,jdbcType=VARCHAR}, - data_type = #{dataType,jdbcType=VARCHAR} - where id = #{id,jdbcType=VARCHAR} - - - insert into api_scenario_reference - (id, api_scenario_id, create_time, create_user, reference_id, reference_type, data_type - ) - values - - (#{item.id,jdbcType=VARCHAR}, #{item.apiScenarioId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, - #{item.createUser,jdbcType=VARCHAR}, #{item.referenceId,jdbcType=VARCHAR}, #{item.referenceType,jdbcType=VARCHAR}, - #{item.dataType,jdbcType=VARCHAR}) - - - - insert into api_scenario_reference ( - - ${column.escapedColumnName} - - ) - values - - ( - - - #{item.id,jdbcType=VARCHAR} - - - #{item.apiScenarioId,jdbcType=VARCHAR} - - - #{item.createTime,jdbcType=BIGINT} - - - #{item.createUser,jdbcType=VARCHAR} - - - #{item.referenceId,jdbcType=VARCHAR} - - - #{item.referenceType,jdbcType=VARCHAR} - - - #{item.dataType,jdbcType=VARCHAR} - - - ) - - - \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepBlobMapper.java new file mode 100644 index 0000000000..32954f4c5e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepBlobMapper.java @@ -0,0 +1,38 @@ +package io.metersphere.api.mapper; + +import io.metersphere.api.domain.ApiScenarioStepBlob; +import io.metersphere.api.domain.ApiScenarioStepBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ApiScenarioStepBlobMapper { + long countByExample(ApiScenarioStepBlobExample example); + + int deleteByExample(ApiScenarioStepBlobExample example); + + int deleteByPrimaryKey(String id); + + int insert(ApiScenarioStepBlob record); + + int insertSelective(ApiScenarioStepBlob record); + + List selectByExampleWithBLOBs(ApiScenarioStepBlobExample example); + + List selectByExample(ApiScenarioStepBlobExample example); + + ApiScenarioStepBlob selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ApiScenarioStepBlob record, @Param("example") ApiScenarioStepBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") ApiScenarioStepBlob record, @Param("example") ApiScenarioStepBlobExample example); + + int updateByExample(@Param("record") ApiScenarioStepBlob record, @Param("example") ApiScenarioStepBlobExample example); + + int updateByPrimaryKeySelective(ApiScenarioStepBlob record); + + int updateByPrimaryKeyWithBLOBs(ApiScenarioStepBlob record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") ApiScenarioStepBlob.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepBlobMapper.xml similarity index 86% rename from backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioBlobMapper.xml rename to backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepBlobMapper.xml index dbb2b1638d..f6191f420e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioBlobMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepBlobMapper.xml @@ -1,10 +1,10 @@ - - + + - + @@ -71,7 +71,7 @@ content - select distinct @@ -79,7 +79,7 @@ , - from api_scenario_blob + from api_scenario_step_blob @@ -87,13 +87,13 @@ order by ${orderByClause} - select distinct - from api_scenario_blob + from api_scenario_step_blob @@ -106,25 +106,25 @@ , - from api_scenario_blob + from api_scenario_step_blob where id = #{id,jdbcType=VARCHAR} - delete from api_scenario_blob + delete from api_scenario_step_blob where id = #{id,jdbcType=VARCHAR} - - delete from api_scenario_blob + + delete from api_scenario_step_blob - - insert into api_scenario_blob (id, content) + + insert into api_scenario_step_blob (id, content) values (#{id,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARBINARY}) - - insert into api_scenario_blob + + insert into api_scenario_step_blob id, @@ -142,14 +142,14 @@ - + select count(*) from api_scenario_step_blob - update api_scenario_blob + update api_scenario_step_blob id = #{record.id,jdbcType=VARCHAR}, @@ -163,7 +163,7 @@ - update api_scenario_blob + update api_scenario_step_blob set id = #{record.id,jdbcType=VARCHAR}, content = #{record.content,jdbcType=LONGVARBINARY} @@ -171,14 +171,14 @@ - update api_scenario_blob + update api_scenario_step_blob set id = #{record.id,jdbcType=VARCHAR} - - update api_scenario_blob + + update api_scenario_step_blob content = #{content,jdbcType=LONGVARBINARY}, @@ -186,13 +186,13 @@ where id = #{id,jdbcType=VARCHAR} - - update api_scenario_blob + + update api_scenario_step_blob set content = #{content,jdbcType=LONGVARBINARY} where id = #{id,jdbcType=VARCHAR} - insert into api_scenario_blob + insert into api_scenario_step_blob (id, content) values @@ -200,7 +200,7 @@ - insert into api_scenario_blob ( + insert into api_scenario_step_blob ( ${column.escapedColumnName} diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepMapper.java b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepMapper.java new file mode 100644 index 0000000000..a41246d757 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.api.mapper; + +import io.metersphere.api.domain.ApiScenarioStep; +import io.metersphere.api.domain.ApiScenarioStepExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ApiScenarioStepMapper { + long countByExample(ApiScenarioStepExample example); + + int deleteByExample(ApiScenarioStepExample example); + + int deleteByPrimaryKey(String id); + + int insert(ApiScenarioStep record); + + int insertSelective(ApiScenarioStep record); + + List selectByExample(ApiScenarioStepExample example); + + ApiScenarioStep selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ApiScenarioStep record, @Param("example") ApiScenarioStepExample example); + + int updateByExample(@Param("record") ApiScenarioStep record, @Param("example") ApiScenarioStepExample example); + + int updateByPrimaryKeySelective(ApiScenarioStep record); + + int updateByPrimaryKey(ApiScenarioStep record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") ApiScenarioStep.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepMapper.xml new file mode 100644 index 0000000000..742fef2267 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioStepMapper.xml @@ -0,0 +1,404 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, scenario_id, `name`, sort, `enable`, resource_id, resource_num, step_type, project_id, + parent_id, version_id, `source`, config + + + + + delete from api_scenario_step + where id = #{id,jdbcType=VARCHAR} + + + delete from api_scenario_step + + + + + + insert into api_scenario_step (id, scenario_id, `name`, + sort, `enable`, resource_id, + resource_num, step_type, project_id, + parent_id, version_id, `source`, + config) + values (#{id,jdbcType=VARCHAR}, #{scenarioId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{sort,jdbcType=BIGINT}, #{enable,jdbcType=BIT}, #{resourceId,jdbcType=BIGINT}, + #{resourceNum,jdbcType=VARCHAR}, #{stepType,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, + #{parentId,jdbcType=VARCHAR}, #{versionId,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, + #{config,jdbcType=VARCHAR}) + + + insert into api_scenario_step + + + id, + + + scenario_id, + + + `name`, + + + sort, + + + `enable`, + + + resource_id, + + + resource_num, + + + step_type, + + + project_id, + + + parent_id, + + + version_id, + + + `source`, + + + config, + + + + + #{id,jdbcType=VARCHAR}, + + + #{scenarioId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{sort,jdbcType=BIGINT}, + + + #{enable,jdbcType=BIT}, + + + #{resourceId,jdbcType=BIGINT}, + + + #{resourceNum,jdbcType=VARCHAR}, + + + #{stepType,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=VARCHAR}, + + + #{versionId,jdbcType=VARCHAR}, + + + #{source,jdbcType=VARCHAR}, + + + #{config,jdbcType=VARCHAR}, + + + + + + update api_scenario_step + + + id = #{record.id,jdbcType=VARCHAR}, + + + scenario_id = #{record.scenarioId,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + sort = #{record.sort,jdbcType=BIGINT}, + + + `enable` = #{record.enable,jdbcType=BIT}, + + + resource_id = #{record.resourceId,jdbcType=BIGINT}, + + + resource_num = #{record.resourceNum,jdbcType=VARCHAR}, + + + step_type = #{record.stepType,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + parent_id = #{record.parentId,jdbcType=VARCHAR}, + + + version_id = #{record.versionId,jdbcType=VARCHAR}, + + + `source` = #{record.source,jdbcType=VARCHAR}, + + + config = #{record.config,jdbcType=VARCHAR}, + + + + + + + + update api_scenario_step + set id = #{record.id,jdbcType=VARCHAR}, + scenario_id = #{record.scenarioId,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + sort = #{record.sort,jdbcType=BIGINT}, + `enable` = #{record.enable,jdbcType=BIT}, + resource_id = #{record.resourceId,jdbcType=BIGINT}, + resource_num = #{record.resourceNum,jdbcType=VARCHAR}, + step_type = #{record.stepType,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=VARCHAR}, + version_id = #{record.versionId,jdbcType=VARCHAR}, + `source` = #{record.source,jdbcType=VARCHAR}, + config = #{record.config,jdbcType=VARCHAR} + + + + + + update api_scenario_step + + + scenario_id = #{scenarioId,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + sort = #{sort,jdbcType=BIGINT}, + + + `enable` = #{enable,jdbcType=BIT}, + + + resource_id = #{resourceId,jdbcType=BIGINT}, + + + resource_num = #{resourceNum,jdbcType=VARCHAR}, + + + step_type = #{stepType,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=VARCHAR}, + + + version_id = #{versionId,jdbcType=VARCHAR}, + + + `source` = #{source,jdbcType=VARCHAR}, + + + config = #{config,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update api_scenario_step + set scenario_id = #{scenarioId,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + sort = #{sort,jdbcType=BIGINT}, + `enable` = #{enable,jdbcType=BIT}, + resource_id = #{resourceId,jdbcType=BIGINT}, + resource_num = #{resourceNum,jdbcType=VARCHAR}, + step_type = #{stepType,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=VARCHAR}, + version_id = #{versionId,jdbcType=VARCHAR}, + `source` = #{source,jdbcType=VARCHAR}, + config = #{config,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + insert into api_scenario_step + (id, scenario_id, `name`, sort, `enable`, resource_id, resource_num, step_type, project_id, + parent_id, version_id, `source`, config) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.scenarioId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, + #{item.sort,jdbcType=BIGINT}, #{item.enable,jdbcType=BIT}, #{item.resourceId,jdbcType=BIGINT}, + #{item.resourceNum,jdbcType=VARCHAR}, #{item.stepType,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, + #{item.parentId,jdbcType=VARCHAR}, #{item.versionId,jdbcType=VARCHAR}, #{item.source,jdbcType=VARCHAR}, + #{item.config,jdbcType=VARCHAR}) + + + + insert into api_scenario_step ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.scenarioId,jdbcType=VARCHAR} + + + #{item.name,jdbcType=VARCHAR} + + + #{item.sort,jdbcType=BIGINT} + + + #{item.enable,jdbcType=BIT} + + + #{item.resourceId,jdbcType=BIGINT} + + + #{item.resourceNum,jdbcType=VARCHAR} + + + #{item.stepType,jdbcType=VARCHAR} + + + #{item.projectId,jdbcType=VARCHAR} + + + #{item.parentId,jdbcType=VARCHAR} + + + #{item.versionId,jdbcType=VARCHAR} + + + #{item.source,jdbcType=VARCHAR} + + + #{item.config,jdbcType=VARCHAR} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_5__api_test.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_5__api_test.sql index 431fb9987f..6b4454b1de 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_5__api_test.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_5__api_test.sql @@ -159,17 +159,15 @@ CREATE INDEX idx_pos ON api_definition_module(pos); CREATE UNIQUE INDEX uq_name_project_parent_type ON api_definition_module (project_id, name, parent_id); CREATE TABLE IF NOT EXISTS api_scenario( - `id` VARCHAR(50) NOT NULL COMMENT '' , + `id` VARCHAR(50) NOT NULL COMMENT 'id' , `name` VARCHAR(255) NOT NULL COMMENT '场景名称' , `priority` VARCHAR(10) NOT NULL COMMENT '场景级别/P0/P1等' , `status` VARCHAR(20) NOT NULL COMMENT '场景状态/未规划/已完成 等' , - `principal` VARCHAR(50) NOT NULL COMMENT '责任人/用户fk' , `step_total` INT NOT NULL DEFAULT 0 COMMENT '场景步骤总数' , `pass_rate` BIGINT NOT NULL DEFAULT 0 COMMENT '通过率' , `last_report_status` VARCHAR(50) COMMENT '最后一次执行的结果状态' , `last_report_id` VARCHAR(50) COMMENT '最后一次执行的报告fk' , - `num` INT COMMENT '编号' , - `custom_num` VARCHAR(50) COMMENT '自定义id' , + `num` BIGINT NOT NULL COMMENT '编号' , `deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '删除状态' , `pos` BIGINT NOT NULL COMMENT '自定义排序' , `version_id` VARCHAR(50) COMMENT '版本fk' , @@ -186,8 +184,8 @@ CREATE TABLE IF NOT EXISTS api_scenario( `delete_user` VARCHAR(50) COMMENT '删除人' , `update_user` VARCHAR(50) NOT NULL COMMENT '更新人' , `update_time` BIGINT NOT NULL COMMENT '更新时间' , - PRIMARY KEY (id) -) ENGINE = InnoDB + PRIMARY KEY (id) +) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '场景'; @@ -205,6 +203,40 @@ CREATE INDEX idx_num ON api_scenario(num); CREATE INDEX idx_priority ON api_scenario(priority); CREATE INDEX idx_name ON api_scenario(name); +CREATE TABLE IF NOT EXISTS api_scenario_step( + `id` VARCHAR(50) NOT NULL COMMENT '步骤id' , + `scenario_id` VARCHAR(50) NOT NULL COMMENT '场景id' , + `name` VARCHAR(255) COMMENT '步骤名称' , + `sort` BIGINT NOT NULL COMMENT '序号' , + `enable` BIT(1) NOT NULL DEFAULT 1 COMMENT '启用/禁用' , + `resource_id` BIGINT COMMENT '资源id' , + `resource_num` VARCHAR(50) COMMENT '资源编号' , + `step_type` VARCHAR(50) COMMENT '步骤类型/API/CASE等' , + `project_id` VARCHAR(50) COMMENT '项目fk' , + `parent_id` VARCHAR(50) DEFAULT 'NONE' COMMENT '父级fk' , + `version_id` VARCHAR(255) COMMENT '版本号' , + `source` VARCHAR(10) COMMENT '引用/复制/自定义' , + `config` VARCHAR(500) COMMENT '循环等组件基础数据' , + PRIMARY KEY (id) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '场景步骤'; + +CREATE INDEX idx_project_id ON api_scenario_step(project_id); +CREATE INDEX idx_sort ON api_scenario_step(sort); +CREATE INDEX idx_resource_id ON api_scenario_step(resource_id); +CREATE INDEX idx_enable ON api_scenario_step(enable); +CREATE INDEX idx_resource_num ON api_scenario_step(resource_num); + +CREATE TABLE IF NOT EXISTS api_scenario_step_blob( + `id` VARCHAR(50) NOT NULL COMMENT '场景步骤id' , + `content` LONGBLOB COMMENT '场景步骤内容' , + PRIMARY KEY (id) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '场景步骤内容'; + + CREATE TABLE IF NOT EXISTS api_scenario_follower( `api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' , `user_id` VARCHAR(50) NOT NULL COMMENT '关注人/用户fk' , @@ -236,26 +268,6 @@ CREATE INDEX idx_project_id ON api_scenario_module(project_id); CREATE INDEX idx_pos ON api_scenario_module(pos); CREATE UNIQUE INDEX uq_name_project_parent_type ON api_scenario_module (project_id, name, parent_id); - -CREATE TABLE IF NOT EXISTS api_scenario_reference( - `id` VARCHAR(50) NOT NULL COMMENT '引用关系pk' , - `api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' , - `create_time` BIGINT NOT NULL COMMENT '创建时间' , - `create_user` VARCHAR(50) NOT NULL COMMENT '创建人' , - `reference_id` VARCHAR(50) NOT NULL COMMENT '引用步骤fk' , - `reference_type` VARCHAR(20) COMMENT '引用步骤类型/REF/COPY' , - `data_type` VARCHAR(20) COMMENT '步骤类型/CASE/API' , - PRIMARY KEY (id) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT = '场景步骤引用CASE关系记录'; - - -CREATE INDEX idx_api_scenario_id ON api_scenario_reference(api_scenario_id); -CREATE INDEX idx_reference_id ON api_scenario_reference(reference_id); -CREATE INDEX idx_create_user ON api_scenario_reference(create_user); -CREATE INDEX idx_reference_type ON api_scenario_reference(reference_type); - CREATE TABLE IF NOT EXISTS api_scenario_report( `id` VARCHAR(50) NOT NULL COMMENT '场景报告pk' , `name` VARCHAR(255) NOT NULL COMMENT '报告名称' , diff --git a/backend/services/api-test/src/main/resources/apiGeneratorConfig.xml b/backend/services/api-test/src/main/resources/apiGeneratorConfig.xml index 29b03e1e09..a40dfc8c96 100644 --- a/backend/services/api-test/src/main/resources/apiGeneratorConfig.xml +++ b/backend/services/api-test/src/main/resources/apiGeneratorConfig.xml @@ -82,12 +82,18 @@
+
-
+
+ +
+ + +
+
-
diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiScenarioModuleControllerTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiScenarioModuleControllerTests.java index ce2cfcbf2d..3ae19e1526 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiScenarioModuleControllerTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiScenarioModuleControllerTests.java @@ -126,7 +126,6 @@ public class ApiScenarioModuleControllerTests extends BaseTest { scenario.setModuleId(moduleId); scenario.setStatus("未规划"); scenario.setPriority("P1"); - scenario.setPrincipal("admin"); scenario.setNum(NumGenerator.nextNum(project.getId(), ApplicationNumScope.API_SCENARIO)); scenario.setPos(0L); scenario.setLatest(true); diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ApiTestInterceptor.java b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ApiTestInterceptor.java index 70f963839b..cbda89bf95 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ApiTestInterceptor.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/config/interceptor/ApiTestInterceptor.java @@ -27,7 +27,7 @@ public class ApiTestInterceptor { configList.add(new MybatisInterceptorConfig(ApiReportBlob.class, "content", CompressUtils.class, "zip", "unzip")); configList.add(new MybatisInterceptorConfig(ApiReportBlob.class, "console", CompressUtils.class, "zip", "unzip")); // ApiScenarioBlob - configList.add(new MybatisInterceptorConfig(ApiScenarioBlob.class, "content", CompressUtils.class, "zip", "unzip")); + configList.add(new MybatisInterceptorConfig(ApiScenarioStepBlob.class, "content", CompressUtils.class, "zip", "unzip")); // ApiScenarioReportBlob configList.add(new MybatisInterceptorConfig(ApiScenarioReportDetail.class, "content", CompressUtils.class, "zip", "unzip")); // ApiScenarioReportLog diff --git a/backend/services/system-setting/src/test/resources/dml/init_aspect.sql b/backend/services/system-setting/src/test/resources/dml/init_aspect.sql index e8793be643..256bd23532 100644 --- a/backend/services/system-setting/src/test/resources/dml/init_aspect.sql +++ b/backend/services/system-setting/src/test/resources/dml/init_aspect.sql @@ -37,8 +37,8 @@ INSERT INTO functional_case_custom_field(case_id, field_id, value) VALUES ('aspe INSERT INTO api_definition(id, name, protocol, method, path, status, num, tags, pos, project_id, module_id, latest, version_id, ref_id, description, create_time, create_user, update_time, update_user, delete_user, delete_time, deleted) VALUES ('aspect_gyq_api_one', 'api_test','HTTP', 'POST','api/test','test-api-status', 1000001, null, 1, '100001100001' , 'test_module', true, 'v1.10','aspect_gyq_api_one', null, UNIX_TIMESTAMP() * 1000,'admin', UNIX_TIMESTAMP() * 1000,'admin', null,null,false); -INSERT INTO api_scenario(id, name, priority, status, principal, last_report_status, last_report_id, num, custom_num, pos, version_id, ref_id, project_id, module_id, description, tags, create_user, create_time, delete_time, delete_user, update_user, update_time) -VALUES ('aspect_gyq_api_scenario_one', 'api_scenario', 'p1', 'test-api-status', 'gyq', null, null,1000001, 1000001, 1,'v1.10', 'aspect_gyq_api_scenario_one','100001100001', 'test_module', null,null,'admin', UNIX_TIMESTAMP() * 1000,null,null,'admin', UNIX_TIMESTAMP() * 1000); +INSERT INTO api_scenario(id, name, priority, status, last_report_status, last_report_id, num, pos, version_id, ref_id, project_id, module_id, description, tags, create_user, create_time, delete_time, delete_user, update_user, update_time) +VALUES ('aspect_gyq_api_scenario_one', 'api_scenario', 'p1', 'test-api-status', null, null,1000001, 1,'v1.10', 'aspect_gyq_api_scenario_one','100001100001', 'test_module', null,null,'admin', UNIX_TIMESTAMP() * 1000,null,null,'admin', UNIX_TIMESTAMP() * 1000); INSERT INTO test_plan(id, project_id, parent_id, name, status, stage, tags, create_time, create_user, update_time, update_user, planned_start_time, planned_end_time, actual_start_time, actual_end_time, description) VALUES ('aspect_gyq_test_plan_one','100001100001', 'NONE', 'test_plan', 'test-api-status', 'Smock', null, UNIX_TIMESTAMP() * 1000, 'admin', UNIX_TIMESTAMP() * 1000, 'admin', UNIX_TIMESTAMP() * 2000, UNIX_TIMESTAMP() * 3000 ,UNIX_TIMESTAMP() * 2000, UNIX_TIMESTAMP() * 3000,null);