feat(接口测试): 添加场景步骤

This commit is contained in:
fit2-zhao 2024-01-11 14:46:21 +08:00 committed by Craftsman
parent 94c0efafbb
commit 789ab5a880
20 changed files with 1826 additions and 1387 deletions

View File

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

View File

@ -64,19 +64,50 @@ public class ApiScenarioExample {
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> tagsCriteria;
protected List<Criterion> allCriteria;
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
tagsCriteria = new ArrayList<Criterion>();
}
public List<Criterion> 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<String> value1, List<String> 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<Criterion> getAllCriteria() {
return criteria;
if (allCriteria == null) {
allCriteria = new ArrayList<Criterion>();
allCriteria.addAll(criteria);
allCriteria.addAll(tagsCriteria);
}
return allCriteria;
}
public List<Criterion> 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<String> values) {
addCriterion("principal in", values, "principal");
return (Criteria) this;
}
public Criteria andPrincipalNotIn(List<String> 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<String> values) {
addCriterion("custom_num in", values, "customNum");
return (Criteria) this;
}
public Criteria andCustomNumNotIn(List<String> 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<String> value) {
addTagsCriterion("tags =", value, "tags");
return (Criteria) this;
}
public Criteria andTagsNotEqualTo(String value) {
addCriterion("tags <>", value, "tags");
public Criteria andTagsNotEqualTo(List<String> value) {
addTagsCriterion("tags <>", value, "tags");
return (Criteria) this;
}
public Criteria andTagsGreaterThan(String value) {
addCriterion("tags >", value, "tags");
public Criteria andTagsGreaterThan(List<String> value) {
addTagsCriterion("tags >", value, "tags");
return (Criteria) this;
}
public Criteria andTagsGreaterThanOrEqualTo(String value) {
addCriterion("tags >=", value, "tags");
public Criteria andTagsGreaterThanOrEqualTo(List<String> value) {
addTagsCriterion("tags >=", value, "tags");
return (Criteria) this;
}
public Criteria andTagsLessThan(String value) {
addCriterion("tags <", value, "tags");
public Criteria andTagsLessThan(List<String> value) {
addTagsCriterion("tags <", value, "tags");
return (Criteria) this;
}
public Criteria andTagsLessThanOrEqualTo(String value) {
addCriterion("tags <=", value, "tags");
public Criteria andTagsLessThanOrEqualTo(List<String> value) {
addTagsCriterion("tags <=", value, "tags");
return (Criteria) this;
}
public Criteria andTagsLike(String value) {
addCriterion("tags like", value, "tags");
public Criteria andTagsLike(List<String> value) {
addTagsCriterion("tags like", value, "tags");
return (Criteria) this;
}
public Criteria andTagsNotLike(String value) {
addCriterion("tags not like", value, "tags");
public Criteria andTagsNotLike(List<String> value) {
addTagsCriterion("tags not like", value, "tags");
return (Criteria) this;
}
public Criteria andTagsIn(List<String> values) {
addCriterion("tags in", values, "tags");
public Criteria andTagsIn(List<List<String>> values) {
addTagsCriterion("tags in", values, "tags");
return (Criteria) this;
}
public Criteria andTagsNotIn(List<String> values) {
addCriterion("tags not in", values, "tags");
public Criteria andTagsNotIn(List<List<String>> 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<String> value1, List<String> 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<String> value1, List<String> value2) {
addTagsCriterion("tags not between", value1, value2, "tags");
return (Criteria) this;
}

View File

@ -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<Criteria> oredCriteria;
public ApiScenarioReferenceExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(String value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(String value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(String value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(String value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdLike(String value) {
addCriterion("id like", value, "id");
return (Criteria) this;
}
public Criteria andIdNotLike(String value) {
addCriterion("id not like", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(String value1, String value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria 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<String> values) {
addCriterion("api_scenario_id in", values, "apiScenarioId");
return (Criteria) this;
}
public Criteria andApiScenarioIdNotIn(List<String> 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<Long> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Long> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Long value1, Long value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateUserIsNull() {
addCriterion("create_user is null");
return (Criteria) this;
}
public Criteria andCreateUserIsNotNull() {
addCriterion("create_user is not null");
return (Criteria) this;
}
public Criteria andCreateUserEqualTo(String value) {
addCriterion("create_user =", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotEqualTo(String value) {
addCriterion("create_user <>", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserGreaterThan(String value) {
addCriterion("create_user >", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
addCriterion("create_user >=", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLessThan(String value) {
addCriterion("create_user <", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLessThanOrEqualTo(String value) {
addCriterion("create_user <=", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLike(String value) {
addCriterion("create_user like", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotLike(String value) {
addCriterion("create_user not like", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserIn(List<String> values) {
addCriterion("create_user in", values, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotIn(List<String> values) {
addCriterion("create_user not in", values, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserBetween(String value1, String value2) {
addCriterion("create_user between", value1, value2, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotBetween(String value1, String value2) {
addCriterion("create_user not between", value1, value2, "createUser");
return (Criteria) this;
}
public Criteria 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<String> values) {
addCriterion("reference_id in", values, "referenceId");
return (Criteria) this;
}
public Criteria andReferenceIdNotIn(List<String> 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<String> values) {
addCriterion("reference_type in", values, "referenceType");
return (Criteria) this;
}
public Criteria andReferenceTypeNotIn(List<String> 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<String> values) {
addCriterion("data_type in", values, "dataType");
return (Criteria) this;
}
public Criteria andDataTypeNotIn(List<String> 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);
}
}
}

View File

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

View File

@ -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 = "场景步骤内容")

View File

@ -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<Criteria> oredCriteria;
public ApiScenarioBlobExample() {
public ApiScenarioStepBlobExample() {
oredCriteria = new ArrayList<Criteria>();
}

View File

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

View File

@ -6,13 +6,11 @@
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="priority" jdbcType="VARCHAR" property="priority" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="principal" jdbcType="VARCHAR" property="principal" />
<result column="step_total" jdbcType="INTEGER" property="stepTotal" />
<result column="pass_rate" jdbcType="BIGINT" property="passRate" />
<result column="last_report_status" jdbcType="VARCHAR" property="lastReportStatus" />
<result column="last_report_id" jdbcType="VARCHAR" property="lastReportId" />
<result column="num" jdbcType="BIGINT" property="num" />
<result column="custom_num" jdbcType="VARCHAR" property="customNum" />
<result column="deleted" jdbcType="BIT" property="deleted" />
<result column="pos" jdbcType="BIGINT" property="pos" />
<result column="version_id" jdbcType="VARCHAR" property="versionId" />
@ -21,7 +19,7 @@
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="module_id" jdbcType="VARCHAR" property="moduleId" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="tags" jdbcType="VARCHAR" property="tags" />
<result column="tags" jdbcType="VARCHAR" property="tags" typeHandler="io.metersphere.handler.ListTypeHandler" />
<result column="grouped" jdbcType="BIT" property="grouped" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
@ -54,6 +52,25 @@
</when>
</choose>
</foreach>
<foreach collection="criteria.tagsCriteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value,typeHandler=io.metersphere.handler.ListTypeHandler}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value,typeHandler=io.metersphere.handler.ListTypeHandler} and #{criterion.secondValue,typeHandler=io.metersphere.handler.ListTypeHandler}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem,typeHandler=io.metersphere.handler.ListTypeHandler}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
@ -83,16 +100,34 @@
</when>
</choose>
</foreach>
<foreach collection="criteria.tagsCriteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value,typeHandler=io.metersphere.handler.ListTypeHandler}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value,typeHandler=io.metersphere.handler.ListTypeHandler} and #{criterion.secondValue,typeHandler=io.metersphere.handler.ListTypeHandler}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem,typeHandler=io.metersphere.handler.ListTypeHandler}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
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
</sql>
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiScenarioExample" resultMap="BaseResultMap">
select
@ -126,25 +161,23 @@
</delete>
<insert id="insert" parameterType="io.metersphere.api.domain.ApiScenario">
insert into api_scenario (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
)
`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)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{priority,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR}, #{stepTotal,jdbcType=INTEGER},
#{passRate,jdbcType=BIGINT}, #{lastReportStatus,jdbcType=VARCHAR}, #{lastReportId,jdbcType=VARCHAR},
#{num,jdbcType=BIGINT}, #{customNum,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT},
#{pos,jdbcType=BIGINT}, #{versionId,jdbcType=VARCHAR}, #{refId,jdbcType=VARCHAR},
#{latest,jdbcType=BIT}, #{projectId,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR}, #{grouped,jdbcType=BIT},
#{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{deleteTime,jdbcType=BIGINT},
#{deleteUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}
)
#{status,jdbcType=VARCHAR}, #{stepTotal,jdbcType=INTEGER}, #{passRate,jdbcType=BIGINT},
#{lastReportStatus,jdbcType=VARCHAR}, #{lastReportId,jdbcType=VARCHAR}, #{num,jdbcType=BIGINT},
#{deleted,jdbcType=BIT}, #{pos,jdbcType=BIGINT}, #{versionId,jdbcType=VARCHAR},
#{refId,jdbcType=VARCHAR}, #{latest,jdbcType=BIT}, #{projectId,jdbcType=VARCHAR},
#{moduleId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR,typeHandler=io.metersphere.handler.ListTypeHandler},
#{grouped,jdbcType=BIT}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
#{deleteTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR},
#{updateTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenario">
insert into api_scenario
@ -161,9 +194,6 @@
<if test="status != null">
`status`,
</if>
<if test="principal != null">
principal,
</if>
<if test="stepTotal != null">
step_total,
</if>
@ -179,9 +209,6 @@
<if test="num != null">
num,
</if>
<if test="customNum != null">
custom_num,
</if>
<if test="deleted != null">
deleted,
</if>
@ -244,9 +271,6 @@
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="principal != null">
#{principal,jdbcType=VARCHAR},
</if>
<if test="stepTotal != null">
#{stepTotal,jdbcType=INTEGER},
</if>
@ -262,9 +286,6 @@
<if test="num != null">
#{num,jdbcType=BIGINT},
</if>
<if test="customNum != null">
#{customNum,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
#{deleted,jdbcType=BIT},
</if>
@ -290,7 +311,7 @@
#{description,jdbcType=VARCHAR},
</if>
<if test="tags != null">
#{tags,jdbcType=VARCHAR},
#{tags,jdbcType=VARCHAR,typeHandler=io.metersphere.handler.ListTypeHandler},
</if>
<if test="grouped != null">
#{grouped,jdbcType=BIT},
@ -336,9 +357,6 @@
<if test="record.status != null">
`status` = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.principal != null">
principal = #{record.principal,jdbcType=VARCHAR},
</if>
<if test="record.stepTotal != null">
step_total = #{record.stepTotal,jdbcType=INTEGER},
</if>
@ -354,9 +372,6 @@
<if test="record.num != null">
num = #{record.num,jdbcType=BIGINT},
</if>
<if test="record.customNum != null">
custom_num = #{record.customNum,jdbcType=VARCHAR},
</if>
<if test="record.deleted != null">
deleted = #{record.deleted,jdbcType=BIT},
</if>
@ -382,7 +397,7 @@
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.tags != null">
tags = #{record.tags,jdbcType=VARCHAR},
tags = #{record.tags,jdbcType=VARCHAR,typeHandler=io.metersphere.handler.ListTypeHandler},
</if>
<if test="record.grouped != null">
grouped = #{record.grouped,jdbcType=BIT},
@ -416,13 +431,11 @@
`name` = #{record.name,jdbcType=VARCHAR},
priority = #{record.priority,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
principal = #{record.principal,jdbcType=VARCHAR},
step_total = #{record.stepTotal,jdbcType=INTEGER},
pass_rate = #{record.passRate,jdbcType=BIGINT},
last_report_status = #{record.lastReportStatus,jdbcType=VARCHAR},
last_report_id = #{record.lastReportId,jdbcType=VARCHAR},
num = #{record.num,jdbcType=BIGINT},
custom_num = #{record.customNum,jdbcType=VARCHAR},
deleted = #{record.deleted,jdbcType=BIT},
pos = #{record.pos,jdbcType=BIGINT},
version_id = #{record.versionId,jdbcType=VARCHAR},
@ -431,7 +444,7 @@
project_id = #{record.projectId,jdbcType=VARCHAR},
module_id = #{record.moduleId,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
tags = #{record.tags,jdbcType=VARCHAR},
tags = #{record.tags,jdbcType=VARCHAR,typeHandler=io.metersphere.handler.ListTypeHandler},
grouped = #{record.grouped,jdbcType=BIT},
create_user = #{record.createUser,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
@ -455,9 +468,6 @@
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="principal != null">
principal = #{principal,jdbcType=VARCHAR},
</if>
<if test="stepTotal != null">
step_total = #{stepTotal,jdbcType=INTEGER},
</if>
@ -473,9 +483,6 @@
<if test="num != null">
num = #{num,jdbcType=BIGINT},
</if>
<if test="customNum != null">
custom_num = #{customNum,jdbcType=VARCHAR},
</if>
<if test="deleted != null">
deleted = #{deleted,jdbcType=BIT},
</if>
@ -501,7 +508,7 @@
description = #{description,jdbcType=VARCHAR},
</if>
<if test="tags != null">
tags = #{tags,jdbcType=VARCHAR},
tags = #{tags,jdbcType=VARCHAR,typeHandler=io.metersphere.handler.ListTypeHandler},
</if>
<if test="grouped != null">
grouped = #{grouped,jdbcType=BIT},
@ -532,13 +539,11 @@
set `name` = #{name,jdbcType=VARCHAR},
priority = #{priority,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
principal = #{principal,jdbcType=VARCHAR},
step_total = #{stepTotal,jdbcType=INTEGER},
pass_rate = #{passRate,jdbcType=BIGINT},
last_report_status = #{lastReportStatus,jdbcType=VARCHAR},
last_report_id = #{lastReportId,jdbcType=VARCHAR},
num = #{num,jdbcType=BIGINT},
custom_num = #{customNum,jdbcType=VARCHAR},
deleted = #{deleted,jdbcType=BIT},
pos = #{pos,jdbcType=BIGINT},
version_id = #{versionId,jdbcType=VARCHAR},
@ -547,7 +552,7 @@
project_id = #{projectId,jdbcType=VARCHAR},
module_id = #{moduleId,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
tags = #{tags,jdbcType=VARCHAR},
tags = #{tags,jdbcType=VARCHAR,typeHandler=io.metersphere.handler.ListTypeHandler},
grouped = #{grouped,jdbcType=BIT},
create_user = #{createUser,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
@ -559,22 +564,22 @@
</update>
<insert id="batchInsert" parameterType="map">
insert into api_scenario
(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)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.priority,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR}, #{item.principal,jdbcType=VARCHAR}, #{item.stepTotal,jdbcType=INTEGER},
#{item.passRate,jdbcType=BIGINT}, #{item.lastReportStatus,jdbcType=VARCHAR}, #{item.lastReportId,jdbcType=VARCHAR},
#{item.num,jdbcType=BIGINT}, #{item.customNum,jdbcType=VARCHAR}, #{item.deleted,jdbcType=BIT},
#{item.pos,jdbcType=BIGINT}, #{item.versionId,jdbcType=VARCHAR}, #{item.refId,jdbcType=VARCHAR},
#{item.latest,jdbcType=BIT}, #{item.projectId,jdbcType=VARCHAR}, #{item.moduleId,jdbcType=VARCHAR},
#{item.description,jdbcType=VARCHAR}, #{item.tags,jdbcType=VARCHAR}, #{item.grouped,jdbcType=BIT},
#{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.deleteTime,jdbcType=BIGINT},
#{item.deleteUser,jdbcType=VARCHAR}, #{item.updateUser,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=BIGINT}
)
#{item.status,jdbcType=VARCHAR}, #{item.stepTotal,jdbcType=INTEGER}, #{item.passRate,jdbcType=BIGINT},
#{item.lastReportStatus,jdbcType=VARCHAR}, #{item.lastReportId,jdbcType=VARCHAR},
#{item.num,jdbcType=BIGINT}, #{item.deleted,jdbcType=BIT}, #{item.pos,jdbcType=BIGINT},
#{item.versionId,jdbcType=VARCHAR}, #{item.refId,jdbcType=VARCHAR}, #{item.latest,jdbcType=BIT},
#{item.projectId,jdbcType=VARCHAR}, #{item.moduleId,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR},
#{item.tags,jdbcType=VARCHAR,typeHandler=io.metersphere.handler.ListTypeHandler},
#{item.grouped,jdbcType=BIT}, #{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
#{item.deleteTime,jdbcType=BIGINT}, #{item.deleteUser,jdbcType=VARCHAR}, #{item.updateUser,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=BIGINT})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
@ -599,9 +604,6 @@
<if test="'status'.toString() == column.value">
#{item.status,jdbcType=VARCHAR}
</if>
<if test="'principal'.toString() == column.value">
#{item.principal,jdbcType=VARCHAR}
</if>
<if test="'step_total'.toString() == column.value">
#{item.stepTotal,jdbcType=INTEGER}
</if>
@ -617,9 +619,6 @@
<if test="'num'.toString() == column.value">
#{item.num,jdbcType=BIGINT}
</if>
<if test="'custom_num'.toString() == column.value">
#{item.customNum,jdbcType=VARCHAR}
</if>
<if test="'deleted'.toString() == column.value">
#{item.deleted,jdbcType=BIT}
</if>
@ -645,7 +644,7 @@
#{item.description,jdbcType=VARCHAR}
</if>
<if test="'tags'.toString() == column.value">
#{item.tags,jdbcType=VARCHAR}
#{item.tags,jdbcType=VARCHAR,typeHandler=io.metersphere.handler.ListTypeHandler}
</if>
<if test="'grouped'.toString() == column.value">
#{item.grouped,jdbcType=BIT}

View File

@ -1,34 +0,0 @@
package io.metersphere.api.mapper;
import io.metersphere.api.domain.ApiScenarioReference;
import io.metersphere.api.domain.ApiScenarioReferenceExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ApiScenarioReferenceMapper {
long countByExample(ApiScenarioReferenceExample example);
int deleteByExample(ApiScenarioReferenceExample example);
int deleteByPrimaryKey(String id);
int insert(ApiScenarioReference record);
int insertSelective(ApiScenarioReference record);
List<ApiScenarioReference> selectByExample(ApiScenarioReferenceExample example);
ApiScenarioReference selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") ApiScenarioReference record, @Param("example") ApiScenarioReferenceExample example);
int updateByExample(@Param("record") ApiScenarioReference record, @Param("example") ApiScenarioReferenceExample example);
int updateByPrimaryKeySelective(ApiScenarioReference record);
int updateByPrimaryKey(ApiScenarioReference record);
int batchInsert(@Param("list") List<ApiScenarioReference> list);
int batchInsertSelective(@Param("list") List<ApiScenarioReference> list, @Param("selective") ApiScenarioReference.Column ... selective);
}

View File

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

View File

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

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.api.mapper.ApiScenarioBlobMapper">
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiScenarioBlob">
<mapper namespace="io.metersphere.api.mapper.ApiScenarioStepBlobMapper">
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiScenarioStepBlob">
<id column="id" jdbcType="VARCHAR" property="id" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.api.domain.ApiScenarioBlob">
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.api.domain.ApiScenarioStepBlob">
<result column="content" jdbcType="LONGVARBINARY" property="content" />
</resultMap>
<sql id="Example_Where_Clause">
@ -71,7 +71,7 @@
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.api.domain.ApiScenarioBlobExample" resultMap="ResultMapWithBLOBs">
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.api.domain.ApiScenarioStepBlobExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
@ -79,7 +79,7 @@
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from api_scenario_blob
from api_scenario_step_blob
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
@ -87,13 +87,13 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiScenarioBlobExample" resultMap="BaseResultMap">
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiScenarioStepBlobExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from api_scenario_blob
from api_scenario_step_blob
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
@ -106,25 +106,25 @@
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from api_scenario_blob
from api_scenario_step_blob
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from api_scenario_blob
delete from api_scenario_step_blob
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.api.domain.ApiScenarioBlobExample">
delete from api_scenario_blob
<delete id="deleteByExample" parameterType="io.metersphere.api.domain.ApiScenarioStepBlobExample">
delete from api_scenario_step_blob
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.api.domain.ApiScenarioBlob">
insert into api_scenario_blob (id, content)
<insert id="insert" parameterType="io.metersphere.api.domain.ApiScenarioStepBlob">
insert into api_scenario_step_blob (id, content)
values (#{id,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARBINARY})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenarioBlob">
insert into api_scenario_blob
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenarioStepBlob">
insert into api_scenario_step_blob
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
@ -142,14 +142,14 @@
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiScenarioBlobExample" resultType="java.lang.Long">
select count(*) from api_scenario_blob
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiScenarioStepBlobExample" resultType="java.lang.Long">
select count(*) from api_scenario_step_blob
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update api_scenario_blob
update api_scenario_step_blob
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
@ -163,7 +163,7 @@
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update api_scenario_blob
update api_scenario_step_blob
set id = #{record.id,jdbcType=VARCHAR},
content = #{record.content,jdbcType=LONGVARBINARY}
<if test="_parameter != null">
@ -171,14 +171,14 @@
</if>
</update>
<update id="updateByExample" parameterType="map">
update api_scenario_blob
update api_scenario_step_blob
set id = #{record.id,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiScenarioBlob">
update api_scenario_blob
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiScenarioStepBlob">
update api_scenario_step_blob
<set>
<if test="content != null">
content = #{content,jdbcType=LONGVARBINARY},
@ -186,13 +186,13 @@
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.api.domain.ApiScenarioBlob">
update api_scenario_blob
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.api.domain.ApiScenarioStepBlob">
update api_scenario_step_blob
set content = #{content,jdbcType=LONGVARBINARY}
where id = #{id,jdbcType=VARCHAR}
</update>
<insert id="batchInsert" parameterType="map">
insert into api_scenario_blob
insert into api_scenario_step_blob
(id, content)
values
<foreach collection="list" item="item" separator=",">
@ -200,7 +200,7 @@
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
insert into api_scenario_blob (
insert into api_scenario_step_blob (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>

View File

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

View File

@ -0,0 +1,404 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.api.mapper.ApiScenarioStepMapper">
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiScenarioStep">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="scenario_id" jdbcType="VARCHAR" property="scenarioId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="sort" jdbcType="BIGINT" property="sort" />
<result column="enable" jdbcType="BIT" property="enable" />
<result column="resource_id" jdbcType="BIGINT" property="resourceId" />
<result column="resource_num" jdbcType="VARCHAR" property="resourceNum" />
<result column="step_type" jdbcType="VARCHAR" property="stepType" />
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
<result column="version_id" jdbcType="VARCHAR" property="versionId" />
<result column="source" jdbcType="VARCHAR" property="source" />
<result column="config" jdbcType="VARCHAR" property="config" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, scenario_id, `name`, sort, `enable`, resource_id, resource_num, step_type, project_id,
parent_id, version_id, `source`, config
</sql>
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiScenarioStepExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from api_scenario_step
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from api_scenario_step
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from api_scenario_step
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.api.domain.ApiScenarioStepExample">
delete from api_scenario_step
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.api.domain.ApiScenarioStep">
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>
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenarioStep">
insert into api_scenario_step
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="scenarioId != null">
scenario_id,
</if>
<if test="name != null">
`name`,
</if>
<if test="sort != null">
sort,
</if>
<if test="enable != null">
`enable`,
</if>
<if test="resourceId != null">
resource_id,
</if>
<if test="resourceNum != null">
resource_num,
</if>
<if test="stepType != null">
step_type,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="versionId != null">
version_id,
</if>
<if test="source != null">
`source`,
</if>
<if test="config != null">
config,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="scenarioId != null">
#{scenarioId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=BIGINT},
</if>
<if test="enable != null">
#{enable,jdbcType=BIT},
</if>
<if test="resourceId != null">
#{resourceId,jdbcType=BIGINT},
</if>
<if test="resourceNum != null">
#{resourceNum,jdbcType=VARCHAR},
</if>
<if test="stepType != null">
#{stepType,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
#{parentId,jdbcType=VARCHAR},
</if>
<if test="versionId != null">
#{versionId,jdbcType=VARCHAR},
</if>
<if test="source != null">
#{source,jdbcType=VARCHAR},
</if>
<if test="config != null">
#{config,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiScenarioStepExample" resultType="java.lang.Long">
select count(*) from api_scenario_step
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update api_scenario_step
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.scenarioId != null">
scenario_id = #{record.scenarioId,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=BIGINT},
</if>
<if test="record.enable != null">
`enable` = #{record.enable,jdbcType=BIT},
</if>
<if test="record.resourceId != null">
resource_id = #{record.resourceId,jdbcType=BIGINT},
</if>
<if test="record.resourceNum != null">
resource_num = #{record.resourceNum,jdbcType=VARCHAR},
</if>
<if test="record.stepType != null">
step_type = #{record.stepType,jdbcType=VARCHAR},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=VARCHAR},
</if>
<if test="record.parentId != null">
parent_id = #{record.parentId,jdbcType=VARCHAR},
</if>
<if test="record.versionId != null">
version_id = #{record.versionId,jdbcType=VARCHAR},
</if>
<if test="record.source != null">
`source` = #{record.source,jdbcType=VARCHAR},
</if>
<if test="record.config != null">
config = #{record.config,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiScenarioStep">
update api_scenario_step
<set>
<if test="scenarioId != null">
scenario_id = #{scenarioId,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=BIGINT},
</if>
<if test="enable != null">
`enable` = #{enable,jdbcType=BIT},
</if>
<if test="resourceId != null">
resource_id = #{resourceId,jdbcType=BIGINT},
</if>
<if test="resourceNum != null">
resource_num = #{resourceNum,jdbcType=VARCHAR},
</if>
<if test="stepType != null">
step_type = #{stepType,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=VARCHAR},
</if>
<if test="versionId != null">
version_id = #{versionId,jdbcType=VARCHAR},
</if>
<if test="source != null">
`source` = #{source,jdbcType=VARCHAR},
</if>
<if test="config != null">
config = #{config,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.api.domain.ApiScenarioStep">
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}
</update>
<insert id="batchInsert" parameterType="map">
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
<foreach collection="list" item="item" separator=",">
(#{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})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
insert into api_scenario_step (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=VARCHAR}
</if>
<if test="'scenario_id'.toString() == column.value">
#{item.scenarioId,jdbcType=VARCHAR}
</if>
<if test="'name'.toString() == column.value">
#{item.name,jdbcType=VARCHAR}
</if>
<if test="'sort'.toString() == column.value">
#{item.sort,jdbcType=BIGINT}
</if>
<if test="'enable'.toString() == column.value">
#{item.enable,jdbcType=BIT}
</if>
<if test="'resource_id'.toString() == column.value">
#{item.resourceId,jdbcType=BIGINT}
</if>
<if test="'resource_num'.toString() == column.value">
#{item.resourceNum,jdbcType=VARCHAR}
</if>
<if test="'step_type'.toString() == column.value">
#{item.stepType,jdbcType=VARCHAR}
</if>
<if test="'project_id'.toString() == column.value">
#{item.projectId,jdbcType=VARCHAR}
</if>
<if test="'parent_id'.toString() == column.value">
#{item.parentId,jdbcType=VARCHAR}
</if>
<if test="'version_id'.toString() == column.value">
#{item.versionId,jdbcType=VARCHAR}
</if>
<if test="'source'.toString() == column.value">
#{item.source,jdbcType=VARCHAR}
</if>
<if test="'config'.toString() == column.value">
#{item.config,jdbcType=VARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

View File

@ -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 '报告名称' ,

View File

@ -82,12 +82,18 @@
<table tableName="api_environment_config"/>
<table tableName="api_report"/>
<table tableName="api_report_blob"/>
<table tableName="api_scenario"/>
<table tableName="api_scenario_blob"/>
<table tableName="api_scenario">
<columnOverride column="tags" javaType="java.util.List&lt;String&gt;" jdbcType="VARCHAR" typeHandler="io.metersphere.handler.ListTypeHandler" />
</table>
<table tableName="api_scenario_step"/>
<table tableName="api_scenario_step_blob"/>
<table tableName="api_scenario_environment"/>
<table tableName="api_scenario_follower"/>
<table tableName="api_scenario_module"/>
<table tableName="api_scenario_reference"/>
<table tableName="api_scenario_report"/>
<table tableName="api_scenario_report_detail"/>
<table tableName="api_scenario_report_log"/>

View File

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

View File

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

View File

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