refactor(测试计划): 优化独立报告生成逻辑
This commit is contained in:
parent
f8d69c4ed6
commit
2677aa976f
|
@ -41,7 +41,7 @@ public class TestPlanReport implements Serializable {
|
||||||
@Schema(description = "开始时间;计划开始执行的时间")
|
@Schema(description = "开始时间;计划开始执行的时间")
|
||||||
private Long startTime;
|
private Long startTime;
|
||||||
|
|
||||||
@Schema(description = "结束时间;计划执行结束的时间")
|
@Schema(description = "结束时间;计划结束执行的时间")
|
||||||
private Long endTime;
|
private Long endTime;
|
||||||
|
|
||||||
@Schema(description = "执行状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "执行状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ -79,6 +79,12 @@ public class TestPlanReport implements Serializable {
|
||||||
@NotNull(message = "{test_plan_report.deleted.not_blank}", groups = {Created.class})
|
@NotNull(message = "{test_plan_report.deleted.not_blank}", groups = {Created.class})
|
||||||
private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
|
@Schema(description = "执行率")
|
||||||
|
private Double executeRate;
|
||||||
|
|
||||||
|
@Schema(description = "独立报告的父级ID")
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public enum Column {
|
public enum Column {
|
||||||
|
@ -97,7 +103,9 @@ public class TestPlanReport implements Serializable {
|
||||||
passThreshold("pass_threshold", "passThreshold", "DECIMAL", false),
|
passThreshold("pass_threshold", "passThreshold", "DECIMAL", false),
|
||||||
projectId("project_id", "projectId", "VARCHAR", false),
|
projectId("project_id", "projectId", "VARCHAR", false),
|
||||||
integrated("integrated", "integrated", "BIT", false),
|
integrated("integrated", "integrated", "BIT", false),
|
||||||
deleted("deleted", "deleted", "BIT", false);
|
deleted("deleted", "deleted", "BIT", false),
|
||||||
|
executeRate("execute_rate", "executeRate", "DECIMAL", false),
|
||||||
|
parentId("parent_id", "parentId", "VARCHAR", false);
|
||||||
|
|
||||||
private static final String BEGINNING_DELIMITER = "`";
|
private static final String BEGINNING_DELIMITER = "`";
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,141 @@
|
||||||
|
package io.metersphere.plan.domain;
|
||||||
|
|
||||||
|
import io.metersphere.validation.groups.Created;
|
||||||
|
import io.metersphere.validation.groups.Updated;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TestPlanReportApiCase implements Serializable {
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_case.id.not_blank}", groups = {Updated.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_case.id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Schema(description = "测试计划报告ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_case.test_plan_report_id.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_case.test_plan_report_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String testPlanReportId;
|
||||||
|
|
||||||
|
@Schema(description = "测试计划接口用例关联ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_case.test_plan_api_case_id.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_case.test_plan_api_case_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String testPlanApiCaseId;
|
||||||
|
|
||||||
|
@Schema(description = "接口用例ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_case.api_case_id.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_case.api_case_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String apiCaseId;
|
||||||
|
|
||||||
|
@Schema(description = "接口用例业务ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "{test_plan_report_api_case.api_case_num.not_blank}", groups = {Created.class})
|
||||||
|
private Long apiCaseNum;
|
||||||
|
|
||||||
|
@Schema(description = "接口用例名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_case.api_case_name.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 255, message = "{test_plan_report_api_case.api_case_name.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String apiCaseName;
|
||||||
|
|
||||||
|
@Schema(description = "接口用例所属模块")
|
||||||
|
private String apiCaseModule;
|
||||||
|
|
||||||
|
@Schema(description = "接口用例等级")
|
||||||
|
private String apiCasePriority;
|
||||||
|
|
||||||
|
@Schema(description = "接口用例执行人")
|
||||||
|
private String apiCaseExecuteUser;
|
||||||
|
|
||||||
|
@Schema(description = "接口用例执行结果", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_case.api_case_execute_result.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_case.api_case_execute_result.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String apiCaseExecuteResult;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public enum Column {
|
||||||
|
id("id", "id", "VARCHAR", false),
|
||||||
|
testPlanReportId("test_plan_report_id", "testPlanReportId", "VARCHAR", false),
|
||||||
|
testPlanApiCaseId("test_plan_api_case_id", "testPlanApiCaseId", "VARCHAR", false),
|
||||||
|
apiCaseId("api_case_id", "apiCaseId", "VARCHAR", false),
|
||||||
|
apiCaseNum("api_case_num", "apiCaseNum", "BIGINT", false),
|
||||||
|
apiCaseName("api_case_name", "apiCaseName", "VARCHAR", false),
|
||||||
|
apiCaseModule("api_case_module", "apiCaseModule", "VARCHAR", false),
|
||||||
|
apiCasePriority("api_case_priority", "apiCasePriority", "VARCHAR", false),
|
||||||
|
apiCaseExecuteUser("api_case_execute_user", "apiCaseExecuteUser", "VARCHAR", false),
|
||||||
|
apiCaseExecuteResult("api_case_execute_result", "apiCaseExecuteResult", "VARCHAR", false);
|
||||||
|
|
||||||
|
private static final String BEGINNING_DELIMITER = "`";
|
||||||
|
|
||||||
|
private static final String ENDING_DELIMITER = "`";
|
||||||
|
|
||||||
|
private final String column;
|
||||||
|
|
||||||
|
private final boolean isColumnNameDelimited;
|
||||||
|
|
||||||
|
private final String javaProperty;
|
||||||
|
|
||||||
|
private final String jdbcType;
|
||||||
|
|
||||||
|
public String value() {
|
||||||
|
return this.column;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return this.column;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJavaProperty() {
|
||||||
|
return this.javaProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJdbcType() {
|
||||||
|
return this.jdbcType;
|
||||||
|
}
|
||||||
|
|
||||||
|
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||||
|
this.column = column;
|
||||||
|
this.javaProperty = javaProperty;
|
||||||
|
this.jdbcType = jdbcType;
|
||||||
|
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String desc() {
|
||||||
|
return this.getEscapedColumnName() + " DESC";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String asc() {
|
||||||
|
return this.getEscapedColumnName() + " ASC";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Column[] excludes(Column ... excludes) {
|
||||||
|
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||||
|
if (excludes != null && excludes.length > 0) {
|
||||||
|
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||||
|
}
|
||||||
|
return columns.toArray(new Column[]{});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Column[] all() {
|
||||||
|
return Column.values();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEscapedColumnName() {
|
||||||
|
if (this.isColumnNameDelimited) {
|
||||||
|
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||||
|
} else {
|
||||||
|
return this.column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAliasedEscapedColumnName() {
|
||||||
|
return this.getEscapedColumnName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,890 @@
|
||||||
|
package io.metersphere.plan.domain;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class TestPlanReportApiCaseExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
public TestPlanReportApiCaseExample() {
|
||||||
|
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 andTestPlanReportIdIsNull() {
|
||||||
|
addCriterion("test_plan_report_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdIsNotNull() {
|
||||||
|
addCriterion("test_plan_report_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_report_id =", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdNotEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_report_id <>", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdGreaterThan(String value) {
|
||||||
|
addCriterion("test_plan_report_id >", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_report_id >=", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdLessThan(String value) {
|
||||||
|
addCriterion("test_plan_report_id <", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_report_id <=", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdLike(String value) {
|
||||||
|
addCriterion("test_plan_report_id like", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdNotLike(String value) {
|
||||||
|
addCriterion("test_plan_report_id not like", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdIn(List<String> values) {
|
||||||
|
addCriterion("test_plan_report_id in", values, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdNotIn(List<String> values) {
|
||||||
|
addCriterion("test_plan_report_id not in", values, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("test_plan_report_id between", value1, value2, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("test_plan_report_id not between", value1, value2, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdIsNull() {
|
||||||
|
addCriterion("test_plan_api_case_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdIsNotNull() {
|
||||||
|
addCriterion("test_plan_api_case_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_api_case_id =", value, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdNotEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_api_case_id <>", value, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdGreaterThan(String value) {
|
||||||
|
addCriterion("test_plan_api_case_id >", value, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_api_case_id >=", value, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdLessThan(String value) {
|
||||||
|
addCriterion("test_plan_api_case_id <", value, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_api_case_id <=", value, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdLike(String value) {
|
||||||
|
addCriterion("test_plan_api_case_id like", value, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdNotLike(String value) {
|
||||||
|
addCriterion("test_plan_api_case_id not like", value, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdIn(List<String> values) {
|
||||||
|
addCriterion("test_plan_api_case_id in", values, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdNotIn(List<String> values) {
|
||||||
|
addCriterion("test_plan_api_case_id not in", values, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("test_plan_api_case_id between", value1, value2, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiCaseIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("test_plan_api_case_id not between", value1, value2, "testPlanApiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdIsNull() {
|
||||||
|
addCriterion("api_case_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdIsNotNull() {
|
||||||
|
addCriterion("api_case_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdEqualTo(String value) {
|
||||||
|
addCriterion("api_case_id =", value, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdNotEqualTo(String value) {
|
||||||
|
addCriterion("api_case_id <>", value, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdGreaterThan(String value) {
|
||||||
|
addCriterion("api_case_id >", value, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_id >=", value, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdLessThan(String value) {
|
||||||
|
addCriterion("api_case_id <", value, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_id <=", value, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdLike(String value) {
|
||||||
|
addCriterion("api_case_id like", value, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdNotLike(String value) {
|
||||||
|
addCriterion("api_case_id not like", value, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdIn(List<String> values) {
|
||||||
|
addCriterion("api_case_id in", values, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdNotIn(List<String> values) {
|
||||||
|
addCriterion("api_case_id not in", values, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_id between", value1, value2, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_id not between", value1, value2, "apiCaseId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumIsNull() {
|
||||||
|
addCriterion("api_case_num is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumIsNotNull() {
|
||||||
|
addCriterion("api_case_num is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumEqualTo(Long value) {
|
||||||
|
addCriterion("api_case_num =", value, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumNotEqualTo(Long value) {
|
||||||
|
addCriterion("api_case_num <>", value, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumGreaterThan(Long value) {
|
||||||
|
addCriterion("api_case_num >", value, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("api_case_num >=", value, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumLessThan(Long value) {
|
||||||
|
addCriterion("api_case_num <", value, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("api_case_num <=", value, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumIn(List<Long> values) {
|
||||||
|
addCriterion("api_case_num in", values, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumNotIn(List<Long> values) {
|
||||||
|
addCriterion("api_case_num not in", values, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("api_case_num between", value1, value2, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNumNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("api_case_num not between", value1, value2, "apiCaseNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameIsNull() {
|
||||||
|
addCriterion("api_case_name is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameIsNotNull() {
|
||||||
|
addCriterion("api_case_name is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameEqualTo(String value) {
|
||||||
|
addCriterion("api_case_name =", value, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameNotEqualTo(String value) {
|
||||||
|
addCriterion("api_case_name <>", value, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameGreaterThan(String value) {
|
||||||
|
addCriterion("api_case_name >", value, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_name >=", value, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameLessThan(String value) {
|
||||||
|
addCriterion("api_case_name <", value, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_name <=", value, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameLike(String value) {
|
||||||
|
addCriterion("api_case_name like", value, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameNotLike(String value) {
|
||||||
|
addCriterion("api_case_name not like", value, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameIn(List<String> values) {
|
||||||
|
addCriterion("api_case_name in", values, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameNotIn(List<String> values) {
|
||||||
|
addCriterion("api_case_name not in", values, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_name between", value1, value2, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseNameNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_name not between", value1, value2, "apiCaseName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleIsNull() {
|
||||||
|
addCriterion("api_case_module is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleIsNotNull() {
|
||||||
|
addCriterion("api_case_module is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleEqualTo(String value) {
|
||||||
|
addCriterion("api_case_module =", value, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleNotEqualTo(String value) {
|
||||||
|
addCriterion("api_case_module <>", value, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleGreaterThan(String value) {
|
||||||
|
addCriterion("api_case_module >", value, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_module >=", value, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleLessThan(String value) {
|
||||||
|
addCriterion("api_case_module <", value, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_module <=", value, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleLike(String value) {
|
||||||
|
addCriterion("api_case_module like", value, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleNotLike(String value) {
|
||||||
|
addCriterion("api_case_module not like", value, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleIn(List<String> values) {
|
||||||
|
addCriterion("api_case_module in", values, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleNotIn(List<String> values) {
|
||||||
|
addCriterion("api_case_module not in", values, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_module between", value1, value2, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseModuleNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_module not between", value1, value2, "apiCaseModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityIsNull() {
|
||||||
|
addCriterion("api_case_priority is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityIsNotNull() {
|
||||||
|
addCriterion("api_case_priority is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityEqualTo(String value) {
|
||||||
|
addCriterion("api_case_priority =", value, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityNotEqualTo(String value) {
|
||||||
|
addCriterion("api_case_priority <>", value, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityGreaterThan(String value) {
|
||||||
|
addCriterion("api_case_priority >", value, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_priority >=", value, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityLessThan(String value) {
|
||||||
|
addCriterion("api_case_priority <", value, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_priority <=", value, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityLike(String value) {
|
||||||
|
addCriterion("api_case_priority like", value, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityNotLike(String value) {
|
||||||
|
addCriterion("api_case_priority not like", value, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityIn(List<String> values) {
|
||||||
|
addCriterion("api_case_priority in", values, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityNotIn(List<String> values) {
|
||||||
|
addCriterion("api_case_priority not in", values, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_priority between", value1, value2, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCasePriorityNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_priority not between", value1, value2, "apiCasePriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserIsNull() {
|
||||||
|
addCriterion("api_case_execute_user is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserIsNotNull() {
|
||||||
|
addCriterion("api_case_execute_user is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserEqualTo(String value) {
|
||||||
|
addCriterion("api_case_execute_user =", value, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserNotEqualTo(String value) {
|
||||||
|
addCriterion("api_case_execute_user <>", value, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserGreaterThan(String value) {
|
||||||
|
addCriterion("api_case_execute_user >", value, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_execute_user >=", value, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserLessThan(String value) {
|
||||||
|
addCriterion("api_case_execute_user <", value, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_execute_user <=", value, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserLike(String value) {
|
||||||
|
addCriterion("api_case_execute_user like", value, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserNotLike(String value) {
|
||||||
|
addCriterion("api_case_execute_user not like", value, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserIn(List<String> values) {
|
||||||
|
addCriterion("api_case_execute_user in", values, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserNotIn(List<String> values) {
|
||||||
|
addCriterion("api_case_execute_user not in", values, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_execute_user between", value1, value2, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteUserNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_execute_user not between", value1, value2, "apiCaseExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultIsNull() {
|
||||||
|
addCriterion("api_case_execute_result is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultIsNotNull() {
|
||||||
|
addCriterion("api_case_execute_result is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultEqualTo(String value) {
|
||||||
|
addCriterion("api_case_execute_result =", value, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultNotEqualTo(String value) {
|
||||||
|
addCriterion("api_case_execute_result <>", value, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultGreaterThan(String value) {
|
||||||
|
addCriterion("api_case_execute_result >", value, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_execute_result >=", value, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultLessThan(String value) {
|
||||||
|
addCriterion("api_case_execute_result <", value, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_case_execute_result <=", value, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultLike(String value) {
|
||||||
|
addCriterion("api_case_execute_result like", value, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultNotLike(String value) {
|
||||||
|
addCriterion("api_case_execute_result not like", value, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultIn(List<String> values) {
|
||||||
|
addCriterion("api_case_execute_result in", values, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultNotIn(List<String> values) {
|
||||||
|
addCriterion("api_case_execute_result not in", values, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_execute_result between", value1, value2, "apiCaseExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiCaseExecuteResultNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_case_execute_result not between", value1, value2, "apiCaseExecuteResult");
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,141 @@
|
||||||
|
package io.metersphere.plan.domain;
|
||||||
|
|
||||||
|
import io.metersphere.validation.groups.Created;
|
||||||
|
import io.metersphere.validation.groups.Updated;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TestPlanReportApiScenario implements Serializable {
|
||||||
|
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_scenario.id.not_blank}", groups = {Updated.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Schema(description = "测试计划报告ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_scenario.test_plan_report_id.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.test_plan_report_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String testPlanReportId;
|
||||||
|
|
||||||
|
@Schema(description = "测试计划场景用例关联ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_scenario.test_plan_api_scenario_id.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.test_plan_api_scenario_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String testPlanApiScenarioId;
|
||||||
|
|
||||||
|
@Schema(description = "场景用例ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_scenario.api_scenario_id.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.api_scenario_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String apiScenarioId;
|
||||||
|
|
||||||
|
@Schema(description = "场景用例业务ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "{test_plan_report_api_scenario.api_scenario_num.not_blank}", groups = {Created.class})
|
||||||
|
private Long apiScenarioNum;
|
||||||
|
|
||||||
|
@Schema(description = "场景用例名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_scenario.api_scenario_name.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 255, message = "{test_plan_report_api_scenario.api_scenario_name.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String apiScenarioName;
|
||||||
|
|
||||||
|
@Schema(description = "场景用例所属模块")
|
||||||
|
private String apiScenarioModule;
|
||||||
|
|
||||||
|
@Schema(description = "场景用例等级")
|
||||||
|
private String apiScenarioPriority;
|
||||||
|
|
||||||
|
@Schema(description = "场景用例执行人")
|
||||||
|
private String apiScenarioExecuteUser;
|
||||||
|
|
||||||
|
@Schema(description = "场景用例执行结果", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{test_plan_report_api_scenario.api_scenario_execute_result.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{test_plan_report_api_scenario.api_scenario_execute_result.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String apiScenarioExecuteResult;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public enum Column {
|
||||||
|
id("id", "id", "VARCHAR", false),
|
||||||
|
testPlanReportId("test_plan_report_id", "testPlanReportId", "VARCHAR", false),
|
||||||
|
testPlanApiScenarioId("test_plan_api_scenario_id", "testPlanApiScenarioId", "VARCHAR", false),
|
||||||
|
apiScenarioId("api_scenario_id", "apiScenarioId", "VARCHAR", false),
|
||||||
|
apiScenarioNum("api_scenario_num", "apiScenarioNum", "BIGINT", false),
|
||||||
|
apiScenarioName("api_scenario_name", "apiScenarioName", "VARCHAR", false),
|
||||||
|
apiScenarioModule("api_scenario_module", "apiScenarioModule", "VARCHAR", false),
|
||||||
|
apiScenarioPriority("api_scenario_priority", "apiScenarioPriority", "VARCHAR", false),
|
||||||
|
apiScenarioExecuteUser("api_scenario_execute_user", "apiScenarioExecuteUser", "VARCHAR", false),
|
||||||
|
apiScenarioExecuteResult("api_scenario_execute_result", "apiScenarioExecuteResult", "VARCHAR", false);
|
||||||
|
|
||||||
|
private static final String BEGINNING_DELIMITER = "`";
|
||||||
|
|
||||||
|
private static final String ENDING_DELIMITER = "`";
|
||||||
|
|
||||||
|
private final String column;
|
||||||
|
|
||||||
|
private final boolean isColumnNameDelimited;
|
||||||
|
|
||||||
|
private final String javaProperty;
|
||||||
|
|
||||||
|
private final String jdbcType;
|
||||||
|
|
||||||
|
public String value() {
|
||||||
|
return this.column;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return this.column;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJavaProperty() {
|
||||||
|
return this.javaProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJdbcType() {
|
||||||
|
return this.jdbcType;
|
||||||
|
}
|
||||||
|
|
||||||
|
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||||
|
this.column = column;
|
||||||
|
this.javaProperty = javaProperty;
|
||||||
|
this.jdbcType = jdbcType;
|
||||||
|
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String desc() {
|
||||||
|
return this.getEscapedColumnName() + " DESC";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String asc() {
|
||||||
|
return this.getEscapedColumnName() + " ASC";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Column[] excludes(Column ... excludes) {
|
||||||
|
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||||
|
if (excludes != null && excludes.length > 0) {
|
||||||
|
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||||
|
}
|
||||||
|
return columns.toArray(new Column[]{});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Column[] all() {
|
||||||
|
return Column.values();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEscapedColumnName() {
|
||||||
|
if (this.isColumnNameDelimited) {
|
||||||
|
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||||
|
} else {
|
||||||
|
return this.column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAliasedEscapedColumnName() {
|
||||||
|
return this.getEscapedColumnName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,890 @@
|
||||||
|
package io.metersphere.plan.domain;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class TestPlanReportApiScenarioExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
public TestPlanReportApiScenarioExample() {
|
||||||
|
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 andTestPlanReportIdIsNull() {
|
||||||
|
addCriterion("test_plan_report_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdIsNotNull() {
|
||||||
|
addCriterion("test_plan_report_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_report_id =", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdNotEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_report_id <>", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdGreaterThan(String value) {
|
||||||
|
addCriterion("test_plan_report_id >", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_report_id >=", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdLessThan(String value) {
|
||||||
|
addCriterion("test_plan_report_id <", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_report_id <=", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdLike(String value) {
|
||||||
|
addCriterion("test_plan_report_id like", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdNotLike(String value) {
|
||||||
|
addCriterion("test_plan_report_id not like", value, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdIn(List<String> values) {
|
||||||
|
addCriterion("test_plan_report_id in", values, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdNotIn(List<String> values) {
|
||||||
|
addCriterion("test_plan_report_id not in", values, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("test_plan_report_id between", value1, value2, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanReportIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("test_plan_report_id not between", value1, value2, "testPlanReportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdIsNull() {
|
||||||
|
addCriterion("test_plan_api_scenario_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdIsNotNull() {
|
||||||
|
addCriterion("test_plan_api_scenario_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_api_scenario_id =", value, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdNotEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_api_scenario_id <>", value, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdGreaterThan(String value) {
|
||||||
|
addCriterion("test_plan_api_scenario_id >", value, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_api_scenario_id >=", value, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdLessThan(String value) {
|
||||||
|
addCriterion("test_plan_api_scenario_id <", value, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("test_plan_api_scenario_id <=", value, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdLike(String value) {
|
||||||
|
addCriterion("test_plan_api_scenario_id like", value, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdNotLike(String value) {
|
||||||
|
addCriterion("test_plan_api_scenario_id not like", value, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdIn(List<String> values) {
|
||||||
|
addCriterion("test_plan_api_scenario_id in", values, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdNotIn(List<String> values) {
|
||||||
|
addCriterion("test_plan_api_scenario_id not in", values, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("test_plan_api_scenario_id between", value1, value2, "testPlanApiScenarioId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTestPlanApiScenarioIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("test_plan_api_scenario_id not between", value1, value2, "testPlanApiScenarioId");
|
||||||
|
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 andApiScenarioNumIsNull() {
|
||||||
|
addCriterion("api_scenario_num is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumIsNotNull() {
|
||||||
|
addCriterion("api_scenario_num is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumEqualTo(Long value) {
|
||||||
|
addCriterion("api_scenario_num =", value, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumNotEqualTo(Long value) {
|
||||||
|
addCriterion("api_scenario_num <>", value, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumGreaterThan(Long value) {
|
||||||
|
addCriterion("api_scenario_num >", value, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("api_scenario_num >=", value, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumLessThan(Long value) {
|
||||||
|
addCriterion("api_scenario_num <", value, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("api_scenario_num <=", value, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumIn(List<Long> values) {
|
||||||
|
addCriterion("api_scenario_num in", values, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumNotIn(List<Long> values) {
|
||||||
|
addCriterion("api_scenario_num not in", values, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("api_scenario_num between", value1, value2, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNumNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("api_scenario_num not between", value1, value2, "apiScenarioNum");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameIsNull() {
|
||||||
|
addCriterion("api_scenario_name is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameIsNotNull() {
|
||||||
|
addCriterion("api_scenario_name is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_name =", value, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameNotEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_name <>", value, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameGreaterThan(String value) {
|
||||||
|
addCriterion("api_scenario_name >", value, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_name >=", value, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameLessThan(String value) {
|
||||||
|
addCriterion("api_scenario_name <", value, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_name <=", value, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameLike(String value) {
|
||||||
|
addCriterion("api_scenario_name like", value, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameNotLike(String value) {
|
||||||
|
addCriterion("api_scenario_name not like", value, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_name in", values, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameNotIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_name not in", values, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_name between", value1, value2, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioNameNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_name not between", value1, value2, "apiScenarioName");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleIsNull() {
|
||||||
|
addCriterion("api_scenario_module is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleIsNotNull() {
|
||||||
|
addCriterion("api_scenario_module is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_module =", value, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleNotEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_module <>", value, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleGreaterThan(String value) {
|
||||||
|
addCriterion("api_scenario_module >", value, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_module >=", value, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleLessThan(String value) {
|
||||||
|
addCriterion("api_scenario_module <", value, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_module <=", value, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleLike(String value) {
|
||||||
|
addCriterion("api_scenario_module like", value, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleNotLike(String value) {
|
||||||
|
addCriterion("api_scenario_module not like", value, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_module in", values, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleNotIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_module not in", values, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_module between", value1, value2, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioModuleNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_module not between", value1, value2, "apiScenarioModule");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityIsNull() {
|
||||||
|
addCriterion("api_scenario_priority is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityIsNotNull() {
|
||||||
|
addCriterion("api_scenario_priority is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_priority =", value, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityNotEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_priority <>", value, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityGreaterThan(String value) {
|
||||||
|
addCriterion("api_scenario_priority >", value, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_priority >=", value, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityLessThan(String value) {
|
||||||
|
addCriterion("api_scenario_priority <", value, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_priority <=", value, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityLike(String value) {
|
||||||
|
addCriterion("api_scenario_priority like", value, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityNotLike(String value) {
|
||||||
|
addCriterion("api_scenario_priority not like", value, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_priority in", values, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityNotIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_priority not in", values, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_priority between", value1, value2, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioPriorityNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_priority not between", value1, value2, "apiScenarioPriority");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserIsNull() {
|
||||||
|
addCriterion("api_scenario_execute_user is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserIsNotNull() {
|
||||||
|
addCriterion("api_scenario_execute_user is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_execute_user =", value, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserNotEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_execute_user <>", value, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserGreaterThan(String value) {
|
||||||
|
addCriterion("api_scenario_execute_user >", value, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_execute_user >=", value, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserLessThan(String value) {
|
||||||
|
addCriterion("api_scenario_execute_user <", value, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_execute_user <=", value, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserLike(String value) {
|
||||||
|
addCriterion("api_scenario_execute_user like", value, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserNotLike(String value) {
|
||||||
|
addCriterion("api_scenario_execute_user not like", value, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_execute_user in", values, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserNotIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_execute_user not in", values, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_execute_user between", value1, value2, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteUserNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_execute_user not between", value1, value2, "apiScenarioExecuteUser");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultIsNull() {
|
||||||
|
addCriterion("api_scenario_execute_result is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultIsNotNull() {
|
||||||
|
addCriterion("api_scenario_execute_result is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_execute_result =", value, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultNotEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_execute_result <>", value, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultGreaterThan(String value) {
|
||||||
|
addCriterion("api_scenario_execute_result >", value, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_execute_result >=", value, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultLessThan(String value) {
|
||||||
|
addCriterion("api_scenario_execute_result <", value, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("api_scenario_execute_result <=", value, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultLike(String value) {
|
||||||
|
addCriterion("api_scenario_execute_result like", value, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultNotLike(String value) {
|
||||||
|
addCriterion("api_scenario_execute_result not like", value, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_execute_result in", values, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultNotIn(List<String> values) {
|
||||||
|
addCriterion("api_scenario_execute_result not in", values, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_execute_result between", value1, value2, "apiScenarioExecuteResult");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andApiScenarioExecuteResultNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("api_scenario_execute_result not between", value1, value2, "apiScenarioExecuteResult");
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package io.metersphere.plan.domain;
|
package io.metersphere.plan.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -774,52 +775,52 @@ public class TestPlanReportExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateEqualTo(Long value) {
|
public Criteria andPassRateEqualTo(BigDecimal value) {
|
||||||
addCriterion("pass_rate =", value, "passRate");
|
addCriterion("pass_rate =", value, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateNotEqualTo(Long value) {
|
public Criteria andPassRateNotEqualTo(BigDecimal value) {
|
||||||
addCriterion("pass_rate <>", value, "passRate");
|
addCriterion("pass_rate <>", value, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateGreaterThan(Long value) {
|
public Criteria andPassRateGreaterThan(BigDecimal value) {
|
||||||
addCriterion("pass_rate >", value, "passRate");
|
addCriterion("pass_rate >", value, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateGreaterThanOrEqualTo(Long value) {
|
public Criteria andPassRateGreaterThanOrEqualTo(BigDecimal value) {
|
||||||
addCriterion("pass_rate >=", value, "passRate");
|
addCriterion("pass_rate >=", value, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateLessThan(Long value) {
|
public Criteria andPassRateLessThan(BigDecimal value) {
|
||||||
addCriterion("pass_rate <", value, "passRate");
|
addCriterion("pass_rate <", value, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateLessThanOrEqualTo(Long value) {
|
public Criteria andPassRateLessThanOrEqualTo(BigDecimal value) {
|
||||||
addCriterion("pass_rate <=", value, "passRate");
|
addCriterion("pass_rate <=", value, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateIn(List<Long> values) {
|
public Criteria andPassRateIn(List<BigDecimal> values) {
|
||||||
addCriterion("pass_rate in", values, "passRate");
|
addCriterion("pass_rate in", values, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateNotIn(List<Long> values) {
|
public Criteria andPassRateNotIn(List<BigDecimal> values) {
|
||||||
addCriterion("pass_rate not in", values, "passRate");
|
addCriterion("pass_rate not in", values, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateBetween(Long value1, Long value2) {
|
public Criteria andPassRateBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
addCriterion("pass_rate between", value1, value2, "passRate");
|
addCriterion("pass_rate between", value1, value2, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassRateNotBetween(Long value1, Long value2) {
|
public Criteria andPassRateNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
addCriterion("pass_rate not between", value1, value2, "passRate");
|
addCriterion("pass_rate not between", value1, value2, "passRate");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
@ -904,52 +905,52 @@ public class TestPlanReportExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdEqualTo(Long value) {
|
public Criteria andPassThresholdEqualTo(BigDecimal value) {
|
||||||
addCriterion("pass_threshold =", value, "passThreshold");
|
addCriterion("pass_threshold =", value, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdNotEqualTo(Long value) {
|
public Criteria andPassThresholdNotEqualTo(BigDecimal value) {
|
||||||
addCriterion("pass_threshold <>", value, "passThreshold");
|
addCriterion("pass_threshold <>", value, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdGreaterThan(Long value) {
|
public Criteria andPassThresholdGreaterThan(BigDecimal value) {
|
||||||
addCriterion("pass_threshold >", value, "passThreshold");
|
addCriterion("pass_threshold >", value, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdGreaterThanOrEqualTo(Long value) {
|
public Criteria andPassThresholdGreaterThanOrEqualTo(BigDecimal value) {
|
||||||
addCriterion("pass_threshold >=", value, "passThreshold");
|
addCriterion("pass_threshold >=", value, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdLessThan(Long value) {
|
public Criteria andPassThresholdLessThan(BigDecimal value) {
|
||||||
addCriterion("pass_threshold <", value, "passThreshold");
|
addCriterion("pass_threshold <", value, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdLessThanOrEqualTo(Long value) {
|
public Criteria andPassThresholdLessThanOrEqualTo(BigDecimal value) {
|
||||||
addCriterion("pass_threshold <=", value, "passThreshold");
|
addCriterion("pass_threshold <=", value, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdIn(List<Long> values) {
|
public Criteria andPassThresholdIn(List<BigDecimal> values) {
|
||||||
addCriterion("pass_threshold in", values, "passThreshold");
|
addCriterion("pass_threshold in", values, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdNotIn(List<Long> values) {
|
public Criteria andPassThresholdNotIn(List<BigDecimal> values) {
|
||||||
addCriterion("pass_threshold not in", values, "passThreshold");
|
addCriterion("pass_threshold not in", values, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdBetween(Long value1, Long value2) {
|
public Criteria andPassThresholdBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
addCriterion("pass_threshold between", value1, value2, "passThreshold");
|
addCriterion("pass_threshold between", value1, value2, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPassThresholdNotBetween(Long value1, Long value2) {
|
public Criteria andPassThresholdNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
addCriterion("pass_threshold not between", value1, value2, "passThreshold");
|
addCriterion("pass_threshold not between", value1, value2, "passThreshold");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
@ -1143,6 +1144,136 @@ public class TestPlanReportExample {
|
||||||
addCriterion("deleted not between", value1, value2, "deleted");
|
addCriterion("deleted not between", value1, value2, "deleted");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateIsNull() {
|
||||||
|
addCriterion("execute_rate is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateIsNotNull() {
|
||||||
|
addCriterion("execute_rate is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("execute_rate =", value, "executeRate");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateNotEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("execute_rate <>", value, "executeRate");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateGreaterThan(BigDecimal value) {
|
||||||
|
addCriterion("execute_rate >", value, "executeRate");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateGreaterThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("execute_rate >=", value, "executeRate");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateLessThan(BigDecimal value) {
|
||||||
|
addCriterion("execute_rate <", value, "executeRate");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateLessThanOrEqualTo(BigDecimal value) {
|
||||||
|
addCriterion("execute_rate <=", value, "executeRate");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("execute_rate in", values, "executeRate");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateNotIn(List<BigDecimal> values) {
|
||||||
|
addCriterion("execute_rate not in", values, "executeRate");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("execute_rate between", value1, value2, "executeRate");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteRateNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||||
|
addCriterion("execute_rate not between", value1, value2, "executeRate");
|
||||||
|
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<String> values) {
|
||||||
|
addCriterion("parent_id in", values, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdNotIn(List<String> 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 static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package io.metersphere.plan.mapper;
|
||||||
|
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportApiCase;
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportApiCaseExample;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface TestPlanReportApiCaseMapper {
|
||||||
|
long countByExample(TestPlanReportApiCaseExample example);
|
||||||
|
|
||||||
|
int deleteByExample(TestPlanReportApiCaseExample example);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String id);
|
||||||
|
|
||||||
|
int insert(TestPlanReportApiCase record);
|
||||||
|
|
||||||
|
int insertSelective(TestPlanReportApiCase record);
|
||||||
|
|
||||||
|
List<TestPlanReportApiCase> selectByExample(TestPlanReportApiCaseExample example);
|
||||||
|
|
||||||
|
TestPlanReportApiCase selectByPrimaryKey(String id);
|
||||||
|
|
||||||
|
int updateByExampleSelective(@Param("record") TestPlanReportApiCase record, @Param("example") TestPlanReportApiCaseExample example);
|
||||||
|
|
||||||
|
int updateByExample(@Param("record") TestPlanReportApiCase record, @Param("example") TestPlanReportApiCaseExample example);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(TestPlanReportApiCase record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(TestPlanReportApiCase record);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<TestPlanReportApiCase> list);
|
||||||
|
|
||||||
|
int batchInsertSelective(@Param("list") List<TestPlanReportApiCase> list, @Param("selective") TestPlanReportApiCase.Column ... selective);
|
||||||
|
}
|
|
@ -0,0 +1,349 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="io.metersphere.plan.mapper.TestPlanReportApiCaseMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanReportApiCase">
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="test_plan_report_id" jdbcType="VARCHAR" property="testPlanReportId" />
|
||||||
|
<result column="test_plan_api_case_id" jdbcType="VARCHAR" property="testPlanApiCaseId" />
|
||||||
|
<result column="api_case_id" jdbcType="VARCHAR" property="apiCaseId" />
|
||||||
|
<result column="api_case_num" jdbcType="BIGINT" property="apiCaseNum" />
|
||||||
|
<result column="api_case_name" jdbcType="VARCHAR" property="apiCaseName" />
|
||||||
|
<result column="api_case_module" jdbcType="VARCHAR" property="apiCaseModule" />
|
||||||
|
<result column="api_case_priority" jdbcType="VARCHAR" property="apiCasePriority" />
|
||||||
|
<result column="api_case_execute_user" jdbcType="VARCHAR" property="apiCaseExecuteUser" />
|
||||||
|
<result column="api_case_execute_result" jdbcType="VARCHAR" property="apiCaseExecuteResult" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, test_plan_report_id, test_plan_api_case_id, api_case_id, api_case_num, api_case_name,
|
||||||
|
api_case_module, api_case_priority, api_case_execute_user, api_case_execute_result
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiCaseExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from test_plan_report_api_case
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from test_plan_report_api_case
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from test_plan_report_api_case
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiCaseExample">
|
||||||
|
delete from test_plan_report_api_case
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase">
|
||||||
|
insert into test_plan_report_api_case (id, test_plan_report_id, test_plan_api_case_id,
|
||||||
|
api_case_id, api_case_num, api_case_name,
|
||||||
|
api_case_module, api_case_priority, api_case_execute_user,
|
||||||
|
api_case_execute_result)
|
||||||
|
values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{testPlanApiCaseId,jdbcType=VARCHAR},
|
||||||
|
#{apiCaseId,jdbcType=VARCHAR}, #{apiCaseNum,jdbcType=BIGINT}, #{apiCaseName,jdbcType=VARCHAR},
|
||||||
|
#{apiCaseModule,jdbcType=VARCHAR}, #{apiCasePriority,jdbcType=VARCHAR}, #{apiCaseExecuteUser,jdbcType=VARCHAR},
|
||||||
|
#{apiCaseExecuteResult,jdbcType=VARCHAR})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase">
|
||||||
|
insert into test_plan_report_api_case
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="testPlanReportId != null">
|
||||||
|
test_plan_report_id,
|
||||||
|
</if>
|
||||||
|
<if test="testPlanApiCaseId != null">
|
||||||
|
test_plan_api_case_id,
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseId != null">
|
||||||
|
api_case_id,
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseNum != null">
|
||||||
|
api_case_num,
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseName != null">
|
||||||
|
api_case_name,
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseModule != null">
|
||||||
|
api_case_module,
|
||||||
|
</if>
|
||||||
|
<if test="apiCasePriority != null">
|
||||||
|
api_case_priority,
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseExecuteUser != null">
|
||||||
|
api_case_execute_user,
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseExecuteResult != null">
|
||||||
|
api_case_execute_result,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="testPlanReportId != null">
|
||||||
|
#{testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="testPlanApiCaseId != null">
|
||||||
|
#{testPlanApiCaseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseId != null">
|
||||||
|
#{apiCaseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseNum != null">
|
||||||
|
#{apiCaseNum,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseName != null">
|
||||||
|
#{apiCaseName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseModule != null">
|
||||||
|
#{apiCaseModule,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCasePriority != null">
|
||||||
|
#{apiCasePriority,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseExecuteUser != null">
|
||||||
|
#{apiCaseExecuteUser,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseExecuteResult != null">
|
||||||
|
#{apiCaseExecuteResult,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiCaseExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from test_plan_report_api_case
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update test_plan_report_api_case
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.testPlanReportId != null">
|
||||||
|
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.testPlanApiCaseId != null">
|
||||||
|
test_plan_api_case_id = #{record.testPlanApiCaseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiCaseId != null">
|
||||||
|
api_case_id = #{record.apiCaseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiCaseNum != null">
|
||||||
|
api_case_num = #{record.apiCaseNum,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiCaseName != null">
|
||||||
|
api_case_name = #{record.apiCaseName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiCaseModule != null">
|
||||||
|
api_case_module = #{record.apiCaseModule,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiCasePriority != null">
|
||||||
|
api_case_priority = #{record.apiCasePriority,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiCaseExecuteUser != null">
|
||||||
|
api_case_execute_user = #{record.apiCaseExecuteUser,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiCaseExecuteResult != null">
|
||||||
|
api_case_execute_result = #{record.apiCaseExecuteResult,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update test_plan_report_api_case
|
||||||
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
|
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
test_plan_api_case_id = #{record.testPlanApiCaseId,jdbcType=VARCHAR},
|
||||||
|
api_case_id = #{record.apiCaseId,jdbcType=VARCHAR},
|
||||||
|
api_case_num = #{record.apiCaseNum,jdbcType=BIGINT},
|
||||||
|
api_case_name = #{record.apiCaseName,jdbcType=VARCHAR},
|
||||||
|
api_case_module = #{record.apiCaseModule,jdbcType=VARCHAR},
|
||||||
|
api_case_priority = #{record.apiCasePriority,jdbcType=VARCHAR},
|
||||||
|
api_case_execute_user = #{record.apiCaseExecuteUser,jdbcType=VARCHAR},
|
||||||
|
api_case_execute_result = #{record.apiCaseExecuteResult,jdbcType=VARCHAR}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase">
|
||||||
|
update test_plan_report_api_case
|
||||||
|
<set>
|
||||||
|
<if test="testPlanReportId != null">
|
||||||
|
test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="testPlanApiCaseId != null">
|
||||||
|
test_plan_api_case_id = #{testPlanApiCaseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseId != null">
|
||||||
|
api_case_id = #{apiCaseId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseNum != null">
|
||||||
|
api_case_num = #{apiCaseNum,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseName != null">
|
||||||
|
api_case_name = #{apiCaseName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseModule != null">
|
||||||
|
api_case_module = #{apiCaseModule,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCasePriority != null">
|
||||||
|
api_case_priority = #{apiCasePriority,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseExecuteUser != null">
|
||||||
|
api_case_execute_user = #{apiCaseExecuteUser,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiCaseExecuteResult != null">
|
||||||
|
api_case_execute_result = #{apiCaseExecuteResult,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanReportApiCase">
|
||||||
|
update test_plan_report_api_case
|
||||||
|
set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
test_plan_api_case_id = #{testPlanApiCaseId,jdbcType=VARCHAR},
|
||||||
|
api_case_id = #{apiCaseId,jdbcType=VARCHAR},
|
||||||
|
api_case_num = #{apiCaseNum,jdbcType=BIGINT},
|
||||||
|
api_case_name = #{apiCaseName,jdbcType=VARCHAR},
|
||||||
|
api_case_module = #{apiCaseModule,jdbcType=VARCHAR},
|
||||||
|
api_case_priority = #{apiCasePriority,jdbcType=VARCHAR},
|
||||||
|
api_case_execute_user = #{apiCaseExecuteUser,jdbcType=VARCHAR},
|
||||||
|
api_case_execute_result = #{apiCaseExecuteResult,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<insert id="batchInsert" parameterType="map">
|
||||||
|
insert into test_plan_report_api_case
|
||||||
|
(id, test_plan_report_id, test_plan_api_case_id, api_case_id, api_case_num, api_case_name,
|
||||||
|
api_case_module, api_case_priority, api_case_execute_user, api_case_execute_result
|
||||||
|
)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanReportId,jdbcType=VARCHAR}, #{item.testPlanApiCaseId,jdbcType=VARCHAR},
|
||||||
|
#{item.apiCaseId,jdbcType=VARCHAR}, #{item.apiCaseNum,jdbcType=BIGINT}, #{item.apiCaseName,jdbcType=VARCHAR},
|
||||||
|
#{item.apiCaseModule,jdbcType=VARCHAR}, #{item.apiCasePriority,jdbcType=VARCHAR},
|
||||||
|
#{item.apiCaseExecuteUser,jdbcType=VARCHAR}, #{item.apiCaseExecuteResult,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
|
insert into test_plan_report_api_case (
|
||||||
|
<foreach collection="selective" item="column" separator=",">
|
||||||
|
${column.escapedColumnName}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(
|
||||||
|
<foreach collection="selective" item="column" separator=",">
|
||||||
|
<if test="'id'.toString() == column.value">
|
||||||
|
#{item.id,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'test_plan_report_id'.toString() == column.value">
|
||||||
|
#{item.testPlanReportId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'test_plan_api_case_id'.toString() == column.value">
|
||||||
|
#{item.testPlanApiCaseId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_case_id'.toString() == column.value">
|
||||||
|
#{item.apiCaseId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_case_num'.toString() == column.value">
|
||||||
|
#{item.apiCaseNum,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
<if test="'api_case_name'.toString() == column.value">
|
||||||
|
#{item.apiCaseName,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_case_module'.toString() == column.value">
|
||||||
|
#{item.apiCaseModule,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_case_priority'.toString() == column.value">
|
||||||
|
#{item.apiCasePriority,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_case_execute_user'.toString() == column.value">
|
||||||
|
#{item.apiCaseExecuteUser,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_case_execute_result'.toString() == column.value">
|
||||||
|
#{item.apiCaseExecuteResult,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,35 @@
|
||||||
|
package io.metersphere.plan.mapper;
|
||||||
|
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportApiScenario;
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportApiScenarioExample;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface TestPlanReportApiScenarioMapper {
|
||||||
|
long countByExample(TestPlanReportApiScenarioExample example);
|
||||||
|
|
||||||
|
int deleteByExample(TestPlanReportApiScenarioExample example);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String id);
|
||||||
|
|
||||||
|
int insert(TestPlanReportApiScenario record);
|
||||||
|
|
||||||
|
int insertSelective(TestPlanReportApiScenario record);
|
||||||
|
|
||||||
|
List<TestPlanReportApiScenario> selectByExample(TestPlanReportApiScenarioExample example);
|
||||||
|
|
||||||
|
TestPlanReportApiScenario selectByPrimaryKey(String id);
|
||||||
|
|
||||||
|
int updateByExampleSelective(@Param("record") TestPlanReportApiScenario record, @Param("example") TestPlanReportApiScenarioExample example);
|
||||||
|
|
||||||
|
int updateByExample(@Param("record") TestPlanReportApiScenario record, @Param("example") TestPlanReportApiScenarioExample example);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(TestPlanReportApiScenario record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(TestPlanReportApiScenario record);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<TestPlanReportApiScenario> list);
|
||||||
|
|
||||||
|
int batchInsertSelective(@Param("list") List<TestPlanReportApiScenario> list, @Param("selective") TestPlanReportApiScenario.Column ... selective);
|
||||||
|
}
|
|
@ -0,0 +1,352 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="io.metersphere.plan.mapper.TestPlanReportApiScenarioMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="io.metersphere.plan.domain.TestPlanReportApiScenario">
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="test_plan_report_id" jdbcType="VARCHAR" property="testPlanReportId" />
|
||||||
|
<result column="test_plan_api_scenario_id" jdbcType="VARCHAR" property="testPlanApiScenarioId" />
|
||||||
|
<result column="api_scenario_id" jdbcType="VARCHAR" property="apiScenarioId" />
|
||||||
|
<result column="api_scenario_num" jdbcType="BIGINT" property="apiScenarioNum" />
|
||||||
|
<result column="api_scenario_name" jdbcType="VARCHAR" property="apiScenarioName" />
|
||||||
|
<result column="api_scenario_module" jdbcType="VARCHAR" property="apiScenarioModule" />
|
||||||
|
<result column="api_scenario_priority" jdbcType="VARCHAR" property="apiScenarioPriority" />
|
||||||
|
<result column="api_scenario_execute_user" jdbcType="VARCHAR" property="apiScenarioExecuteUser" />
|
||||||
|
<result column="api_scenario_execute_result" jdbcType="VARCHAR" property="apiScenarioExecuteResult" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, test_plan_report_id, test_plan_api_scenario_id, api_scenario_id, api_scenario_num,
|
||||||
|
api_scenario_name, api_scenario_module, api_scenario_priority, api_scenario_execute_user,
|
||||||
|
api_scenario_execute_result
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenarioExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from test_plan_report_api_scenario
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from test_plan_report_api_scenario
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from test_plan_report_api_scenario
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenarioExample">
|
||||||
|
delete from test_plan_report_api_scenario
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario">
|
||||||
|
insert into test_plan_report_api_scenario (id, test_plan_report_id, test_plan_api_scenario_id,
|
||||||
|
api_scenario_id, api_scenario_num, api_scenario_name,
|
||||||
|
api_scenario_module, api_scenario_priority,
|
||||||
|
api_scenario_execute_user, api_scenario_execute_result
|
||||||
|
)
|
||||||
|
values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{testPlanApiScenarioId,jdbcType=VARCHAR},
|
||||||
|
#{apiScenarioId,jdbcType=VARCHAR}, #{apiScenarioNum,jdbcType=BIGINT}, #{apiScenarioName,jdbcType=VARCHAR},
|
||||||
|
#{apiScenarioModule,jdbcType=VARCHAR}, #{apiScenarioPriority,jdbcType=VARCHAR},
|
||||||
|
#{apiScenarioExecuteUser,jdbcType=VARCHAR}, #{apiScenarioExecuteResult,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario">
|
||||||
|
insert into test_plan_report_api_scenario
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="testPlanReportId != null">
|
||||||
|
test_plan_report_id,
|
||||||
|
</if>
|
||||||
|
<if test="testPlanApiScenarioId != null">
|
||||||
|
test_plan_api_scenario_id,
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioId != null">
|
||||||
|
api_scenario_id,
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioNum != null">
|
||||||
|
api_scenario_num,
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioName != null">
|
||||||
|
api_scenario_name,
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioModule != null">
|
||||||
|
api_scenario_module,
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioPriority != null">
|
||||||
|
api_scenario_priority,
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioExecuteUser != null">
|
||||||
|
api_scenario_execute_user,
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioExecuteResult != null">
|
||||||
|
api_scenario_execute_result,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="testPlanReportId != null">
|
||||||
|
#{testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="testPlanApiScenarioId != null">
|
||||||
|
#{testPlanApiScenarioId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioId != null">
|
||||||
|
#{apiScenarioId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioNum != null">
|
||||||
|
#{apiScenarioNum,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioName != null">
|
||||||
|
#{apiScenarioName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioModule != null">
|
||||||
|
#{apiScenarioModule,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioPriority != null">
|
||||||
|
#{apiScenarioPriority,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioExecuteUser != null">
|
||||||
|
#{apiScenarioExecuteUser,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioExecuteResult != null">
|
||||||
|
#{apiScenarioExecuteResult,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenarioExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from test_plan_report_api_scenario
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update test_plan_report_api_scenario
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.testPlanReportId != null">
|
||||||
|
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.testPlanApiScenarioId != null">
|
||||||
|
test_plan_api_scenario_id = #{record.testPlanApiScenarioId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiScenarioId != null">
|
||||||
|
api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiScenarioNum != null">
|
||||||
|
api_scenario_num = #{record.apiScenarioNum,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiScenarioName != null">
|
||||||
|
api_scenario_name = #{record.apiScenarioName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiScenarioModule != null">
|
||||||
|
api_scenario_module = #{record.apiScenarioModule,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiScenarioPriority != null">
|
||||||
|
api_scenario_priority = #{record.apiScenarioPriority,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiScenarioExecuteUser != null">
|
||||||
|
api_scenario_execute_user = #{record.apiScenarioExecuteUser,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.apiScenarioExecuteResult != null">
|
||||||
|
api_scenario_execute_result = #{record.apiScenarioExecuteResult,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update test_plan_report_api_scenario
|
||||||
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
|
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
test_plan_api_scenario_id = #{record.testPlanApiScenarioId,jdbcType=VARCHAR},
|
||||||
|
api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR},
|
||||||
|
api_scenario_num = #{record.apiScenarioNum,jdbcType=BIGINT},
|
||||||
|
api_scenario_name = #{record.apiScenarioName,jdbcType=VARCHAR},
|
||||||
|
api_scenario_module = #{record.apiScenarioModule,jdbcType=VARCHAR},
|
||||||
|
api_scenario_priority = #{record.apiScenarioPriority,jdbcType=VARCHAR},
|
||||||
|
api_scenario_execute_user = #{record.apiScenarioExecuteUser,jdbcType=VARCHAR},
|
||||||
|
api_scenario_execute_result = #{record.apiScenarioExecuteResult,jdbcType=VARCHAR}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario">
|
||||||
|
update test_plan_report_api_scenario
|
||||||
|
<set>
|
||||||
|
<if test="testPlanReportId != null">
|
||||||
|
test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="testPlanApiScenarioId != null">
|
||||||
|
test_plan_api_scenario_id = #{testPlanApiScenarioId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioId != null">
|
||||||
|
api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioNum != null">
|
||||||
|
api_scenario_num = #{apiScenarioNum,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioName != null">
|
||||||
|
api_scenario_name = #{apiScenarioName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioModule != null">
|
||||||
|
api_scenario_module = #{apiScenarioModule,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioPriority != null">
|
||||||
|
api_scenario_priority = #{apiScenarioPriority,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioExecuteUser != null">
|
||||||
|
api_scenario_execute_user = #{apiScenarioExecuteUser,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="apiScenarioExecuteResult != null">
|
||||||
|
api_scenario_execute_result = #{apiScenarioExecuteResult,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.plan.domain.TestPlanReportApiScenario">
|
||||||
|
update test_plan_report_api_scenario
|
||||||
|
set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
|
||||||
|
test_plan_api_scenario_id = #{testPlanApiScenarioId,jdbcType=VARCHAR},
|
||||||
|
api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR},
|
||||||
|
api_scenario_num = #{apiScenarioNum,jdbcType=BIGINT},
|
||||||
|
api_scenario_name = #{apiScenarioName,jdbcType=VARCHAR},
|
||||||
|
api_scenario_module = #{apiScenarioModule,jdbcType=VARCHAR},
|
||||||
|
api_scenario_priority = #{apiScenarioPriority,jdbcType=VARCHAR},
|
||||||
|
api_scenario_execute_user = #{apiScenarioExecuteUser,jdbcType=VARCHAR},
|
||||||
|
api_scenario_execute_result = #{apiScenarioExecuteResult,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<insert id="batchInsert" parameterType="map">
|
||||||
|
insert into test_plan_report_api_scenario
|
||||||
|
(id, test_plan_report_id, test_plan_api_scenario_id, api_scenario_id, api_scenario_num,
|
||||||
|
api_scenario_name, api_scenario_module, api_scenario_priority, api_scenario_execute_user,
|
||||||
|
api_scenario_execute_result)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanReportId,jdbcType=VARCHAR}, #{item.testPlanApiScenarioId,jdbcType=VARCHAR},
|
||||||
|
#{item.apiScenarioId,jdbcType=VARCHAR}, #{item.apiScenarioNum,jdbcType=BIGINT},
|
||||||
|
#{item.apiScenarioName,jdbcType=VARCHAR}, #{item.apiScenarioModule,jdbcType=VARCHAR},
|
||||||
|
#{item.apiScenarioPriority,jdbcType=VARCHAR}, #{item.apiScenarioExecuteUser,jdbcType=VARCHAR},
|
||||||
|
#{item.apiScenarioExecuteResult,jdbcType=VARCHAR})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
|
insert into test_plan_report_api_scenario (
|
||||||
|
<foreach collection="selective" item="column" separator=",">
|
||||||
|
${column.escapedColumnName}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(
|
||||||
|
<foreach collection="selective" item="column" separator=",">
|
||||||
|
<if test="'id'.toString() == column.value">
|
||||||
|
#{item.id,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'test_plan_report_id'.toString() == column.value">
|
||||||
|
#{item.testPlanReportId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'test_plan_api_scenario_id'.toString() == column.value">
|
||||||
|
#{item.testPlanApiScenarioId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_scenario_id'.toString() == column.value">
|
||||||
|
#{item.apiScenarioId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_scenario_num'.toString() == column.value">
|
||||||
|
#{item.apiScenarioNum,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
<if test="'api_scenario_name'.toString() == column.value">
|
||||||
|
#{item.apiScenarioName,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_scenario_module'.toString() == column.value">
|
||||||
|
#{item.apiScenarioModule,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_scenario_priority'.toString() == column.value">
|
||||||
|
#{item.apiScenarioPriority,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_scenario_execute_user'.toString() == column.value">
|
||||||
|
#{item.apiScenarioExecuteUser,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'api_scenario_execute_result'.toString() == column.value">
|
||||||
|
#{item.apiScenarioExecuteResult,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
|
@ -18,6 +18,8 @@
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
<result column="integrated" jdbcType="BIT" property="integrated" />
|
<result column="integrated" jdbcType="BIT" property="integrated" />
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
|
<result column="execute_rate" jdbcType="DECIMAL" property="executeRate" />
|
||||||
|
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
|
@ -80,7 +82,7 @@
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, test_plan_id, `name`, create_user, create_time, execute_time, start_time, end_time,
|
id, test_plan_id, `name`, create_user, create_time, execute_time, start_time, end_time,
|
||||||
exec_status, result_status, pass_rate, trigger_mode, pass_threshold, project_id,
|
exec_status, result_status, pass_rate, trigger_mode, pass_threshold, project_id,
|
||||||
integrated, deleted
|
integrated, deleted, execute_rate, parent_id
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanReportExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
|
@ -118,13 +120,15 @@
|
||||||
start_time, end_time, exec_status,
|
start_time, end_time, exec_status,
|
||||||
result_status, pass_rate, trigger_mode,
|
result_status, pass_rate, trigger_mode,
|
||||||
pass_threshold, project_id, integrated,
|
pass_threshold, project_id, integrated,
|
||||||
deleted)
|
deleted, execute_rate, parent_id
|
||||||
|
)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||||
#{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{executeTime,jdbcType=BIGINT},
|
#{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{executeTime,jdbcType=BIGINT},
|
||||||
#{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{execStatus,jdbcType=VARCHAR},
|
#{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{execStatus,jdbcType=VARCHAR},
|
||||||
#{resultStatus,jdbcType=VARCHAR}, #{passRate,jdbcType=DECIMAL}, #{triggerMode,jdbcType=VARCHAR},
|
#{resultStatus,jdbcType=VARCHAR}, #{passRate,jdbcType=DECIMAL}, #{triggerMode,jdbcType=VARCHAR},
|
||||||
#{passThreshold,jdbcType=DECIMAL}, #{projectId,jdbcType=VARCHAR}, #{integrated,jdbcType=BIT},
|
#{passThreshold,jdbcType=DECIMAL}, #{projectId,jdbcType=VARCHAR}, #{integrated,jdbcType=BIT},
|
||||||
#{deleted,jdbcType=BIT})
|
#{deleted,jdbcType=BIT}, #{executeRate,jdbcType=DECIMAL}, #{parentId,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReport">
|
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanReport">
|
||||||
insert into test_plan_report
|
insert into test_plan_report
|
||||||
|
@ -177,6 +181,12 @@
|
||||||
<if test="deleted != null">
|
<if test="deleted != null">
|
||||||
deleted,
|
deleted,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="executeRate != null">
|
||||||
|
execute_rate,
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
@ -227,6 +237,12 @@
|
||||||
<if test="deleted != null">
|
<if test="deleted != null">
|
||||||
#{deleted,jdbcType=BIT},
|
#{deleted,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="executeRate != null">
|
||||||
|
#{executeRate,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
#{parentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="io.metersphere.plan.domain.TestPlanReportExample" resultType="java.lang.Long">
|
||||||
|
@ -286,6 +302,12 @@
|
||||||
<if test="record.deleted != null">
|
<if test="record.deleted != null">
|
||||||
deleted = #{record.deleted,jdbcType=BIT},
|
deleted = #{record.deleted,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.executeRate != null">
|
||||||
|
execute_rate = #{record.executeRate,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="record.parentId != null">
|
||||||
|
parent_id = #{record.parentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
@ -308,7 +330,9 @@
|
||||||
pass_threshold = #{record.passThreshold,jdbcType=DECIMAL},
|
pass_threshold = #{record.passThreshold,jdbcType=DECIMAL},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
integrated = #{record.integrated,jdbcType=BIT},
|
integrated = #{record.integrated,jdbcType=BIT},
|
||||||
deleted = #{record.deleted,jdbcType=BIT}
|
deleted = #{record.deleted,jdbcType=BIT},
|
||||||
|
execute_rate = #{record.executeRate,jdbcType=DECIMAL},
|
||||||
|
parent_id = #{record.parentId,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -361,6 +385,12 @@
|
||||||
<if test="deleted != null">
|
<if test="deleted != null">
|
||||||
deleted = #{deleted,jdbcType=BIT},
|
deleted = #{deleted,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="executeRate != null">
|
||||||
|
execute_rate = #{executeRate,jdbcType=DECIMAL},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
@ -380,14 +410,16 @@
|
||||||
pass_threshold = #{passThreshold,jdbcType=DECIMAL},
|
pass_threshold = #{passThreshold,jdbcType=DECIMAL},
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
integrated = #{integrated,jdbcType=BIT},
|
integrated = #{integrated,jdbcType=BIT},
|
||||||
deleted = #{deleted,jdbcType=BIT}
|
deleted = #{deleted,jdbcType=BIT},
|
||||||
|
execute_rate = #{executeRate,jdbcType=DECIMAL},
|
||||||
|
parent_id = #{parentId,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<insert id="batchInsert" parameterType="map">
|
<insert id="batchInsert" parameterType="map">
|
||||||
insert into test_plan_report
|
insert into test_plan_report
|
||||||
(id, test_plan_id, `name`, create_user, create_time, execute_time, start_time, end_time,
|
(id, test_plan_id, `name`, create_user, create_time, execute_time, start_time, end_time,
|
||||||
exec_status, result_status, pass_rate, trigger_mode, pass_threshold, project_id,
|
exec_status, result_status, pass_rate, trigger_mode, pass_threshold, project_id,
|
||||||
integrated, deleted)
|
integrated, deleted, execute_rate, parent_id)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR},
|
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR},
|
||||||
|
@ -395,7 +427,8 @@
|
||||||
#{item.startTime,jdbcType=BIGINT}, #{item.endTime,jdbcType=BIGINT}, #{item.execStatus,jdbcType=VARCHAR},
|
#{item.startTime,jdbcType=BIGINT}, #{item.endTime,jdbcType=BIGINT}, #{item.execStatus,jdbcType=VARCHAR},
|
||||||
#{item.resultStatus,jdbcType=VARCHAR}, #{item.passRate,jdbcType=DECIMAL}, #{item.triggerMode,jdbcType=VARCHAR},
|
#{item.resultStatus,jdbcType=VARCHAR}, #{item.passRate,jdbcType=DECIMAL}, #{item.triggerMode,jdbcType=VARCHAR},
|
||||||
#{item.passThreshold,jdbcType=DECIMAL}, #{item.projectId,jdbcType=VARCHAR}, #{item.integrated,jdbcType=BIT},
|
#{item.passThreshold,jdbcType=DECIMAL}, #{item.projectId,jdbcType=VARCHAR}, #{item.integrated,jdbcType=BIT},
|
||||||
#{item.deleted,jdbcType=BIT})
|
#{item.deleted,jdbcType=BIT}, #{item.executeRate,jdbcType=DECIMAL}, #{item.parentId,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="batchInsertSelective" parameterType="map">
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
|
@ -456,6 +489,12 @@
|
||||||
<if test="'deleted'.toString() == column.value">
|
<if test="'deleted'.toString() == column.value">
|
||||||
#{item.deleted,jdbcType=BIT}
|
#{item.deleted,jdbcType=BIT}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="'execute_rate'.toString() == column.value">
|
||||||
|
#{item.executeRate,jdbcType=DECIMAL}
|
||||||
|
</if>
|
||||||
|
<if test="'parent_id'.toString() == column.value">
|
||||||
|
#{item.parentId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
@ -175,6 +175,42 @@ update test_resource_pool set id ='100001100001' where `name`= '默认资源池'
|
||||||
ALTER TABLE `user`
|
ALTER TABLE `user`
|
||||||
ADD COLUMN `cft_token` varchar(255) NOT NULL DEFAULT 'NONE' COMMENT '身份令牌';
|
ADD COLUMN `cft_token` varchar(255) NOT NULL DEFAULT 'NONE' COMMENT '身份令牌';
|
||||||
|
|
||||||
|
-- 测试计划报告接口详情
|
||||||
|
CREATE TABLE IF NOT EXISTS test_plan_report_api_case(
|
||||||
|
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
|
||||||
|
`test_plan_report_id` VARCHAR(50) NOT NULL COMMENT '测试计划报告ID' ,
|
||||||
|
`test_plan_api_case_id` VARCHAR(50) NOT NULL COMMENT '测试计划接口用例关联ID' ,
|
||||||
|
`api_case_id` VARCHAR(50) NOT NULL COMMENT '接口用例ID' ,
|
||||||
|
`api_case_num` BIGINT NOT NULL COMMENT '接口用例业务ID' ,
|
||||||
|
`api_case_name` VARCHAR(255) NOT NULL COMMENT '接口用例名称' ,
|
||||||
|
`api_case_module` VARCHAR(255) COMMENT '接口用例所属模块' ,
|
||||||
|
`api_case_priority` VARCHAR(255) COMMENT '接口用例等级' ,
|
||||||
|
`api_case_execute_user` VARCHAR(50) COMMENT '接口用例执行人' ,
|
||||||
|
`api_case_execute_result` VARCHAR(50) NOT NULL COMMENT '接口用例执行结果' ,
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试计划报告内容接口用例部分';
|
||||||
|
CREATE INDEX idx_test_plan_report_id ON test_plan_report_api_case(test_plan_report_id);
|
||||||
|
|
||||||
|
-- 测试计划报告场景详情部分
|
||||||
|
CREATE TABLE IF NOT EXISTS test_plan_report_api_scenario(
|
||||||
|
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
|
||||||
|
`test_plan_report_id` VARCHAR(50) NOT NULL COMMENT '测试计划报告ID' ,
|
||||||
|
`test_plan_api_scenario_id` VARCHAR(50) NOT NULL COMMENT '测试计划场景用例关联ID' ,
|
||||||
|
`api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景用例ID' ,
|
||||||
|
`api_scenario_num` BIGINT NOT NULL COMMENT '场景用例业务ID' ,
|
||||||
|
`api_scenario_name` VARCHAR(255) NOT NULL COMMENT '场景用例名称' ,
|
||||||
|
`api_scenario_module` VARCHAR(255) COMMENT '场景用例所属模块' ,
|
||||||
|
`api_scenario_priority` VARCHAR(255) COMMENT '场景用例等级' ,
|
||||||
|
`api_scenario_execute_user` VARCHAR(50) COMMENT '场景用例执行人' ,
|
||||||
|
`api_scenario_execute_result` VARCHAR(50) NOT NULL COMMENT '场景用例执行结果' ,
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试计划报告内容接口场景部分';
|
||||||
|
CREATE INDEX idx_test_plan_report_id ON test_plan_report_api_scenario(test_plan_report_id);
|
||||||
|
|
||||||
|
-- 测试计划报告
|
||||||
|
ALTER TABLE test_plan_report ADD `execute_rate` DECIMAL(10, 4) COMMENT '执行率';
|
||||||
|
ALTER TABLE test_plan_report ADD `parent_id` VARCHAR(50) COMMENT '独立报告的父级ID';
|
||||||
|
|
||||||
-- set innodb lock wait timeout to default
|
-- set innodb lock wait timeout to default
|
||||||
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@ import io.metersphere.system.uid.IDGenerator;
|
||||||
import io.metersphere.system.utils.SessionUtils;
|
import io.metersphere.system.utils.SessionUtils;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.junit.jupiter.api.*;
|
import org.junit.jupiter.api.*;
|
||||||
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.test.web.servlet.MvcResult;
|
import org.springframework.test.web.servlet.MvcResult;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -373,6 +373,7 @@ class GlobalUserRoleControllerTests extends BaseTest {
|
||||||
user.setUpdateUser(ADMIN.getValue());
|
user.setUpdateUser(ADMIN.getValue());
|
||||||
user.setEnable(true);
|
user.setEnable(true);
|
||||||
user.setDeleted(false);
|
user.setDeleted(false);
|
||||||
|
user.setCftToken("NONE");
|
||||||
userMapper.insert(user);
|
userMapper.insert(user);
|
||||||
UserRoleRelation roleRelation = new UserRoleRelation();
|
UserRoleRelation roleRelation = new UserRoleRelation();
|
||||||
roleRelation.setId(IDGenerator.nextStr());
|
roleRelation.setId(IDGenerator.nextStr());
|
||||||
|
|
|
@ -4,8 +4,8 @@ import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.bug.dto.response.BugDTO;
|
import io.metersphere.bug.dto.response.BugDTO;
|
||||||
import io.metersphere.bug.service.BugAttachmentService;
|
import io.metersphere.bug.service.BugAttachmentService;
|
||||||
|
import io.metersphere.plan.constants.AssociateCaseType;
|
||||||
import io.metersphere.plan.constants.TestPlanResourceConfig;
|
import io.metersphere.plan.constants.TestPlanResourceConfig;
|
||||||
import io.metersphere.plan.domain.TestPlanReport;
|
|
||||||
import io.metersphere.plan.dto.ReportDetailCasePageDTO;
|
import io.metersphere.plan.dto.ReportDetailCasePageDTO;
|
||||||
import io.metersphere.plan.dto.request.*;
|
import io.metersphere.plan.dto.request.*;
|
||||||
import io.metersphere.plan.dto.response.TestPlanReportDetailResponse;
|
import io.metersphere.plan.dto.response.TestPlanReportDetailResponse;
|
||||||
|
@ -88,9 +88,9 @@ public class TestPlanReportController {
|
||||||
@Operation(summary = "测试计划-详情-生成报告")
|
@Operation(summary = "测试计划-详情-生成报告")
|
||||||
@RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE)
|
@RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE)
|
||||||
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
|
@CheckOwner(resourceId = "#request.getTestPlanId()", resourceType = "test_plan")
|
||||||
public TestPlanReport genReportByManual(@Validated @RequestBody TestPlanReportGenRequest request) {
|
public void genReportByManual(@Validated @RequestBody TestPlanReportGenRequest request) {
|
||||||
testPlanService.checkTestPlanNotArchived(request.getTestPlanId());
|
testPlanService.checkTestPlanNotArchived(request.getTestPlanId());
|
||||||
return testPlanReportService.genReportByManual(request, SessionUtils.getUserId());
|
testPlanReportService.genReportByManual(request, SessionUtils.getUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// 报告详情开始
|
// 报告详情开始
|
||||||
|
@ -136,6 +136,26 @@ public class TestPlanReportController {
|
||||||
public Pager<List<ReportDetailCasePageDTO>> pageFunctionalCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) {
|
public Pager<List<ReportDetailCasePageDTO>> pageFunctionalCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) {
|
||||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprfc.function_case_num, tprfc.id desc");
|
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprfc.function_case_num, tprfc.id desc");
|
||||||
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailFunctionalCases(request));
|
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.FUNCTIONAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/detail/api/case/page")
|
||||||
|
@Operation(summary = "测试计划-报告-详情-接口用例分页查询")
|
||||||
|
@RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ)
|
||||||
|
@CheckOwner(resourceId = "#reportId", resourceType = "test_plan_report")
|
||||||
|
public Pager<List<ReportDetailCasePageDTO>> pageApiCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) {
|
||||||
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
|
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprac.api_case_num, tprac.id desc");
|
||||||
|
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.API_CASE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/detail/scenario/case/page")
|
||||||
|
@Operation(summary = "测试计划-报告-详情-场景用例分页查询")
|
||||||
|
@RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ)
|
||||||
|
@CheckOwner(resourceId = "#reportId", resourceType = "test_plan_report")
|
||||||
|
public Pager<List<ReportDetailCasePageDTO>> pageScenarioCase(@Validated @RequestBody TestPlanReportDetailPageRequest request) {
|
||||||
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
|
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tpras.api_scenario_num, tpras.id desc");
|
||||||
|
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.API_SCENARIO));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package io.metersphere.plan.controller;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.bug.dto.response.BugDTO;
|
import io.metersphere.bug.dto.response.BugDTO;
|
||||||
|
import io.metersphere.plan.constants.AssociateCaseType;
|
||||||
import io.metersphere.plan.dto.ReportDetailCasePageDTO;
|
import io.metersphere.plan.dto.ReportDetailCasePageDTO;
|
||||||
import io.metersphere.plan.dto.TestPlanShareInfo;
|
import io.metersphere.plan.dto.TestPlanShareInfo;
|
||||||
import io.metersphere.plan.dto.request.TestPlanReportShareRequest;
|
import io.metersphere.plan.dto.request.TestPlanReportShareRequest;
|
||||||
|
@ -84,6 +85,26 @@ public class TestPlanReportShareController {
|
||||||
testPlanReportShareService.validateExpired(shareInfo);
|
testPlanReportShareService.validateExpired(shareInfo);
|
||||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprfc.function_case_num, tprfc.id desc");
|
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprfc.function_case_num, tprfc.id desc");
|
||||||
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailFunctionalCases(request));
|
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.FUNCTIONAL));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/detail/api/case/page")
|
||||||
|
@Operation(summary = "测试计划-报告-详情-接口用例分页查询")
|
||||||
|
public Pager<List<ReportDetailCasePageDTO>> pageApiCase(@Validated @RequestBody TestPlanShareReportDetailRequest request) {
|
||||||
|
ShareInfo shareInfo = testPlanReportShareService.checkResource(request.getShareId());
|
||||||
|
testPlanReportShareService.validateExpired(shareInfo);
|
||||||
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
|
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tprac.api_case_num, tprac.id desc");
|
||||||
|
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.API_CASE));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/detail/scenario/case/page")
|
||||||
|
@Operation(summary = "测试计划-报告-详情-场景用例分页查询")
|
||||||
|
public Pager<List<ReportDetailCasePageDTO>> pageScenarioCase(@Validated @RequestBody TestPlanShareReportDetailRequest request) {
|
||||||
|
ShareInfo shareInfo = testPlanReportShareService.checkResource(request.getShareId());
|
||||||
|
testPlanReportShareService.validateExpired(shareInfo);
|
||||||
|
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||||
|
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "tpras.api_scenario_num, tpras.id desc");
|
||||||
|
return PageUtils.setPageInfo(page, testPlanReportService.listReportDetailCases(request, AssociateCaseType.API_SCENARIO));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package io.metersphere.plan.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功能, 接口, 场景
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CaseCount {
|
||||||
|
|
||||||
|
@Schema(description = "成功用例数量")
|
||||||
|
private Integer success = 0;
|
||||||
|
@Schema(description = "失败用例数量")
|
||||||
|
private Integer error = 0;
|
||||||
|
@Schema(description = "误报用例数量")
|
||||||
|
private Integer fakeError = 0;
|
||||||
|
@Schema(description = "阻塞用例数量")
|
||||||
|
private Integer block = 0;
|
||||||
|
@Schema(description = "未执行用例数量")
|
||||||
|
private Integer pending = 0;
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package io.metersphere.plan.dto;
|
||||||
|
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportApiCase;
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportApiScenario;
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportBug;
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportFunctionCase;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TestPlanReportDetailCaseDTO {
|
||||||
|
|
||||||
|
private List<TestPlanReportFunctionCase> functionCases;
|
||||||
|
|
||||||
|
private List<TestPlanReportApiCase> apiCases;
|
||||||
|
|
||||||
|
private List<TestPlanReportApiScenario> apiScenarios;
|
||||||
|
|
||||||
|
private List<TestPlanReportBug> bugs;
|
||||||
|
|
||||||
|
}
|
|
@ -29,4 +29,10 @@ public class TestPlanReportGenPreParam {
|
||||||
|
|
||||||
@Schema(description = "是否集成报告")
|
@Schema(description = "是否集成报告")
|
||||||
private Boolean integrated;
|
private Boolean integrated;
|
||||||
|
|
||||||
|
@Schema(description = "计划数量, 集成报告需要")
|
||||||
|
private Long planCount;
|
||||||
|
|
||||||
|
@Schema(description = "计划组报告ID, 独立报告需要")
|
||||||
|
private String groupReportId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
package io.metersphere.plan.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class TestPlanReportModuleParam {
|
||||||
|
|
||||||
|
private Map<String, String> functionalModuleMap = new HashMap<>();
|
||||||
|
|
||||||
|
private Map<String, String> apiModuleMap = new HashMap<>();
|
||||||
|
|
||||||
|
private Map<String, String> scenarioModuleMap = new HashMap<>();
|
||||||
|
}
|
|
@ -11,7 +11,10 @@ public class TestPlanReportGenRequest {
|
||||||
@NotBlank(message = "{test_plan.project_id.not_blank}")
|
@NotBlank(message = "{test_plan.project_id.not_blank}")
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
@Schema(description = "计划ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "计划ID/计划组ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotBlank(message = "{test_plan.id.not_blank}")
|
@NotBlank(message = "{test_plan.id.not_blank}")
|
||||||
private String testPlanId;
|
private String testPlanId;
|
||||||
|
|
||||||
|
@Schema(description = "触发方式", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = {"SCHEDULE", "MANUAL", "API", "BATCH"})
|
||||||
|
private String triggerMode;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package io.metersphere.plan.dto.response;
|
package io.metersphere.plan.dto.response;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import io.metersphere.plan.dto.CaseCount;
|
||||||
import io.metersphere.plan.serializer.CustomRateSerializer;
|
import io.metersphere.plan.serializer.CustomRateSerializer;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -35,6 +36,8 @@ public class TestPlanReportDetailResponse {
|
||||||
private Double executeRate;
|
private Double executeRate;
|
||||||
@Schema(description = "缺陷总数")
|
@Schema(description = "缺陷总数")
|
||||||
private Integer bugCount;
|
private Integer bugCount;
|
||||||
|
@Schema(description = "计划总数")
|
||||||
|
private Integer planCount;
|
||||||
|
|
||||||
|
|
||||||
@Schema(description = "用例总数")
|
@Schema(description = "用例总数")
|
||||||
|
@ -59,22 +62,4 @@ public class TestPlanReportDetailResponse {
|
||||||
*/
|
*/
|
||||||
@Schema(description = "接口场景用例分析-用例数")
|
@Schema(description = "接口场景用例分析-用例数")
|
||||||
private CaseCount apiScenarioCount;
|
private CaseCount apiScenarioCount;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 功能, 接口, 场景
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public static class CaseCount {
|
|
||||||
@Schema(description = "成功用例数量")
|
|
||||||
private Integer success = 0;
|
|
||||||
@Schema(description = "失败用例数量")
|
|
||||||
private Integer error = 0;
|
|
||||||
@Schema(description = "误报用例数量")
|
|
||||||
private Integer fakeError = 0;
|
|
||||||
@Schema(description = "阻塞用例数量")
|
|
||||||
private Integer block = 0;
|
|
||||||
@Schema(description = "未执行用例数量")
|
|
||||||
private Integer pending = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
package io.metersphere.plan.mapper;
|
||||||
|
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportApiCase;
|
||||||
|
import io.metersphere.plan.dto.CaseStatusCountMap;
|
||||||
|
import io.metersphere.plan.dto.ReportDetailCasePageDTO;
|
||||||
|
import io.metersphere.plan.dto.TestPlanBaseModule;
|
||||||
|
import io.metersphere.plan.dto.request.TestPlanReportDetailPageRequest;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ExtTestPlanReportApiCaseMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计报告中接口用例执行情况
|
||||||
|
* @param reportId 报告ID
|
||||||
|
* @return 用例数量
|
||||||
|
*/
|
||||||
|
List<CaseStatusCountMap> countExecuteResult(@Param("id") String reportId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取计划关联的接口用例
|
||||||
|
* @param planId 计划ID
|
||||||
|
* @return 接口用例列表
|
||||||
|
*/
|
||||||
|
List<TestPlanReportApiCase> getPlanExecuteCases(@Param("id") String planId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下接口用例所属模块集合
|
||||||
|
* @param projectId 计划ID
|
||||||
|
* @return 模块集合
|
||||||
|
*/
|
||||||
|
List<TestPlanBaseModule> getPlanExecuteCaseModules(@Param("id") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报告关联的用例
|
||||||
|
* @param request 请求参数
|
||||||
|
* @return 关联的用例集合
|
||||||
|
*/
|
||||||
|
List<ReportDetailCasePageDTO> list(@Param("request") TestPlanReportDetailPageRequest request);
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="io.metersphere.plan.mapper.ExtTestPlanReportApiCaseMapper">
|
||||||
|
<select id="countExecuteResult" resultType="io.metersphere.plan.dto.CaseStatusCountMap">
|
||||||
|
select tprac.api_case_execute_result as status, count(id) as count from test_plan_report_api_case tprac
|
||||||
|
where tprac.test_plan_report_id = #{id}
|
||||||
|
group by tprac.api_case_execute_result
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiCase">
|
||||||
|
select tpac.id as testPlanApiCaseId, atc.id as apiCaseId, atc.num as apiCaseNum, atc.name as apiCaseName, atc.priority as apiCasePriority,
|
||||||
|
if(ad.module_id = 'root','未规划用例', ad.module_id) as apiCaseModule, tpac.execute_user as apiCaseExecuteUser,
|
||||||
|
ifnull(tpac.last_exec_result, 'PENDING') as apiCaseExecuteResult
|
||||||
|
from test_plan_api_case tpac join api_test_case atc on atc.id = tpac.api_case_id
|
||||||
|
left join api_definition ad on atc.api_definition_id = ad.id
|
||||||
|
left join api_definition_module adm on ad.module_id = adm.id
|
||||||
|
where tpac.test_plan_id = #{id} and atc.deleted = false
|
||||||
|
group by tpac.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule">
|
||||||
|
select adm.id, adm.name, adm.parent_id as parentId from api_definition_module adm
|
||||||
|
where adm.project_id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="list" resultType="io.metersphere.plan.dto.ReportDetailCasePageDTO">
|
||||||
|
<!-- ID、用例名称、所属模块、用例等级、执行人、执行结果、缺陷数 -->
|
||||||
|
select distinct tprac.api_case_id as id, tprac.api_case_num as num, tprac.api_case_name as name,
|
||||||
|
tprac.api_case_module as moduleName, tprac.api_case_priority as priority,
|
||||||
|
tprac.api_case_execute_result as executeResult, tprac.api_case_execute_user as executeUser
|
||||||
|
from test_plan_report_api_case tprac
|
||||||
|
where tprac.test_plan_report_id = #{request.reportId}
|
||||||
|
<include refid="filter"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<sql id="filter">
|
||||||
|
<if test="request.filter != null and request.filter.size() > 0">
|
||||||
|
<foreach collection="request.filter.entrySet()" index="key" item="values">
|
||||||
|
<if test="values != null and values.size() > 0">
|
||||||
|
<choose>
|
||||||
|
<!-- 执行状态 -->
|
||||||
|
<when test="key == 'executeResult'">
|
||||||
|
and tprfc.function_case_execute_result in
|
||||||
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,41 @@
|
||||||
|
package io.metersphere.plan.mapper;
|
||||||
|
|
||||||
|
import io.metersphere.plan.domain.TestPlanReportApiScenario;
|
||||||
|
import io.metersphere.plan.dto.CaseStatusCountMap;
|
||||||
|
import io.metersphere.plan.dto.ReportDetailCasePageDTO;
|
||||||
|
import io.metersphere.plan.dto.TestPlanBaseModule;
|
||||||
|
import io.metersphere.plan.dto.request.TestPlanReportDetailPageRequest;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ExtTestPlanReportApiScenarioMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计报告中场景用例执行情况
|
||||||
|
* @param reportId 报告ID
|
||||||
|
* @return 用例数量
|
||||||
|
*/
|
||||||
|
List<CaseStatusCountMap> countExecuteResult(@Param("id") String reportId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取计划关联的场景用例
|
||||||
|
* @param planId 计划ID
|
||||||
|
* @return 场景用例列表
|
||||||
|
*/
|
||||||
|
List<TestPlanReportApiScenario> getPlanExecuteCases(@Param("id") String planId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下场景用例所属模块集合
|
||||||
|
* @param projectId 计划ID
|
||||||
|
* @return 模块集合
|
||||||
|
*/
|
||||||
|
List<TestPlanBaseModule> getPlanExecuteCaseModules(@Param("id") String projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询报告关联的用例
|
||||||
|
* @param request 请求参数
|
||||||
|
* @return 关联的用例集合
|
||||||
|
*/
|
||||||
|
List<ReportDetailCasePageDTO> list(@Param("request") TestPlanReportDetailPageRequest request);
|
||||||
|
}
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="io.metersphere.plan.mapper.ExtTestPlanReportApiScenarioMapper">
|
||||||
|
<select id="countExecuteResult" resultType="io.metersphere.plan.dto.CaseStatusCountMap">
|
||||||
|
select tpras.api_scenario_execute_result as status, count(id) as count from test_plan_report_api_scenario tpras
|
||||||
|
where tpras.test_plan_report_id = #{id}
|
||||||
|
group by tpras.api_scenario_execute_result
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getPlanExecuteCases" resultType="io.metersphere.plan.domain.TestPlanReportApiScenario">
|
||||||
|
select tpas.id as testPlanApiScenarioId, aso.id as apiScenarioId, aso.num as apiScenarioNum, aso.name as apiScenarioName, aso.priority as apiScenarioPriority,
|
||||||
|
if(aso.module_id = 'root','未规划用例', aso.module_id) as apiScenarioModule, tpas.execute_user as apiScenarioExecuteUser,
|
||||||
|
ifnull(tpas.last_exec_result, 'PENDING') as apiScenarioExecuteResult
|
||||||
|
from test_plan_api_scenario tpas join api_scenario aso on aso.id = tpas.api_scenario_id
|
||||||
|
left join api_scenario_module asm on aso.module_id = asm.id
|
||||||
|
where tpas.test_plan_id = #{id} and aso.deleted = false
|
||||||
|
group by tpas.id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getPlanExecuteCaseModules" resultType="io.metersphere.plan.dto.TestPlanBaseModule">
|
||||||
|
select asm.id, asm.name, asm.parent_id as parentId from api_scenario_module asm
|
||||||
|
where asm.project_id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="list" resultType="io.metersphere.plan.dto.ReportDetailCasePageDTO">
|
||||||
|
<!-- ID、用例名称、所属模块、用例等级、执行人、执行结果、缺陷数 -->
|
||||||
|
select distinct tpras.api_scenario_id as id, tpras.api_scenario_num as num, tpras.api_scenario_name as name,
|
||||||
|
tpras.api_scenario_module as moduleName, tpras.api_scenario_priority as priority,
|
||||||
|
tpras.api_scenario_execute_result as executeResult, tpras.api_scenario_execute_user as executeUser
|
||||||
|
from test_plan_report_api_scenario tpras
|
||||||
|
where tpras.test_plan_report_id = #{request.reportId}
|
||||||
|
<include refid="filter"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<sql id="filter">
|
||||||
|
<if test="request.filter != null and request.filter.size() > 0">
|
||||||
|
<foreach collection="request.filter.entrySet()" index="key" item="values">
|
||||||
|
<if test="values != null and values.size() > 0">
|
||||||
|
<choose>
|
||||||
|
<!-- 执行状态 -->
|
||||||
|
<when test="key == 'executeResult'">
|
||||||
|
and tpras.api_scenario_execute_result in
|
||||||
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
|
@ -38,7 +38,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countExecuteResult" resultType="io.metersphere.plan.dto.CaseStatusCountMap">
|
<select id="countExecuteResult" resultType="io.metersphere.plan.dto.CaseStatusCountMap">
|
||||||
select tprfc.function_case_execute_result as status, count(*) as count from test_plan_report_function_case tprfc
|
select tprfc.function_case_execute_result as status, count(id) as count from test_plan_report_function_case tprfc
|
||||||
where tprfc.test_plan_report_id = #{id}
|
where tprfc.test_plan_report_id = #{id}
|
||||||
group by tprfc.function_case_execute_result
|
group by tprfc.function_case_execute_result
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -2,6 +2,7 @@ package io.metersphere.plan.service;
|
||||||
|
|
||||||
import io.metersphere.bug.dto.response.BugDTO;
|
import io.metersphere.bug.dto.response.BugDTO;
|
||||||
import io.metersphere.bug.service.BugCommonService;
|
import io.metersphere.bug.service.BugCommonService;
|
||||||
|
import io.metersphere.plan.constants.AssociateCaseType;
|
||||||
import io.metersphere.plan.domain.*;
|
import io.metersphere.plan.domain.*;
|
||||||
import io.metersphere.plan.dto.*;
|
import io.metersphere.plan.dto.*;
|
||||||
import io.metersphere.plan.dto.request.*;
|
import io.metersphere.plan.dto.request.*;
|
||||||
|
@ -12,7 +13,10 @@ import io.metersphere.plan.mapper.*;
|
||||||
import io.metersphere.plan.utils.ModuleTreeUtils;
|
import io.metersphere.plan.utils.ModuleTreeUtils;
|
||||||
import io.metersphere.plan.utils.RateCalculateUtils;
|
import io.metersphere.plan.utils.RateCalculateUtils;
|
||||||
import io.metersphere.plugin.platform.dto.SelectOption;
|
import io.metersphere.plugin.platform.dto.SelectOption;
|
||||||
import io.metersphere.sdk.constants.*;
|
import io.metersphere.sdk.constants.DefaultRepositoryDir;
|
||||||
|
import io.metersphere.sdk.constants.ExecStatus;
|
||||||
|
import io.metersphere.sdk.constants.ReportStatus;
|
||||||
|
import io.metersphere.sdk.constants.TestPlanConstants;
|
||||||
import io.metersphere.sdk.exception.MSException;
|
import io.metersphere.sdk.exception.MSException;
|
||||||
import io.metersphere.sdk.file.FileCenter;
|
import io.metersphere.sdk.file.FileCenter;
|
||||||
import io.metersphere.sdk.file.FileCopyRequest;
|
import io.metersphere.sdk.file.FileCopyRequest;
|
||||||
|
@ -39,6 +43,7 @@ import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -65,6 +70,10 @@ public class TestPlanReportService {
|
||||||
@Resource
|
@Resource
|
||||||
private ExtTestPlanReportFunctionalCaseMapper extTestPlanReportFunctionalCaseMapper;
|
private ExtTestPlanReportFunctionalCaseMapper extTestPlanReportFunctionalCaseMapper;
|
||||||
@Resource
|
@Resource
|
||||||
|
private ExtTestPlanReportApiCaseMapper extTestPlanReportApiCaseMapper;
|
||||||
|
@Resource
|
||||||
|
private ExtTestPlanReportApiScenarioMapper extTestPlanReportApiScenarioMapper;
|
||||||
|
@Resource
|
||||||
private TestPlanReportLogService testPlanReportLogService;
|
private TestPlanReportLogService testPlanReportLogService;
|
||||||
@Resource
|
@Resource
|
||||||
private TestPlanReportNoticeService testPlanReportNoticeService;
|
private TestPlanReportNoticeService testPlanReportNoticeService;
|
||||||
|
@ -189,71 +198,123 @@ public class TestPlanReportService {
|
||||||
testPlanReportBugMapper.deleteByExample(testPlanReportBugExample);
|
testPlanReportBugMapper.deleteByExample(testPlanReportBugExample);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 手动生成报告
|
* 手动生成报告 (计划 或者 组)
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
* @return 报告
|
* @param currentUser 当前用户
|
||||||
*/
|
*/
|
||||||
public TestPlanReport genReportByManual(TestPlanReportGenRequest request, String currentUser) {
|
public void genReportByManual(TestPlanReportGenRequest request, String currentUser) {
|
||||||
TestPlan testPlan = checkPlan(request.getTestPlanId());
|
genReport(request, false, currentUser, "/test-plan/report/gen");
|
||||||
/*
|
|
||||||
* 手动生成报告
|
|
||||||
* 1. 构建预生成报告参数
|
|
||||||
* 2. 预生成报告
|
|
||||||
* 3. 报告后置处理
|
|
||||||
*/
|
|
||||||
TestPlanReportGenPreParam genPreParam = new TestPlanReportGenPreParam();
|
|
||||||
BeanUtils.copyBean(genPreParam, request);
|
|
||||||
genPreParam.setTestPlanName(testPlan.getName());
|
|
||||||
genPreParam.setStartTime(System.currentTimeMillis());
|
|
||||||
// 手动触发
|
|
||||||
genPreParam.setTriggerMode(TaskTriggerMode.MANUAL.name());
|
|
||||||
// 报告预生成时, 执行状态为未执行, 结果状态为'-'
|
|
||||||
genPreParam.setExecStatus(ExecStatus.PENDING.name());
|
|
||||||
genPreParam.setResultStatus("-");
|
|
||||||
// 是否集成报告, 目前根据是否计划组来区分
|
|
||||||
genPreParam.setIntegrated(StringUtils.equals(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_GROUP));
|
|
||||||
TestPlanReport preReport = preGenReport(genPreParam, currentUser, "/test-plan/report/gen");
|
|
||||||
TestPlanReportPostParam postParam = new TestPlanReportPostParam();
|
|
||||||
BeanUtils.copyBean(postParam, request);
|
|
||||||
postParam.setReportId(preReport.getId());
|
|
||||||
// 手动生成报告, 执行状态为已完成, 执行及结束时间为当前时间
|
|
||||||
postParam.setExecuteTime(System.currentTimeMillis());
|
|
||||||
postParam.setEndTime(System.currentTimeMillis());
|
|
||||||
postParam.setExecStatus(ExecStatus.COMPLETED.name());
|
|
||||||
return postHandleReport(postParam);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预生成报告内容(后续拆分优化)
|
* 执行生成报告
|
||||||
* @return 报告
|
* @param request 请求参数
|
||||||
|
* @param currentUser 当前用户
|
||||||
*/
|
*/
|
||||||
public TestPlanReport preGenReport(TestPlanReportGenPreParam genParam, String currentUser, String logPath) {
|
public void genReportByExecution(TestPlanReportGenRequest request, String currentUser) {
|
||||||
// 准备计划数据
|
genReport(request, true, currentUser, "/test-plan/report/gen");
|
||||||
TestPlanConfig testPlanConfig = testPlanConfigMapper.selectByPrimaryKey(genParam.getTestPlanId());
|
}
|
||||||
|
|
||||||
|
public void genReport(TestPlanReportGenRequest request, boolean isExecute, String currentUser, String logPath) {
|
||||||
|
// 所有计划
|
||||||
|
List<TestPlan> plans = getPlans(request.getTestPlanId());
|
||||||
|
// 模块参数
|
||||||
|
TestPlanReportModuleParam moduleParam = getModuleParam(request.getProjectId());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 预生成报告(后续执行生成报告复用)
|
* 1. 准备报告生成参数
|
||||||
|
* 2. 预生成报告
|
||||||
|
* 3. 汇总报告数据 {执行时跳过}
|
||||||
|
* 3. 报告后置处理 (计算通过率, 执行率, 执行状态...) {执行时跳过}
|
||||||
|
*/
|
||||||
|
final Long groupPlanCount = (long) (plans.size() - 1);
|
||||||
|
AtomicReference<String> groupReportId = new AtomicReference<>();
|
||||||
|
plans.forEach(plan -> {
|
||||||
|
request.setTestPlanId(plan.getId());
|
||||||
|
TestPlanReportGenPreParam genPreParam = buildReportGenParam(request, plan, groupPlanCount, groupReportId.get() != null ? groupReportId.get() : null);
|
||||||
|
TestPlanReport preReport = preGenReport(genPreParam, currentUser, logPath, moduleParam);
|
||||||
|
if (genPreParam.getIntegrated()) {
|
||||||
|
// 如果是计划组的报告, 初始化组的报告ID
|
||||||
|
groupReportId.set(preReport.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isExecute) {
|
||||||
|
// 汇总
|
||||||
|
summaryReport(preReport.getId());
|
||||||
|
// 手动生成的报告, 汇总结束后直接进行后置处理
|
||||||
|
TestPlanReportPostParam postParam = new TestPlanReportPostParam();
|
||||||
|
BeanUtils.copyBean(postParam, request);
|
||||||
|
postParam.setReportId(preReport.getId());
|
||||||
|
// 手动生成报告, 执行状态为已完成, 执行及结束时间为当前时间
|
||||||
|
postParam.setExecuteTime(System.currentTimeMillis());
|
||||||
|
postParam.setEndTime(System.currentTimeMillis());
|
||||||
|
postParam.setExecStatus(ExecStatus.COMPLETED.name());
|
||||||
|
postHandleReport(postParam);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预生成报告内容(汇总前调用)
|
||||||
|
* @return 报告
|
||||||
|
*/
|
||||||
|
public TestPlanReport preGenReport(TestPlanReportGenPreParam genParam, String currentUser, String logPath, TestPlanReportModuleParam moduleParam) {
|
||||||
|
// 计划配置
|
||||||
|
TestPlanConfig config = testPlanConfigMapper.selectByPrimaryKey(genParam.getTestPlanId());
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 预生成报告
|
||||||
* 1. 生成报告用例数据, 缺陷数据
|
* 1. 生成报告用例数据, 缺陷数据
|
||||||
* 2. 生成或计算报告统计数据
|
* 2. 生成或计算报告统计数据
|
||||||
*/
|
*/
|
||||||
|
TestPlanReport report = new TestPlanReport();
|
||||||
|
BeanUtils.copyBean(report, genParam);
|
||||||
|
report.setId(IDGenerator.nextStr());
|
||||||
|
report.setName(genParam.getTestPlanName() + "-" + DateUtils.getTimeStr(System.currentTimeMillis()));
|
||||||
|
report.setCreateUser(currentUser);
|
||||||
|
report.setCreateTime(System.currentTimeMillis());
|
||||||
|
report.setDeleted(false);
|
||||||
|
report.setPassThreshold(config.getPassThreshold());
|
||||||
|
report.setParentId(genParam.getGroupReportId());
|
||||||
|
testPlanReportMapper.insertSelective(report);
|
||||||
|
|
||||||
|
// 报告关联数据
|
||||||
|
TestPlanReportDetailCaseDTO reportCaseDetail = genReportDetail(genParam, moduleParam, report);
|
||||||
|
// 报告统计内容
|
||||||
|
TestPlanReportSummary reportSummary = new TestPlanReportSummary();
|
||||||
|
reportSummary.setId(IDGenerator.nextStr());
|
||||||
|
reportSummary.setTestPlanReportId(report.getId());
|
||||||
|
reportSummary.setFunctionalCaseCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getFunctionCases()) ? 0 : reportCaseDetail.getFunctionCases().size()));
|
||||||
|
reportSummary.setApiCaseCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getApiCases()) ? 0 : reportCaseDetail.getApiCases().size()));
|
||||||
|
reportSummary.setApiScenarioCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getApiScenarios()) ? 0 : reportCaseDetail.getApiScenarios().size()));
|
||||||
|
reportSummary.setBugCount((long) (CollectionUtils.isEmpty(reportCaseDetail.getBugs()) ? 0 : reportCaseDetail.getBugs().size()));
|
||||||
|
reportSummary.setPlanCount(genParam.getIntegrated() ? genParam.getPlanCount() : 0);
|
||||||
|
testPlanReportSummaryMapper.insertSelective(reportSummary);
|
||||||
|
|
||||||
|
// 报告日志
|
||||||
|
testPlanReportLogService.addLog(report, currentUser, genParam.getProjectId(), logPath);
|
||||||
|
return report;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成报告的关联数据
|
||||||
|
* @param genParam 报告生成的参数
|
||||||
|
* @param moduleParam 模块参数
|
||||||
|
* @param report 报告
|
||||||
|
*/
|
||||||
|
private TestPlanReportDetailCaseDTO genReportDetail(TestPlanReportGenPreParam genParam, TestPlanReportModuleParam moduleParam, TestPlanReport report) {
|
||||||
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
||||||
String reportId = IDGenerator.nextStr();
|
|
||||||
// 功能用例
|
// 功能用例
|
||||||
List<TestPlanReportFunctionCase> reportFunctionCases = extTestPlanReportFunctionalCaseMapper.getPlanExecuteCases(genParam.getTestPlanId());
|
List<TestPlanReportFunctionCase> reportFunctionCases = extTestPlanReportFunctionalCaseMapper.getPlanExecuteCases(genParam.getTestPlanId());
|
||||||
if (CollectionUtils.isNotEmpty(reportFunctionCases)) {
|
if (CollectionUtils.isNotEmpty(reportFunctionCases)) {
|
||||||
// 模块树
|
|
||||||
List<TestPlanBaseModule> functionalModules = extTestPlanReportFunctionalCaseMapper.getPlanExecuteCaseModules(genParam.getProjectId());
|
|
||||||
Map<String, String> functionalModuleMap = new HashMap<>(functionalModules.size());
|
|
||||||
ModuleTreeUtils.genPathMap(functionalModules, functionalModuleMap, new ArrayList<>());
|
|
||||||
// 用例等级
|
// 用例等级
|
||||||
List<String> ids = reportFunctionCases.stream().map(TestPlanReportFunctionCase::getFunctionCaseId).distinct().toList();
|
List<String> ids = reportFunctionCases.stream().map(TestPlanReportFunctionCase::getFunctionCaseId).distinct().toList();
|
||||||
List<SelectOption> options = extTestPlanReportFunctionalCaseMapper.getCasePriorityByIds(ids);
|
List<SelectOption> options = extTestPlanReportFunctionalCaseMapper.getCasePriorityByIds(ids);
|
||||||
Map<String, String> casePriorityMap = options.stream().collect(Collectors.toMap(SelectOption::getValue, SelectOption::getText));
|
Map<String, String> casePriorityMap = options.stream().collect(Collectors.toMap(SelectOption::getValue, SelectOption::getText));
|
||||||
reportFunctionCases.forEach(reportFunctionalCase -> {
|
reportFunctionCases.forEach(reportFunctionalCase -> {
|
||||||
reportFunctionalCase.setId(IDGenerator.nextStr());
|
reportFunctionalCase.setId(IDGenerator.nextStr());
|
||||||
reportFunctionalCase.setTestPlanReportId(reportId);
|
reportFunctionalCase.setTestPlanReportId(report.getId());
|
||||||
reportFunctionalCase.setFunctionCaseModule(functionalModuleMap.getOrDefault(reportFunctionalCase.getFunctionCaseModule(),
|
reportFunctionalCase.setFunctionCaseModule(moduleParam.getFunctionalModuleMap().getOrDefault(reportFunctionalCase.getFunctionCaseModule(),
|
||||||
ModuleTreeUtils.MODULE_PATH_PREFIX + reportFunctionalCase.getFunctionCaseModule()));
|
ModuleTreeUtils.MODULE_PATH_PREFIX + reportFunctionalCase.getFunctionCaseModule()));
|
||||||
reportFunctionalCase.setFunctionCasePriority(casePriorityMap.get(reportFunctionalCase.getFunctionCaseId()));
|
reportFunctionalCase.setFunctionCasePriority(casePriorityMap.get(reportFunctionalCase.getFunctionCaseId()));
|
||||||
});
|
});
|
||||||
|
@ -262,7 +323,33 @@ public class TestPlanReportService {
|
||||||
batchMapper.batchInsert(reportFunctionCases);
|
batchMapper.batchInsert(reportFunctionCases);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 接口用例, 场景报告内容 (与接口报告是否能一致)
|
// 接口用例
|
||||||
|
List<TestPlanReportApiCase> reportApiCases = extTestPlanReportApiCaseMapper.getPlanExecuteCases(genParam.getTestPlanId());
|
||||||
|
if (CollectionUtils.isNotEmpty(reportApiCases)) {
|
||||||
|
reportApiCases.forEach(reportApiCase -> {
|
||||||
|
reportApiCase.setId(IDGenerator.nextStr());
|
||||||
|
reportApiCase.setTestPlanReportId(report.getId());
|
||||||
|
reportApiCase.setApiCaseModule(moduleParam.getApiModuleMap().getOrDefault(reportApiCase.getApiCaseModule(),
|
||||||
|
ModuleTreeUtils.MODULE_PATH_PREFIX + reportApiCase.getApiCaseModule()));
|
||||||
|
});
|
||||||
|
// 插入计划接口用例关联数据 -> 报告内容
|
||||||
|
TestPlanReportApiCaseMapper batchMapper = sqlSession.getMapper(TestPlanReportApiCaseMapper.class);
|
||||||
|
batchMapper.batchInsert(reportApiCases);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 场景用例
|
||||||
|
List<TestPlanReportApiScenario> reportApiScenarios = extTestPlanReportApiScenarioMapper.getPlanExecuteCases(genParam.getTestPlanId());
|
||||||
|
if (CollectionUtils.isNotEmpty(reportApiScenarios)) {
|
||||||
|
reportApiScenarios.forEach(reportApiScenario -> {
|
||||||
|
reportApiScenario.setId(IDGenerator.nextStr());
|
||||||
|
reportApiScenario.setTestPlanReportId(report.getId());
|
||||||
|
reportApiScenario.setApiScenarioModule(moduleParam.getScenarioModuleMap().getOrDefault(reportApiScenario.getApiScenarioModule(),
|
||||||
|
ModuleTreeUtils.MODULE_PATH_PREFIX + reportApiScenario.getApiScenarioModule()));
|
||||||
|
});
|
||||||
|
// 插入计划场景用例关联数据 -> 报告内容
|
||||||
|
TestPlanReportApiScenarioMapper batchMapper = sqlSession.getMapper(TestPlanReportApiScenarioMapper.class);
|
||||||
|
batchMapper.batchInsert(reportApiScenarios);
|
||||||
|
}
|
||||||
|
|
||||||
// 计划报告缺陷内容
|
// 计划报告缺陷内容
|
||||||
List<TestPlanReportBug> reportBugs = extTestPlanReportBugMapper.getPlanBugs(genParam.getTestPlanId());
|
List<TestPlanReportBug> reportBugs = extTestPlanReportBugMapper.getPlanBugs(genParam.getTestPlanId());
|
||||||
|
@ -274,7 +361,7 @@ public class TestPlanReportService {
|
||||||
Map<String, String> allStatusMap = bugCommonService.getAllStatusMap(genParam.getProjectId());
|
Map<String, String> allStatusMap = bugCommonService.getAllStatusMap(genParam.getProjectId());
|
||||||
reportBugs.forEach(reportBug -> {
|
reportBugs.forEach(reportBug -> {
|
||||||
reportBug.setId(IDGenerator.nextStr());
|
reportBug.setId(IDGenerator.nextStr());
|
||||||
reportBug.setTestPlanReportId(reportId);
|
reportBug.setTestPlanReportId(report.getId());
|
||||||
reportBug.setBugHandleUser(headerHandleUserMap.containsKey(reportBug.getBugHandleUser()) ?
|
reportBug.setBugHandleUser(headerHandleUserMap.containsKey(reportBug.getBugHandleUser()) ?
|
||||||
headerHandleUserMap.get(reportBug.getBugHandleUser()) : localHandleUserMap.get(reportBug.getBugHandleUser()));
|
headerHandleUserMap.get(reportBug.getBugHandleUser()) : localHandleUserMap.get(reportBug.getBugHandleUser()));
|
||||||
reportBug.setBugStatus(allStatusMap.get(reportBug.getBugStatus()));
|
reportBug.setBugStatus(allStatusMap.get(reportBug.getBugStatus()));
|
||||||
|
@ -284,65 +371,40 @@ public class TestPlanReportService {
|
||||||
TestPlanReportBugMapper batchMapper = sqlSession.getMapper(TestPlanReportBugMapper.class);
|
TestPlanReportBugMapper batchMapper = sqlSession.getMapper(TestPlanReportBugMapper.class);
|
||||||
batchMapper.batchInsert(reportBugs);
|
batchMapper.batchInsert(reportBugs);
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlSession.flushStatements();
|
sqlSession.flushStatements();
|
||||||
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
|
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
|
||||||
|
|
||||||
// 插入报告统计内容
|
return TestPlanReportDetailCaseDTO.builder()
|
||||||
TestPlanReportSummary reportSummary = new TestPlanReportSummary();
|
.functionCases(reportFunctionCases).apiCases(reportApiCases).apiScenarios(reportApiScenarios).bugs(reportBugs).build();
|
||||||
reportSummary.setId(IDGenerator.nextStr());
|
|
||||||
reportSummary.setTestPlanReportId(reportId);
|
|
||||||
reportSummary.setFunctionalCaseCount((long) (CollectionUtils.isEmpty(reportFunctionCases) ? 0 : reportFunctionCases.size()));
|
|
||||||
reportSummary.setApiCaseCount(0L);
|
|
||||||
reportSummary.setApiScenarioCount(0L);
|
|
||||||
reportSummary.setBugCount((long) (CollectionUtils.isEmpty(reportBugs) ? 0 : reportBugs.size()));
|
|
||||||
testPlanReportSummaryMapper.insertSelective(reportSummary);
|
|
||||||
// 插入报告
|
|
||||||
TestPlanReport report = new TestPlanReport();
|
|
||||||
BeanUtils.copyBean(report, genParam);
|
|
||||||
report.setId(reportId);
|
|
||||||
report.setName(genParam.getTestPlanName() + "-" + DateUtils.getTimeStr(System.currentTimeMillis()));
|
|
||||||
report.setCreateUser(currentUser);
|
|
||||||
report.setCreateTime(System.currentTimeMillis());
|
|
||||||
report.setDeleted(false);
|
|
||||||
report.setPassThreshold(testPlanConfig.getPassThreshold());
|
|
||||||
testPlanReportMapper.insertSelective(report);
|
|
||||||
|
|
||||||
// 插入生成报告日志
|
|
||||||
testPlanReportLogService.addLog(report, currentUser, genParam.getProjectId(), logPath);
|
|
||||||
return report;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报告结果后置处理
|
* 报告结果后置处理 (汇总操作结束后调用)
|
||||||
* @param postParam 后置处理参数
|
* @param postParam 后置处理参数
|
||||||
* @return 报告
|
|
||||||
*/
|
*/
|
||||||
public TestPlanReport postHandleReport(TestPlanReportPostParam postParam) {
|
public void postHandleReport(TestPlanReportPostParam postParam) {
|
||||||
/*
|
/*
|
||||||
* 处理报告(执行状态, 结束时间)
|
* 处理报告(执行状态, 结束时间)
|
||||||
*/
|
*/
|
||||||
TestPlanReport planReport = checkReport(postParam.getReportId());
|
TestPlanReport planReport = checkReport(postParam.getReportId());
|
||||||
BeanUtils.copyBean(planReport, postParam);
|
BeanUtils.copyBean(planReport, postParam);
|
||||||
/*
|
/*
|
||||||
* TODO: 计算报告通过率, 并对比阈值生成报告结果状态(目前只有功能用例参与计算)
|
* 计算报告通过率, 并对比阈值生成报告结果状态
|
||||||
*/
|
*/
|
||||||
TestPlanReportSummaryExample example = new TestPlanReportSummaryExample();
|
TestPlanReportSummaryExample example = new TestPlanReportSummaryExample();
|
||||||
example.createCriteria().andTestPlanReportIdEqualTo(postParam.getReportId());
|
example.createCriteria().andTestPlanReportIdEqualTo(postParam.getReportId());
|
||||||
TestPlanReportSummary reportSummary = testPlanReportSummaryMapper.selectByExample(example).get(0);
|
TestPlanReportSummary reportSummary = testPlanReportSummaryMapper.selectByExampleWithBLOBs(example).get(0);
|
||||||
// 通过的功能用例数
|
|
||||||
// TODO: 接口用例, 场景用例
|
|
||||||
long functionalCasePassCount = extTestPlanReportFunctionalCaseMapper.countExecuteSuccessCase(postParam.getReportId());
|
|
||||||
// 用例总数
|
// 用例总数
|
||||||
long caseTotal = reportSummary.getFunctionalCaseCount() + reportSummary.getApiCaseCount() + reportSummary.getApiScenarioCount();
|
long caseTotal = reportSummary.getFunctionalCaseCount() + reportSummary.getApiCaseCount() + reportSummary.getApiScenarioCount();
|
||||||
// 通过率 {通过用例数/总用例数}
|
CaseCount summaryCount = JSON.parseObject(new String(reportSummary.getExecuteResult()), CaseCount.class);
|
||||||
// FIXME: 后续替换成PASS_COUNT
|
planReport.setExecuteRate(RateCalculateUtils.divWithPrecision(((int) caseTotal - summaryCount.getPending()), (int) caseTotal, 2));
|
||||||
planReport.setPassRate(RateCalculateUtils.divWithPrecision((int) functionalCasePassCount, (int) caseTotal, 2));
|
planReport.setPassRate(RateCalculateUtils.divWithPrecision(summaryCount.getSuccess(), (int) caseTotal, 2));
|
||||||
// 计划的(执行)结果状态: 通过率 >= 阈值 ? 成功 : 失败
|
// 计划的(执行)结果状态: 通过率 >= 阈值 ? 成功 : 失败
|
||||||
planReport.setResultStatus(planReport.getPassRate() >= planReport.getPassThreshold() ? ReportStatus.SUCCESS.name() : ReportStatus.ERROR.name());
|
planReport.setResultStatus(planReport.getPassRate() >= planReport.getPassThreshold() ? ReportStatus.SUCCESS.name() : ReportStatus.ERROR.name());
|
||||||
|
|
||||||
testPlanReportMapper.updateByPrimaryKeySelective(planReport);
|
testPlanReportMapper.updateByPrimaryKeySelective(planReport);
|
||||||
return planReport;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -354,17 +416,22 @@ public class TestPlanReportService {
|
||||||
TestPlanReport planReport = checkReport(reportId);
|
TestPlanReport planReport = checkReport(reportId);
|
||||||
TestPlanReportSummaryExample example = new TestPlanReportSummaryExample();
|
TestPlanReportSummaryExample example = new TestPlanReportSummaryExample();
|
||||||
example.createCriteria().andTestPlanReportIdEqualTo(reportId);
|
example.createCriteria().andTestPlanReportIdEqualTo(reportId);
|
||||||
TestPlanReportSummary reportSummary = testPlanReportSummaryMapper.selectByExample(example).get(0);
|
TestPlanReportSummary reportSummary = testPlanReportSummaryMapper.selectByExampleWithBLOBs(example).get(0);
|
||||||
TestPlanReportDetailResponse planReportDetail = new TestPlanReportDetailResponse();
|
TestPlanReportDetailResponse planReportDetail = new TestPlanReportDetailResponse();
|
||||||
BeanUtils.copyBean(planReportDetail, planReport);
|
BeanUtils.copyBean(planReportDetail, planReport);
|
||||||
int caseTotal = (int) (reportSummary.getFunctionalCaseCount() + reportSummary.getApiCaseCount() + reportSummary.getApiScenarioCount());
|
int caseTotal = (int) (reportSummary.getFunctionalCaseCount() + reportSummary.getApiCaseCount() + reportSummary.getApiScenarioCount());
|
||||||
planReportDetail.setCaseTotal(caseTotal);
|
planReportDetail.setCaseTotal(caseTotal);
|
||||||
planReportDetail.setBugCount(reportSummary.getBugCount().intValue());
|
planReportDetail.setBugCount(reportSummary.getBugCount().intValue());
|
||||||
|
planReportDetail.setPlanCount(reportSummary.getPlanCount().intValue());
|
||||||
planReportDetail.setSummary(reportSummary.getSummary());
|
planReportDetail.setSummary(reportSummary.getSummary());
|
||||||
/*
|
/*
|
||||||
* 统计用例执行数据
|
* 统计用例执行数据
|
||||||
*/
|
*/
|
||||||
return statisticsCase(planReportDetail);
|
planReportDetail.setFunctionalCount(JSON.parseObject(new String(reportSummary.getFunctionalExecuteResult()), CaseCount.class));
|
||||||
|
planReportDetail.setApiCaseCount(JSON.parseObject(new String(reportSummary.getApiExecuteResult()), CaseCount.class));
|
||||||
|
planReportDetail.setApiScenarioCount(JSON.parseObject(new String(reportSummary.getScenarioExecuteResult()), CaseCount.class));
|
||||||
|
planReportDetail.setExecuteCount(JSON.parseObject(new String(reportSummary.getExecuteResult()), CaseCount.class));
|
||||||
|
return planReportDetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -394,52 +461,60 @@ public class TestPlanReportService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询报告详情-功能用例分页数据
|
* 分页查询报告详情-用例分页数据
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
* @return 缺陷分页数据
|
* @return 用例分页数据
|
||||||
*/
|
*/
|
||||||
public List<ReportDetailCasePageDTO> listReportDetailFunctionalCases(TestPlanReportDetailPageRequest request) {
|
public List<ReportDetailCasePageDTO> listReportDetailCases(TestPlanReportDetailPageRequest request, String caseType) {
|
||||||
List<ReportDetailCasePageDTO> functionalCases = extTestPlanReportFunctionalCaseMapper.list(request);
|
List<ReportDetailCasePageDTO> detailCases = new ArrayList<>();
|
||||||
if (CollectionUtils.isEmpty(functionalCases)) {
|
switch (caseType) {
|
||||||
return new ArrayList<>();
|
case AssociateCaseType.FUNCTIONAL -> detailCases = extTestPlanReportFunctionalCaseMapper.list(request);
|
||||||
|
case AssociateCaseType.API_CASE -> detailCases = extTestPlanReportApiCaseMapper.list(request);
|
||||||
|
case AssociateCaseType.API_SCENARIO -> detailCases = extTestPlanReportApiScenarioMapper.list(request);
|
||||||
|
default -> detailCases = new ArrayList<>();
|
||||||
}
|
}
|
||||||
List<String> distinctUserIds = functionalCases.stream().map(ReportDetailCasePageDTO::getExecuteUser).distinct().toList();
|
List<String> distinctUserIds = detailCases.stream().map(ReportDetailCasePageDTO::getExecuteUser).distinct().toList();
|
||||||
List<OptionDTO> userOptions = baseUserMapper.selectUserOptionByIds(distinctUserIds);
|
Map<String, String> userMap = getUserMap(distinctUserIds);
|
||||||
Map<String, String> userMap = userOptions.stream().collect(Collectors.toMap(OptionDTO::getId, OptionDTO::getName));
|
detailCases.forEach(detailCase -> detailCase.setExecuteUser(userMap.getOrDefault(detailCase.getExecuteUser(), detailCase.getExecuteUser())));
|
||||||
functionalCases.forEach(functionalCase -> functionalCase.setExecuteUser(userMap.getOrDefault(functionalCase.getExecuteUser(), functionalCase.getExecuteUser())));
|
return detailCases;
|
||||||
return functionalCases;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统计用例执行数据 (目前只统计功能用例)
|
* 汇总规划生成的报告
|
||||||
* @param reportDetail 用例详情
|
* @param reportId 报告ID
|
||||||
*/
|
*/
|
||||||
private TestPlanReportDetailResponse statisticsCase(TestPlanReportDetailResponse reportDetail) {
|
public void summaryReport(String reportId) {
|
||||||
// 功能用例 (无误报状态)
|
TestPlanReportSummaryExample example = new TestPlanReportSummaryExample();
|
||||||
List<CaseStatusCountMap> functionalCaseCountMap = extTestPlanReportFunctionalCaseMapper.countExecuteResult(reportDetail.getId());
|
example.createCriteria().andTestPlanReportIdEqualTo(reportId);
|
||||||
Map<String, Long> functionalCaseResultMap = functionalCaseCountMap.stream().collect(Collectors.toMap(CaseStatusCountMap::getStatus, CaseStatusCountMap::getCount));
|
List<TestPlanReportSummary> testPlanReportSummaries = testPlanReportSummaryMapper.selectByExample(example);
|
||||||
TestPlanReportDetailResponse.CaseCount functionalCaseCount = new TestPlanReportDetailResponse.CaseCount();
|
if (CollectionUtils.isEmpty(testPlanReportSummaries)) {
|
||||||
functionalCaseCount.setSuccess(functionalCaseResultMap.getOrDefault(ExecStatus.SUCCESS.name(), 0L).intValue());
|
// 报告详情不存在
|
||||||
functionalCaseCount.setError(functionalCaseResultMap.getOrDefault(ExecStatus.ERROR.name(), 0L).intValue());
|
return;
|
||||||
functionalCaseCount.setPending(functionalCaseResultMap.getOrDefault(ExecStatus.PENDING.name(), 0L).intValue());
|
}
|
||||||
functionalCaseCount.setBlock(functionalCaseResultMap.getOrDefault(ExecStatus.BLOCKED.name(), 0L).intValue());
|
// 功能用例
|
||||||
|
List<CaseStatusCountMap> functionalCountMapList = extTestPlanReportFunctionalCaseMapper.countExecuteResult(reportId);
|
||||||
|
CaseCount functionalCaseCount = countMap(functionalCountMapList);
|
||||||
|
// 接口用例
|
||||||
|
List<CaseStatusCountMap> apiCountMapList = extTestPlanReportApiCaseMapper.countExecuteResult(reportId);
|
||||||
|
CaseCount apiCaseCount = countMap(apiCountMapList);
|
||||||
|
// 场景用例
|
||||||
|
List<CaseStatusCountMap> scenarioCountMapList = extTestPlanReportApiScenarioMapper.countExecuteResult(reportId);
|
||||||
|
CaseCount scenarioCaseCount = countMap(scenarioCountMapList);
|
||||||
|
|
||||||
// TODO: 接口用例, 场景用例
|
// 规划整体的汇总数据
|
||||||
|
CaseCount summaryCount = CaseCount.builder().success(functionalCaseCount.getSuccess() + apiCaseCount.getSuccess() + scenarioCaseCount.getSuccess())
|
||||||
|
.error(functionalCaseCount.getError() + apiCaseCount.getError() + scenarioCaseCount.getError())
|
||||||
|
.block(functionalCaseCount.getBlock() + apiCaseCount.getBlock() + scenarioCaseCount.getBlock())
|
||||||
|
.pending(functionalCaseCount.getPending() + apiCaseCount.getPending() + scenarioCaseCount.getPending())
|
||||||
|
.fakeError(functionalCaseCount.getFakeError() + apiCaseCount.getFakeError() + scenarioCaseCount.getFakeError()).build();
|
||||||
|
|
||||||
// FIXME: 目前只有功能用例
|
// 入库汇总数据 => 报告详情表
|
||||||
TestPlanReportDetailResponse.CaseCount executeCaseCount = new TestPlanReportDetailResponse.CaseCount();
|
TestPlanReportSummary reportSummary = testPlanReportSummaries.get(0);
|
||||||
executeCaseCount.setSuccess(functionalCaseCount.getSuccess());
|
reportSummary.setFunctionalExecuteResult(JSON.toJSONBytes(functionalCaseCount));
|
||||||
executeCaseCount.setError(functionalCaseCount.getError());
|
reportSummary.setApiExecuteResult(JSON.toJSONBytes(apiCaseCount));
|
||||||
executeCaseCount.setFakeError(functionalCaseCount.getFakeError());
|
reportSummary.setScenarioExecuteResult(JSON.toJSONBytes(scenarioCaseCount));
|
||||||
executeCaseCount.setPending(functionalCaseCount.getPending());
|
reportSummary.setExecuteResult(JSON.toJSONBytes(summaryCount));
|
||||||
executeCaseCount.setBlock(functionalCaseCount.getBlock());
|
testPlanReportSummaryMapper.updateByPrimaryKeySelective(reportSummary);
|
||||||
|
|
||||||
// 计算执行完成率
|
|
||||||
reportDetail.setExecuteRate(RateCalculateUtils.divWithPrecision(reportDetail.getCaseTotal() - executeCaseCount.getPending(), reportDetail.getCaseTotal(), 2));
|
|
||||||
// 分析详情数据
|
|
||||||
reportDetail.setFunctionalCount(functionalCaseCount);
|
|
||||||
reportDetail.setExecuteCount(executeCaseCount);
|
|
||||||
return reportDetail;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -595,4 +670,92 @@ public class TestPlanReportService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建预生成报告的参数
|
||||||
|
* @param genRequest 报告请求参数
|
||||||
|
* @return 预生成报告参数
|
||||||
|
*/
|
||||||
|
private TestPlanReportGenPreParam buildReportGenParam(TestPlanReportGenRequest genRequest, TestPlan testPlan, Long groupPlanCount, String groupReportId) {
|
||||||
|
TestPlanReportGenPreParam genPreParam = new TestPlanReportGenPreParam();
|
||||||
|
BeanUtils.copyBean(genPreParam, genRequest);
|
||||||
|
genPreParam.setTestPlanName(testPlan.getName());
|
||||||
|
genPreParam.setStartTime(System.currentTimeMillis());
|
||||||
|
// 报告预生成时, 执行状态为未执行, 结果状态为'-'
|
||||||
|
genPreParam.setExecStatus(ExecStatus.PENDING.name());
|
||||||
|
genPreParam.setResultStatus("-");
|
||||||
|
// 是否集成报告(计划组报告), 目前根据是否计划组来区分
|
||||||
|
genPreParam.setIntegrated(StringUtils.equals(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_GROUP));
|
||||||
|
genPreParam.setPlanCount(groupPlanCount);
|
||||||
|
genPreParam.setGroupReportId(groupReportId);
|
||||||
|
return genPreParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计执行状态的用例数量
|
||||||
|
* @param resultMapList 执行结果集合
|
||||||
|
* @return 用例数量
|
||||||
|
*/
|
||||||
|
private CaseCount countMap(List<CaseStatusCountMap> resultMapList) {
|
||||||
|
CaseCount caseCount = new CaseCount();
|
||||||
|
Map<String, Long> resultMap = resultMapList.stream().collect(Collectors.toMap(CaseStatusCountMap::getStatus, CaseStatusCountMap::getCount));
|
||||||
|
caseCount.setSuccess(resultMap.getOrDefault(ExecStatus.SUCCESS.name(), 0L).intValue());
|
||||||
|
caseCount.setError(resultMap.getOrDefault(ExecStatus.ERROR.name(), 0L).intValue());
|
||||||
|
caseCount.setPending(resultMap.getOrDefault(ExecStatus.PENDING.name(), 0L).intValue());
|
||||||
|
caseCount.setBlock(resultMap.getOrDefault(ExecStatus.BLOCKED.name(), 0L).intValue());
|
||||||
|
caseCount.setFakeError(resultMap.getOrDefault(ExecStatus.FAKE_ERROR.name(), 0L).intValue());
|
||||||
|
return caseCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取组或者计划
|
||||||
|
* @param groupOrPlanId 计划组/报告ID
|
||||||
|
* @return 计划集合
|
||||||
|
*/
|
||||||
|
private List<TestPlan> getPlans(String groupOrPlanId) {
|
||||||
|
TestPlan testPlan = checkPlan(groupOrPlanId);
|
||||||
|
List<TestPlan> plans = new ArrayList<>();
|
||||||
|
if (StringUtils.equals(testPlan.getType(), TestPlanConstants.TEST_PLAN_TYPE_GROUP)) {
|
||||||
|
// 计划组
|
||||||
|
TestPlanExample example = new TestPlanExample();
|
||||||
|
example.createCriteria().andGroupIdEqualTo(groupOrPlanId);
|
||||||
|
List<TestPlan> testPlans = testPlanMapper.selectByExample(example);
|
||||||
|
plans.addAll(testPlans);
|
||||||
|
}
|
||||||
|
// 保证第一条为计划组
|
||||||
|
plans.addFirst(testPlan);
|
||||||
|
return plans;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取项目下的模块参数
|
||||||
|
* @param projectId 项目ID
|
||||||
|
* @return 模块参数
|
||||||
|
*/
|
||||||
|
private TestPlanReportModuleParam getModuleParam(String projectId) {
|
||||||
|
// 模块树 {功能, 接口, 场景}
|
||||||
|
List<TestPlanBaseModule> functionalModules = extTestPlanReportFunctionalCaseMapper.getPlanExecuteCaseModules(projectId);
|
||||||
|
Map<String, String> functionalModuleMap = new HashMap<>(functionalModules.size());
|
||||||
|
ModuleTreeUtils.genPathMap(functionalModules, functionalModuleMap, new ArrayList<>());
|
||||||
|
List<TestPlanBaseModule> apiModules = extTestPlanReportApiCaseMapper.getPlanExecuteCaseModules(projectId);
|
||||||
|
Map<String, String> apiModuleMap = new HashMap<>(apiModules.size());
|
||||||
|
ModuleTreeUtils.genPathMap(apiModules, apiModuleMap, new ArrayList<>());
|
||||||
|
List<TestPlanBaseModule> scenarioModules = extTestPlanReportApiScenarioMapper.getPlanExecuteCaseModules(projectId);
|
||||||
|
Map<String, String> scenarioModuleMap = new HashMap<>(apiModules.size());
|
||||||
|
ModuleTreeUtils.genPathMap(scenarioModules, scenarioModuleMap, new ArrayList<>());
|
||||||
|
return TestPlanReportModuleParam.builder().functionalModuleMap(functionalModuleMap).apiModuleMap(apiModuleMap).scenarioModuleMap(scenarioModuleMap).build();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户集合
|
||||||
|
* @param userIds 用户ID集合
|
||||||
|
* @return 用户集合
|
||||||
|
*/
|
||||||
|
private Map<String, String> getUserMap(List<String> userIds) {
|
||||||
|
if (CollectionUtils.isEmpty(userIds)) {
|
||||||
|
return new HashMap<>(16);
|
||||||
|
}
|
||||||
|
List<OptionDTO> userOptions = baseUserMapper.selectUserOptionByIds(userIds);
|
||||||
|
return userOptions.stream().collect(Collectors.toMap(OptionDTO::getId, OptionDTO::getName));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
<!-- typeHandler="io.metersphere.handler.ListTypeHandler"/>-->
|
<!-- typeHandler="io.metersphere.handler.ListTypeHandler"/>-->
|
||||||
<!-- </table>-->
|
<!-- </table>-->
|
||||||
|
|
||||||
<table tableName="test_plan_config"/>
|
<!-- <table tableName="test_plan_config"/>-->
|
||||||
<!-- <table tableName="test_plan_api_case"/>-->
|
<!-- <table tableName="test_plan_api_case"/>-->
|
||||||
<!-- <table tableName="test_plan_api_scenario"/>-->
|
<!-- <table tableName="test_plan_api_scenario"/>-->
|
||||||
<!-- <table tableName="test_plan_report"/>-->
|
<!-- <table tableName="test_plan_report"/>-->
|
||||||
|
|
|
@ -12,6 +12,7 @@ import io.metersphere.project.domain.ProjectApplicationExample;
|
||||||
import io.metersphere.project.mapper.ProjectApplicationMapper;
|
import io.metersphere.project.mapper.ProjectApplicationMapper;
|
||||||
import io.metersphere.sdk.constants.ProjectApplicationType;
|
import io.metersphere.sdk.constants.ProjectApplicationType;
|
||||||
import io.metersphere.sdk.constants.ShareInfoType;
|
import io.metersphere.sdk.constants.ShareInfoType;
|
||||||
|
import io.metersphere.sdk.constants.TaskTriggerMode;
|
||||||
import io.metersphere.sdk.util.CommonBeanFactory;
|
import io.metersphere.sdk.util.CommonBeanFactory;
|
||||||
import io.metersphere.sdk.util.JSON;
|
import io.metersphere.sdk.util.JSON;
|
||||||
import io.metersphere.system.base.BaseTest;
|
import io.metersphere.system.base.BaseTest;
|
||||||
|
@ -49,12 +50,16 @@ public class TestPlanReportControllerTests extends BaseTest {
|
||||||
private static final String EDIT_PLAN_REPORT = "/test-plan/report/detail/edit";
|
private static final String EDIT_PLAN_REPORT = "/test-plan/report/detail/edit";
|
||||||
private static final String GET_PLAN_REPORT_DETAIL_BUG_PAGE = "/test-plan/report/detail/bug/page";
|
private static final String GET_PLAN_REPORT_DETAIL_BUG_PAGE = "/test-plan/report/detail/bug/page";
|
||||||
private static final String GET_PLAN_REPORT_DETAIL_FUNCTIONAL_PAGE = "/test-plan/report/detail/functional/case/page";
|
private static final String GET_PLAN_REPORT_DETAIL_FUNCTIONAL_PAGE = "/test-plan/report/detail/functional/case/page";
|
||||||
|
private static final String GET_PLAN_REPORT_DETAIL_API_PAGE = "/test-plan/report/detail/api/case/page";
|
||||||
|
private static final String GET_PLAN_REPORT_DETAIL_SCENARIO_PAGE = "/test-plan/report/detail/scenario/case/page";
|
||||||
private static final String GEN_AND_SHARE = "/test-plan/report/share/gen";
|
private static final String GEN_AND_SHARE = "/test-plan/report/share/gen";
|
||||||
private static final String GET_SHARE_INFO = "/test-plan/report/share/get";
|
private static final String GET_SHARE_INFO = "/test-plan/report/share/get";
|
||||||
private static final String GET_SHARE_TIME = "/test-plan/report/share/get-share-time";
|
private static final String GET_SHARE_TIME = "/test-plan/report/share/get-share-time";
|
||||||
private static final String GET_SHARE_REPORT = "/test-plan/report/share/get/detail";
|
private static final String GET_SHARE_REPORT = "/test-plan/report/share/get/detail";
|
||||||
private static final String GET_SHARE_REPORT_BUG_LIST = "/test-plan/report/share/detail/bug/page";
|
private static final String GET_SHARE_REPORT_BUG_LIST = "/test-plan/report/share/detail/bug/page";
|
||||||
private static final String GET_SHARE_REPORT_FUNCTIONAL_LIST = "/test-plan/report/share/detail/functional/case/page";
|
private static final String GET_SHARE_REPORT_FUNCTIONAL_LIST = "/test-plan/report/share/detail/functional/case/page";
|
||||||
|
private static final String GET_SHARE_REPORT_API_LIST = "/test-plan/report/share/detail/api/case/page";
|
||||||
|
private static final String GET_SHARE_REPORT_SCENARIO_LIST = "/test-plan/report/share/detail/scenario/case/page";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TestPlanReportMapper testPlanReportMapper;
|
private TestPlanReportMapper testPlanReportMapper;
|
||||||
|
@ -179,9 +184,13 @@ public class TestPlanReportControllerTests extends BaseTest {
|
||||||
// 获取分享的报告的列表明细
|
// 获取分享的报告的列表明细
|
||||||
this.requestPostWithOk(GET_SHARE_REPORT_BUG_LIST, request);
|
this.requestPostWithOk(GET_SHARE_REPORT_BUG_LIST, request);
|
||||||
this.requestPostWithOk(GET_SHARE_REPORT_FUNCTIONAL_LIST, request);
|
this.requestPostWithOk(GET_SHARE_REPORT_FUNCTIONAL_LIST, request);
|
||||||
|
this.requestPostWithOk(GET_SHARE_REPORT_API_LIST, request);
|
||||||
|
this.requestPostWithOk(GET_SHARE_REPORT_SCENARIO_LIST, request);
|
||||||
request.setSort(Map.of("num", "asc"));
|
request.setSort(Map.of("num", "asc"));
|
||||||
this.requestPostWithOk(GET_SHARE_REPORT_BUG_LIST, request);
|
this.requestPostWithOk(GET_SHARE_REPORT_BUG_LIST, request);
|
||||||
this.requestPostWithOk(GET_SHARE_REPORT_FUNCTIONAL_LIST, request);
|
this.requestPostWithOk(GET_SHARE_REPORT_FUNCTIONAL_LIST, request);
|
||||||
|
this.requestPostWithOk(GET_SHARE_REPORT_API_LIST, request);
|
||||||
|
this.requestPostWithOk(GET_SHARE_REPORT_SCENARIO_LIST, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -243,15 +252,11 @@ public class TestPlanReportControllerTests extends BaseTest {
|
||||||
TestPlanReportGenRequest genRequest = new TestPlanReportGenRequest();
|
TestPlanReportGenRequest genRequest = new TestPlanReportGenRequest();
|
||||||
genRequest.setProjectId("100001100001");
|
genRequest.setProjectId("100001100001");
|
||||||
genRequest.setTestPlanId("plan_id_for_gen_report_1");
|
genRequest.setTestPlanId("plan_id_for_gen_report_1");
|
||||||
|
genRequest.setTriggerMode(TaskTriggerMode.MANUAL.name());
|
||||||
this.requestPost(GEN_PLAN_REPORT, genRequest);
|
this.requestPost(GEN_PLAN_REPORT, genRequest);
|
||||||
genRequest.setTestPlanId("plan_id_for_gen_report");
|
genRequest.setTestPlanId("plan_id_for_gen_report");
|
||||||
MvcResult mvcResult = this.requestPostAndReturn(GEN_PLAN_REPORT, genRequest);
|
this.requestPost(GEN_PLAN_REPORT, genRequest);
|
||||||
String returnData = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8);
|
GEN_REPORT_ID = getGenReportId("plan_id_for_gen_report");
|
||||||
ResultHolder resultHolder = JSON.parseObject(returnData, ResultHolder.class);
|
|
||||||
//返回请求正常
|
|
||||||
Assertions.assertNotNull(resultHolder);
|
|
||||||
TestPlanReport report = JSON.parseObject(JSON.toJSONString(resultHolder.getData()), TestPlanReport.class);
|
|
||||||
GEN_REPORT_ID = report.getId();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -280,8 +285,12 @@ public class TestPlanReportControllerTests extends BaseTest {
|
||||||
request.setPageSize(10);
|
request.setPageSize(10);
|
||||||
request.setReportId(GEN_REPORT_ID);
|
request.setReportId(GEN_REPORT_ID);
|
||||||
this.requestPostWithOk(GET_PLAN_REPORT_DETAIL_FUNCTIONAL_PAGE, request);
|
this.requestPostWithOk(GET_PLAN_REPORT_DETAIL_FUNCTIONAL_PAGE, request);
|
||||||
|
this.requestPostWithOk(GET_PLAN_REPORT_DETAIL_API_PAGE, request);
|
||||||
|
this.requestPostWithOk(GET_PLAN_REPORT_DETAIL_SCENARIO_PAGE, request);
|
||||||
request.setSort(Map.of("num", "asc"));
|
request.setSort(Map.of("num", "asc"));
|
||||||
this.requestPostWithOk(GET_PLAN_REPORT_DETAIL_FUNCTIONAL_PAGE, request);
|
this.requestPostWithOk(GET_PLAN_REPORT_DETAIL_FUNCTIONAL_PAGE, request);
|
||||||
|
this.requestPostWithOk(GET_PLAN_REPORT_DETAIL_API_PAGE, request);
|
||||||
|
this.requestPostWithOk(GET_PLAN_REPORT_DETAIL_SCENARIO_PAGE, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -356,4 +365,15 @@ public class TestPlanReportControllerTests extends BaseTest {
|
||||||
attachment.setCreateTime(System.currentTimeMillis());
|
attachment.setCreateTime(System.currentTimeMillis());
|
||||||
reportAttachmentMapper.insert(attachment);
|
reportAttachmentMapper.insert(attachment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取生成的报告ID
|
||||||
|
* @param planId 计划ID
|
||||||
|
* @return 报告ID
|
||||||
|
*/
|
||||||
|
private String getGenReportId(String planId) {
|
||||||
|
TestPlanReportExample example = new TestPlanReportExample();
|
||||||
|
example.createCriteria().andTestPlanIdEqualTo(planId);
|
||||||
|
return testPlanReportMapper.selectByExample(example).get(0).getId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
-- 计划的测试数据
|
-- 计划的测试数据
|
||||||
INSERT INTO `test_plan`(`id`, `num`, `project_id`, `group_id`, `module_id`, `name`, `status`, `type`, `tags`, `create_time`, `create_user`, `update_time`, `update_user`, `planned_start_time`, `planned_end_time`, `actual_start_time`, `actual_end_time`, `description`) VALUES
|
INSERT INTO `test_plan`(`id`, `num`, `project_id`, `group_id`, `module_id`, `name`, `status`, `type`, `tags`, `create_time`, `create_user`, `update_time`, `update_user`, `planned_start_time`, `planned_end_time`, `actual_start_time`, `actual_end_time`, `description`) VALUES
|
||||||
('plan_id_for_gen_report', 100001, '100001100001', 'NONE', '1', 'gen-report-plan', 'PREPARED', 'TEST_PLAN', NULL, CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '11'),
|
('plan_id_for_gen_report', 100001, '100001100001', 'NONE', '1', 'gen-report-plan', 'PREPARED', 'TEST_PLAN', NULL, CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '11'),
|
||||||
('plan_id_for_gen_report_1', 100001, '100001100001', 'NONE', '1', 'gen-report-plan-1', 'PREPARED', 'TEST_PLAN', NULL, CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '11');
|
('plan_id_for_gen_report_1', 100001, '100001100001', 'NONE', '1', 'gen-report-plan-1', 'PREPARED', 'GROUP', NULL, CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, '11');
|
||||||
INSERT INTO `test_plan_config`(`test_plan_id`, `automatic_status_update`, `repeat_case`, `pass_threshold`,
|
INSERT INTO `test_plan_config`(`test_plan_id`, `automatic_status_update`, `repeat_case`, `pass_threshold`,
|
||||||
`case_run_mode`)
|
`case_run_mode`)
|
||||||
VALUES ('plan_id_for_gen_report', b'0', b'0', 100.00, 'PARALLEL'),
|
VALUES ('plan_id_for_gen_report', b'0', b'0', 100.00, 'PARALLEL'),
|
||||||
|
@ -15,6 +15,12 @@ INSERT INTO `test_plan_functional_case` (`id`, `test_plan_id`, `functional_case_
|
||||||
('plan_id_for_gen_report_case_4', 'plan_id_for_gen_report', 'f4_gen', CURRENT_TIMESTAMP, 'admin', 'admin', CURRENT_TIMESTAMP, 'BLOCKED', 4, '123'),
|
('plan_id_for_gen_report_case_4', 'plan_id_for_gen_report', 'f4_gen', CURRENT_TIMESTAMP, 'admin', 'admin', CURRENT_TIMESTAMP, 'BLOCKED', 4, '123'),
|
||||||
('plan_id_for_gen_report_case_5', 'plan_id_for_gen_report', 'f5_gen', CURRENT_TIMESTAMP, 'admin', 'admin', CURRENT_TIMESTAMP, 'FAKE_ERROR', 5, '123');
|
('plan_id_for_gen_report_case_5', 'plan_id_for_gen_report', 'f5_gen', CURRENT_TIMESTAMP, 'admin', 'admin', CURRENT_TIMESTAMP, 'FAKE_ERROR', 5, '123');
|
||||||
|
|
||||||
|
INSERT INTO `test_plan_api_case`(`id`, `test_plan_id`, `api_case_id`, `environment_id`, `last_exec_result`, `last_exec_report_id`, `execute_user`, `create_time`, `create_user`, `pos`, `test_plan_collection_id`, `last_exec_time`) VALUES
|
||||||
|
('plan_id_for_gen_report_api_case_1', 'plan_id_for_gen_report', 'a1_gen', '1', 'SUCCESS', NULL, 'admin', CURRENT_TIMESTAMP, 'admin', 1, '123', CURRENT_TIMESTAMP);
|
||||||
|
INSERT INTO `test_plan_api_scenario`(id, test_plan_id, api_scenario_id, environment_id, execute_user, last_exec_result, last_exec_report_id, create_time, create_user, pos, test_plan_collection_id, grouped, last_exec_time)
|
||||||
|
VALUES ('plan_id_for_gen_report_api_scenario_case_1', 'plan_id_for_gen_report', 'as_1', '1','admin', 'SUCCESS', NULL, CURRENT_TIMESTAMP, 'admin', 1, '123', b'0', CURRENT_TIMESTAMP);
|
||||||
|
|
||||||
|
|
||||||
-- 计划关联缺陷的测试数据
|
-- 计划关联缺陷的测试数据
|
||||||
INSERT INTO `bug_relation_case` (`id`, `case_id`, `bug_id`, `case_type`, `test_plan_id`, `test_plan_case_id`, `create_user`, `create_time`, `update_time`) VALUES
|
INSERT INTO `bug_relation_case` (`id`, `case_id`, `bug_id`, `case_type`, `test_plan_id`, `test_plan_case_id`, `create_user`, `create_time`, `update_time`) VALUES
|
||||||
('test-plan-bug-relate-case-1', 'f1', 'test-plan-bug-for-gen', 'FUNCTIONAL', 'plan_id_for_gen_report', 'f1', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
|
('test-plan-bug-relate-case-1', 'f1', 'test-plan-bug-for-gen', 'FUNCTIONAL', 'plan_id_for_gen_report', 'f1', 'admin', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
|
||||||
|
@ -30,4 +36,10 @@ VALUES ('f1_gen', 100001, 'TEST_MODULE_ID', '100001100001', '100001', 'functiona
|
||||||
INSERT INTO functional_case_module (id, project_id, name, parent_id, pos, create_user, create_time, update_user, update_time) VALUES
|
INSERT INTO functional_case_module (id, project_id, name, parent_id, pos, create_user, create_time, update_user, update_time) VALUES
|
||||||
('TEST_MODULE_ID', '100001100001', 'test_module_gen_1', 'NONE', 0, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP),
|
('TEST_MODULE_ID', '100001100001', 'test_module_gen_1', 'NONE', 0, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP),
|
||||||
('TEST_MODULE_ID_1', '100001100001', 'test_module_gen_2', 'TEST_MODULE_ID', 0, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP),
|
('TEST_MODULE_ID_1', '100001100001', 'test_module_gen_2', 'TEST_MODULE_ID', 0, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP),
|
||||||
('TEST_MODULE_ID_2', '100001100001', 'test_module_gen_3', '', 0, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP);
|
('TEST_MODULE_ID_2', '100001100001', 'test_module_gen_3', '', 0, 'admin', CURRENT_TIMESTAMP, 'admin', CURRENT_TIMESTAMP);
|
||||||
|
|
||||||
|
INSERT INTO api_test_case(id, name, priority, num, tags, status, last_report_status, last_report_id, pos, project_id, api_definition_id, version_id, environment_id, create_time, create_user, update_time, update_user, delete_time, delete_user, deleted) VALUES
|
||||||
|
('a1_gen', 'api_case_gen', 'P0', 1001, null, 'Underway', 'PENDING', null, 100, 'project-associate-case-test', 'oasis_ac_definition', 'oasis_ac_version_id', 'oasis_ac_env_id', 1698058347559, 'admin', 1698058347559, 'admin', null, null, false);
|
||||||
|
|
||||||
|
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, deleted) VALUES
|
||||||
|
('as_1', 'api_scenario_gen', 'P0', 'Underway', 'PENDING', null, 1000001, 1, 'oasis_as_version_id', 'as-rid', 'test-associate-pro', 'root', null, null, 'admin', UNIX_TIMESTAMP() * 1000, null, null, 'admin', UNIX_TIMESTAMP() * 1000, false);
|
Loading…
Reference in New Issue