feat(接口测试): API和场景报告
This commit is contained in:
parent
22fdae5612
commit
5afd798276
|
@ -46,12 +46,6 @@ public class ApiReport implements Serializable {
|
||||||
@Size(min = 1, max = 50, message = "{api_report.status.length_range}", groups = {Created.class, Updated.class})
|
@Size(min = 1, max = 50, message = "{api_report.status.length_range}", groups = {Created.class, Updated.class})
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
@Schema(description = "接口开始执行时间")
|
|
||||||
private Long startTime;
|
|
||||||
|
|
||||||
@Schema(description = "接口执行结束时间")
|
|
||||||
private Long endTime;
|
|
||||||
|
|
||||||
@Schema(description = "执行模块/API/CASE/API_PLAN", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "执行模块/API/CASE/API_PLAN", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotBlank(message = "{api_report.run_mode.not_blank}", groups = {Created.class})
|
@NotBlank(message = "{api_report.run_mode.not_blank}", groups = {Created.class})
|
||||||
@Size(min = 1, max = 20, message = "{api_report.run_mode.length_range}", groups = {Created.class, Updated.class})
|
@Size(min = 1, max = 20, message = "{api_report.run_mode.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
@ -75,15 +69,13 @@ public class ApiReport implements Serializable {
|
||||||
@Size(min = 1, max = 50, message = "{api_report.project_id.length_range}", groups = {Created.class, Updated.class})
|
@Size(min = 1, max = 50, message = "{api_report.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
@Schema(description = "集成报告id/api_scenario_report_id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@NotBlank(message = "{api_report.integrated_report_id.not_blank}", groups = {Created.class})
|
|
||||||
@Size(min = 1, max = 50, message = "{api_report.integrated_report_id.length_range}", groups = {Created.class, Updated.class})
|
|
||||||
private String integratedReportId;
|
|
||||||
|
|
||||||
@Schema(description = "是否为集成报告,默认否", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "是否为集成报告,默认否", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotNull(message = "{api_report.integrated.not_blank}", groups = {Created.class})
|
@NotNull(message = "{api_report.integrated.not_blank}", groups = {Created.class})
|
||||||
private Boolean integrated;
|
private Boolean integrated;
|
||||||
|
|
||||||
|
@Schema(description = "环境id")
|
||||||
|
private String environmentId;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public enum Column {
|
public enum Column {
|
||||||
|
@ -96,15 +88,13 @@ public class ApiReport implements Serializable {
|
||||||
updateUser("update_user", "updateUser", "VARCHAR", false),
|
updateUser("update_user", "updateUser", "VARCHAR", false),
|
||||||
deleted("deleted", "deleted", "BIT", false),
|
deleted("deleted", "deleted", "BIT", false),
|
||||||
status("status", "status", "VARCHAR", true),
|
status("status", "status", "VARCHAR", true),
|
||||||
startTime("start_time", "startTime", "BIGINT", false),
|
|
||||||
endTime("end_time", "endTime", "BIGINT", false),
|
|
||||||
runMode("run_mode", "runMode", "VARCHAR", false),
|
runMode("run_mode", "runMode", "VARCHAR", false),
|
||||||
poolId("pool_id", "poolId", "VARCHAR", false),
|
poolId("pool_id", "poolId", "VARCHAR", false),
|
||||||
triggerMode("trigger_mode", "triggerMode", "VARCHAR", false),
|
triggerMode("trigger_mode", "triggerMode", "VARCHAR", false),
|
||||||
versionId("version_id", "versionId", "VARCHAR", false),
|
versionId("version_id", "versionId", "VARCHAR", false),
|
||||||
projectId("project_id", "projectId", "VARCHAR", false),
|
projectId("project_id", "projectId", "VARCHAR", false),
|
||||||
integratedReportId("integrated_report_id", "integratedReportId", "VARCHAR", false),
|
integrated("integrated", "integrated", "BIT", false),
|
||||||
integrated("integrated", "integrated", "BIT", false);
|
environmentId("environment_id", "environmentId", "VARCHAR", false);
|
||||||
|
|
||||||
private static final String BEGINNING_DELIMITER = "`";
|
private static final String BEGINNING_DELIMITER = "`";
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,149 @@
|
||||||
|
package io.metersphere.api.domain;
|
||||||
|
|
||||||
|
import io.metersphere.validation.groups.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApiReportDetail implements Serializable {
|
||||||
|
@Schema(description = "报告详情id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{api_report_detail.id.not_blank}", groups = {Updated.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{api_report_detail.id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Schema(description = "接口报告id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{api_report_detail.report_id.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{api_report_detail.report_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String reportId;
|
||||||
|
|
||||||
|
@Schema(description = "场景中各个步骤请求唯一标识", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{api_report_detail.resource_id.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{api_report_detail.resource_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String resourceId;
|
||||||
|
|
||||||
|
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "{api_report_detail.start_time.not_blank}", groups = {Created.class})
|
||||||
|
private Long startTime;
|
||||||
|
|
||||||
|
@Schema(description = "结果状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{api_report_detail.status.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 20, message = "{api_report_detail.status.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@Schema(description = "单个请求步骤时间")
|
||||||
|
private Long requestTime;
|
||||||
|
|
||||||
|
@Schema(description = "总断言数")
|
||||||
|
private Long assertionsTotal;
|
||||||
|
|
||||||
|
@Schema(description = "失败断言数")
|
||||||
|
private Long passAssertionsTotal;
|
||||||
|
|
||||||
|
@Schema(description = "误报编号")
|
||||||
|
private String fakeCode;
|
||||||
|
|
||||||
|
@Schema(description = "请求名称")
|
||||||
|
private String requestName;
|
||||||
|
|
||||||
|
@Schema(description = "项目fk")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
@Schema(description = "失败总数")
|
||||||
|
private Integer errorTotal;
|
||||||
|
|
||||||
|
@Schema(description = "请求响应码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "结果内容详情")
|
||||||
|
private byte[] content;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public enum Column {
|
||||||
|
id("id", "id", "VARCHAR", false),
|
||||||
|
reportId("report_id", "reportId", "VARCHAR", false),
|
||||||
|
resourceId("resource_id", "resourceId", "VARCHAR", false),
|
||||||
|
startTime("start_time", "startTime", "BIGINT", false),
|
||||||
|
status("status", "status", "VARCHAR", true),
|
||||||
|
requestTime("request_time", "requestTime", "BIGINT", false),
|
||||||
|
assertionsTotal("assertions_total", "assertionsTotal", "BIGINT", false),
|
||||||
|
passAssertionsTotal("pass_assertions_total", "passAssertionsTotal", "BIGINT", false),
|
||||||
|
fakeCode("fake_code", "fakeCode", "VARCHAR", false),
|
||||||
|
requestName("request_name", "requestName", "VARCHAR", false),
|
||||||
|
projectId("project_id", "projectId", "VARCHAR", false),
|
||||||
|
errorTotal("error_total", "errorTotal", "INTEGER", false),
|
||||||
|
code("code", "code", "VARCHAR", false),
|
||||||
|
content("content", "content", "LONGVARBINARY", 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -704,126 +704,6 @@ public class ApiReportExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andStartTimeIsNull() {
|
|
||||||
addCriterion("start_time is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeIsNotNull() {
|
|
||||||
addCriterion("start_time is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeEqualTo(Long value) {
|
|
||||||
addCriterion("start_time =", value, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeNotEqualTo(Long value) {
|
|
||||||
addCriterion("start_time <>", value, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeGreaterThan(Long value) {
|
|
||||||
addCriterion("start_time >", value, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeGreaterThanOrEqualTo(Long value) {
|
|
||||||
addCriterion("start_time >=", value, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeLessThan(Long value) {
|
|
||||||
addCriterion("start_time <", value, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeLessThanOrEqualTo(Long value) {
|
|
||||||
addCriterion("start_time <=", value, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeIn(List<Long> values) {
|
|
||||||
addCriterion("start_time in", values, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeNotIn(List<Long> values) {
|
|
||||||
addCriterion("start_time not in", values, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeBetween(Long value1, Long value2) {
|
|
||||||
addCriterion("start_time between", value1, value2, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andStartTimeNotBetween(Long value1, Long value2) {
|
|
||||||
addCriterion("start_time not between", value1, value2, "startTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeIsNull() {
|
|
||||||
addCriterion("end_time is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeIsNotNull() {
|
|
||||||
addCriterion("end_time is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeEqualTo(Long value) {
|
|
||||||
addCriterion("end_time =", value, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeNotEqualTo(Long value) {
|
|
||||||
addCriterion("end_time <>", value, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeGreaterThan(Long value) {
|
|
||||||
addCriterion("end_time >", value, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeGreaterThanOrEqualTo(Long value) {
|
|
||||||
addCriterion("end_time >=", value, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeLessThan(Long value) {
|
|
||||||
addCriterion("end_time <", value, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeLessThanOrEqualTo(Long value) {
|
|
||||||
addCriterion("end_time <=", value, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeIn(List<Long> values) {
|
|
||||||
addCriterion("end_time in", values, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeNotIn(List<Long> values) {
|
|
||||||
addCriterion("end_time not in", values, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeBetween(Long value1, Long value2) {
|
|
||||||
addCriterion("end_time between", value1, value2, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEndTimeNotBetween(Long value1, Long value2) {
|
|
||||||
addCriterion("end_time not between", value1, value2, "endTime");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRunModeIsNull() {
|
public Criteria andRunModeIsNull() {
|
||||||
addCriterion("run_mode is null");
|
addCriterion("run_mode is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
@ -1174,76 +1054,6 @@ public class ApiReportExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdIsNull() {
|
|
||||||
addCriterion("integrated_report_id is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdIsNotNull() {
|
|
||||||
addCriterion("integrated_report_id is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdEqualTo(String value) {
|
|
||||||
addCriterion("integrated_report_id =", value, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdNotEqualTo(String value) {
|
|
||||||
addCriterion("integrated_report_id <>", value, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdGreaterThan(String value) {
|
|
||||||
addCriterion("integrated_report_id >", value, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("integrated_report_id >=", value, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdLessThan(String value) {
|
|
||||||
addCriterion("integrated_report_id <", value, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("integrated_report_id <=", value, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdLike(String value) {
|
|
||||||
addCriterion("integrated_report_id like", value, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdNotLike(String value) {
|
|
||||||
addCriterion("integrated_report_id not like", value, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdIn(List<String> values) {
|
|
||||||
addCriterion("integrated_report_id in", values, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdNotIn(List<String> values) {
|
|
||||||
addCriterion("integrated_report_id not in", values, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdBetween(String value1, String value2) {
|
|
||||||
addCriterion("integrated_report_id between", value1, value2, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedReportIdNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("integrated_report_id not between", value1, value2, "integratedReportId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andIntegratedIsNull() {
|
public Criteria andIntegratedIsNull() {
|
||||||
addCriterion("integrated is null");
|
addCriterion("integrated is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
@ -1303,6 +1113,76 @@ public class ApiReportExample {
|
||||||
addCriterion("integrated not between", value1, value2, "integrated");
|
addCriterion("integrated not between", value1, value2, "integrated");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdIsNull() {
|
||||||
|
addCriterion("environment_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdIsNotNull() {
|
||||||
|
addCriterion("environment_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdEqualTo(String value) {
|
||||||
|
addCriterion("environment_id =", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdNotEqualTo(String value) {
|
||||||
|
addCriterion("environment_id <>", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdGreaterThan(String value) {
|
||||||
|
addCriterion("environment_id >", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("environment_id >=", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdLessThan(String value) {
|
||||||
|
addCriterion("environment_id <", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("environment_id <=", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdLike(String value) {
|
||||||
|
addCriterion("environment_id like", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdNotLike(String value) {
|
||||||
|
addCriterion("environment_id not like", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdIn(List<String> values) {
|
||||||
|
addCriterion("environment_id in", values, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdNotIn(List<String> values) {
|
||||||
|
addCriterion("environment_id not in", values, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("environment_id between", value1, value2, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("environment_id not between", value1, value2, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
|
@ -9,27 +9,19 @@ import java.util.Arrays;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ApiReportBlob implements Serializable {
|
public class ApiReportLog implements Serializable {
|
||||||
@Schema(description = "接口报告fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
@NotBlank(message = "{api_report_blob.id.not_blank}", groups = {Updated.class})
|
@NotBlank(message = "{api_report_log.report_id.not_blank}", groups = {Created.class})
|
||||||
@Size(min = 1, max = 50, message = "{api_report_blob.id.length_range}", groups = {Created.class, Updated.class})
|
@Size(min = 1, max = 50, message = "{api_report_log.report_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
private String id;
|
private String reportId;
|
||||||
|
|
||||||
@Schema(description = "执行环境配置")
|
@Schema(description = "执行日志")
|
||||||
private String environmentId;
|
|
||||||
|
|
||||||
@Schema(description = "结果内容详情")
|
|
||||||
private byte[] content;
|
|
||||||
|
|
||||||
@Schema(description = "执行过程日志")
|
|
||||||
private byte[] console;
|
private byte[] console;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public enum Column {
|
public enum Column {
|
||||||
id("id", "id", "VARCHAR", false),
|
reportId("report_id", "reportId", "VARCHAR", false),
|
||||||
environmentId("environment_id", "environmentId", "VARCHAR", false),
|
|
||||||
content("content", "content", "LONGVARBINARY", false),
|
|
||||||
console("console", "console", "LONGVARBINARY", false);
|
console("console", "console", "LONGVARBINARY", false);
|
||||||
|
|
||||||
private static final String BEGINNING_DELIMITER = "`";
|
private static final String BEGINNING_DELIMITER = "`";
|
|
@ -3,14 +3,14 @@ package io.metersphere.api.domain;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ApiReportBlobExample {
|
public class ApiReportLogExample {
|
||||||
protected String orderByClause;
|
protected String orderByClause;
|
||||||
|
|
||||||
protected boolean distinct;
|
protected boolean distinct;
|
||||||
|
|
||||||
protected List<Criteria> oredCriteria;
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
public ApiReportBlobExample() {
|
public ApiReportLogExample() {
|
||||||
oredCriteria = new ArrayList<Criteria>();
|
oredCriteria = new ArrayList<Criteria>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,143 +104,73 @@ public class ApiReportBlobExample {
|
||||||
criteria.add(new Criterion(condition, value1, value2));
|
criteria.add(new Criterion(condition, value1, value2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdIsNull() {
|
public Criteria andReportIdIsNull() {
|
||||||
addCriterion("id is null");
|
addCriterion("report_id is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdIsNotNull() {
|
public Criteria andReportIdIsNotNull() {
|
||||||
addCriterion("id is not null");
|
addCriterion("report_id is not null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdEqualTo(String value) {
|
public Criteria andReportIdEqualTo(String value) {
|
||||||
addCriterion("id =", value, "id");
|
addCriterion("report_id =", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotEqualTo(String value) {
|
public Criteria andReportIdNotEqualTo(String value) {
|
||||||
addCriterion("id <>", value, "id");
|
addCriterion("report_id <>", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThan(String value) {
|
public Criteria andReportIdGreaterThan(String value) {
|
||||||
addCriterion("id >", value, "id");
|
addCriterion("report_id >", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
public Criteria andReportIdGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("id >=", value, "id");
|
addCriterion("report_id >=", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThan(String value) {
|
public Criteria andReportIdLessThan(String value) {
|
||||||
addCriterion("id <", value, "id");
|
addCriterion("report_id <", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
public Criteria andReportIdLessThanOrEqualTo(String value) {
|
||||||
addCriterion("id <=", value, "id");
|
addCriterion("report_id <=", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLike(String value) {
|
public Criteria andReportIdLike(String value) {
|
||||||
addCriterion("id like", value, "id");
|
addCriterion("report_id like", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotLike(String value) {
|
public Criteria andReportIdNotLike(String value) {
|
||||||
addCriterion("id not like", value, "id");
|
addCriterion("report_id not like", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdIn(List<String> values) {
|
public Criteria andReportIdIn(List<String> values) {
|
||||||
addCriterion("id in", values, "id");
|
addCriterion("report_id in", values, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotIn(List<String> values) {
|
public Criteria andReportIdNotIn(List<String> values) {
|
||||||
addCriterion("id not in", values, "id");
|
addCriterion("report_id not in", values, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdBetween(String value1, String value2) {
|
public Criteria andReportIdBetween(String value1, String value2) {
|
||||||
addCriterion("id between", value1, value2, "id");
|
addCriterion("report_id between", value1, value2, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotBetween(String value1, String value2) {
|
public Criteria andReportIdNotBetween(String value1, String value2) {
|
||||||
addCriterion("id not between", value1, value2, "id");
|
addCriterion("report_id not between", value1, value2, "reportId");
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdIsNull() {
|
|
||||||
addCriterion("environment_id is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdIsNotNull() {
|
|
||||||
addCriterion("environment_id is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdEqualTo(String value) {
|
|
||||||
addCriterion("environment_id =", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdNotEqualTo(String value) {
|
|
||||||
addCriterion("environment_id <>", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdGreaterThan(String value) {
|
|
||||||
addCriterion("environment_id >", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("environment_id >=", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdLessThan(String value) {
|
|
||||||
addCriterion("environment_id <", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("environment_id <=", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdLike(String value) {
|
|
||||||
addCriterion("environment_id like", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdNotLike(String value) {
|
|
||||||
addCriterion("environment_id not like", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdIn(List<String> values) {
|
|
||||||
addCriterion("environment_id in", values, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdNotIn(List<String> values) {
|
|
||||||
addCriterion("environment_id not in", values, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdBetween(String value1, String value2) {
|
|
||||||
addCriterion("environment_id between", value1, value2, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("environment_id not between", value1, value2, "environmentId");
|
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -82,6 +82,9 @@ public class ApiScenarioReport implements Serializable {
|
||||||
@Size(min = 1, max = 50, message = "{api_scenario_report.scenario_id.length_range}", groups = {Created.class, Updated.class})
|
@Size(min = 1, max = 50, message = "{api_scenario_report.scenario_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
private String scenarioId;
|
private String scenarioId;
|
||||||
|
|
||||||
|
@Schema(description = "环境")
|
||||||
|
private String environmentId;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public enum Column {
|
public enum Column {
|
||||||
|
@ -102,7 +105,8 @@ public class ApiScenarioReport implements Serializable {
|
||||||
versionId("version_id", "versionId", "VARCHAR", false),
|
versionId("version_id", "versionId", "VARCHAR", false),
|
||||||
integrated("integrated", "integrated", "BIT", false),
|
integrated("integrated", "integrated", "BIT", false),
|
||||||
projectId("project_id", "projectId", "VARCHAR", false),
|
projectId("project_id", "projectId", "VARCHAR", false),
|
||||||
scenarioId("scenario_id", "scenarioId", "VARCHAR", false);
|
scenarioId("scenario_id", "scenarioId", "VARCHAR", false),
|
||||||
|
environmentId("environment_id", "environmentId", "VARCHAR", false);
|
||||||
|
|
||||||
private static final String BEGINNING_DELIMITER = "`";
|
private static final String BEGINNING_DELIMITER = "`";
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,6 @@ public class ApiScenarioReportDetail implements Serializable {
|
||||||
@Schema(description = "请求名称")
|
@Schema(description = "请求名称")
|
||||||
private String requestName;
|
private String requestName;
|
||||||
|
|
||||||
@Schema(description = "环境fk")
|
|
||||||
private String environmentId;
|
|
||||||
|
|
||||||
@Schema(description = "项目fk")
|
@Schema(description = "项目fk")
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
|
@ -74,7 +71,6 @@ public class ApiScenarioReportDetail implements Serializable {
|
||||||
passAssertionsTotal("pass_assertions_total", "passAssertionsTotal", "BIGINT", false),
|
passAssertionsTotal("pass_assertions_total", "passAssertionsTotal", "BIGINT", false),
|
||||||
fakeCode("fake_code", "fakeCode", "VARCHAR", false),
|
fakeCode("fake_code", "fakeCode", "VARCHAR", false),
|
||||||
requestName("request_name", "requestName", "VARCHAR", false),
|
requestName("request_name", "requestName", "VARCHAR", false),
|
||||||
environmentId("environment_id", "environmentId", "VARCHAR", false),
|
|
||||||
projectId("project_id", "projectId", "VARCHAR", false),
|
projectId("project_id", "projectId", "VARCHAR", false),
|
||||||
errorTotal("error_total", "errorTotal", "INTEGER", false),
|
errorTotal("error_total", "errorTotal", "INTEGER", false),
|
||||||
code("code", "code", "VARCHAR", false),
|
code("code", "code", "VARCHAR", false),
|
||||||
|
|
|
@ -764,76 +764,6 @@ public class ApiScenarioReportDetailExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andEnvironmentIdIsNull() {
|
|
||||||
addCriterion("environment_id is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdIsNotNull() {
|
|
||||||
addCriterion("environment_id is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdEqualTo(String value) {
|
|
||||||
addCriterion("environment_id =", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdNotEqualTo(String value) {
|
|
||||||
addCriterion("environment_id <>", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdGreaterThan(String value) {
|
|
||||||
addCriterion("environment_id >", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("environment_id >=", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdLessThan(String value) {
|
|
||||||
addCriterion("environment_id <", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("environment_id <=", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdLike(String value) {
|
|
||||||
addCriterion("environment_id like", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdNotLike(String value) {
|
|
||||||
addCriterion("environment_id not like", value, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdIn(List<String> values) {
|
|
||||||
addCriterion("environment_id in", values, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdNotIn(List<String> values) {
|
|
||||||
addCriterion("environment_id not in", values, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdBetween(String value1, String value2) {
|
|
||||||
addCriterion("environment_id between", value1, value2, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("environment_id not between", value1, value2, "environmentId");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andProjectIdIsNull() {
|
public Criteria andProjectIdIsNull() {
|
||||||
addCriterion("project_id is null");
|
addCriterion("project_id is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|
|
@ -1303,6 +1303,76 @@ public class ApiScenarioReportExample {
|
||||||
addCriterion("scenario_id not between", value1, value2, "scenarioId");
|
addCriterion("scenario_id not between", value1, value2, "scenarioId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdIsNull() {
|
||||||
|
addCriterion("environment_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdIsNotNull() {
|
||||||
|
addCriterion("environment_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdEqualTo(String value) {
|
||||||
|
addCriterion("environment_id =", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdNotEqualTo(String value) {
|
||||||
|
addCriterion("environment_id <>", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdGreaterThan(String value) {
|
||||||
|
addCriterion("environment_id >", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("environment_id >=", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdLessThan(String value) {
|
||||||
|
addCriterion("environment_id <", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("environment_id <=", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdLike(String value) {
|
||||||
|
addCriterion("environment_id like", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdNotLike(String value) {
|
||||||
|
addCriterion("environment_id not like", value, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdIn(List<String> values) {
|
||||||
|
addCriterion("environment_id in", values, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdNotIn(List<String> values) {
|
||||||
|
addCriterion("environment_id not in", values, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("environment_id between", value1, value2, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEnvironmentIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("environment_id not between", value1, value2, "environmentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
|
@ -0,0 +1,135 @@
|
||||||
|
package io.metersphere.api.domain;
|
||||||
|
|
||||||
|
import io.metersphere.validation.groups.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ApiScenarioReportStep implements Serializable {
|
||||||
|
@Schema(description = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotBlank(message = "{api_scenario_report_step.report_id.not_blank}", groups = {Created.class})
|
||||||
|
@Size(min = 1, max = 50, message = "{api_scenario_report_step.report_id.length_range}", groups = {Created.class, Updated.class})
|
||||||
|
private String reportId;
|
||||||
|
|
||||||
|
@Schema(description = "步骤名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotNull(message = "{api_scenario_report_step.sort.not_blank}", groups = {Created.class})
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
@Schema(description = "启用/禁用")
|
||||||
|
private Boolean enable;
|
||||||
|
|
||||||
|
@Schema(description = "资源id")
|
||||||
|
private Long resourceId;
|
||||||
|
|
||||||
|
@Schema(description = "资源编号")
|
||||||
|
private String resourceNum;
|
||||||
|
|
||||||
|
@Schema(description = "步骤类型/API/CASE等")
|
||||||
|
private String stepType;
|
||||||
|
|
||||||
|
@Schema(description = "项目fk")
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
|
@Schema(description = "父级fk")
|
||||||
|
private String parentId;
|
||||||
|
|
||||||
|
@Schema(description = "版本号")
|
||||||
|
private String versionId;
|
||||||
|
|
||||||
|
@Schema(description = "引用/复制/自定义")
|
||||||
|
private String source;
|
||||||
|
|
||||||
|
@Schema(description = "循环等组件基础数据")
|
||||||
|
private String config;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public enum Column {
|
||||||
|
reportId("report_id", "reportId", "VARCHAR", false),
|
||||||
|
name("name", "name", "VARCHAR", true),
|
||||||
|
sort("sort", "sort", "BIGINT", false),
|
||||||
|
enable("enable", "enable", "BIT", true),
|
||||||
|
resourceId("resource_id", "resourceId", "BIGINT", false),
|
||||||
|
resourceNum("resource_num", "resourceNum", "VARCHAR", false),
|
||||||
|
stepType("step_type", "stepType", "VARCHAR", false),
|
||||||
|
projectId("project_id", "projectId", "VARCHAR", false),
|
||||||
|
parentId("parent_id", "parentId", "VARCHAR", false),
|
||||||
|
versionId("version_id", "versionId", "VARCHAR", false),
|
||||||
|
source("source", "source", "VARCHAR", true),
|
||||||
|
config("config", "config", "VARCHAR", false);
|
||||||
|
|
||||||
|
private static final String BEGINNING_DELIMITER = "`";
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,40 +0,0 @@
|
||||||
package io.metersphere.api.mapper;
|
|
||||||
|
|
||||||
import io.metersphere.api.domain.ApiReportBlob;
|
|
||||||
import io.metersphere.api.domain.ApiReportBlobExample;
|
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
public interface ApiReportBlobMapper {
|
|
||||||
long countByExample(ApiReportBlobExample example);
|
|
||||||
|
|
||||||
int deleteByExample(ApiReportBlobExample example);
|
|
||||||
|
|
||||||
int deleteByPrimaryKey(String id);
|
|
||||||
|
|
||||||
int insert(ApiReportBlob record);
|
|
||||||
|
|
||||||
int insertSelective(ApiReportBlob record);
|
|
||||||
|
|
||||||
List<ApiReportBlob> selectByExampleWithBLOBs(ApiReportBlobExample example);
|
|
||||||
|
|
||||||
List<ApiReportBlob> selectByExample(ApiReportBlobExample example);
|
|
||||||
|
|
||||||
ApiReportBlob selectByPrimaryKey(String id);
|
|
||||||
|
|
||||||
int updateByExampleSelective(@Param("record") ApiReportBlob record, @Param("example") ApiReportBlobExample example);
|
|
||||||
|
|
||||||
int updateByExampleWithBLOBs(@Param("record") ApiReportBlob record, @Param("example") ApiReportBlobExample example);
|
|
||||||
|
|
||||||
int updateByExample(@Param("record") ApiReportBlob record, @Param("example") ApiReportBlobExample example);
|
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(ApiReportBlob record);
|
|
||||||
|
|
||||||
int updateByPrimaryKeyWithBLOBs(ApiReportBlob record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(ApiReportBlob record);
|
|
||||||
|
|
||||||
int batchInsert(@Param("list") List<ApiReportBlob> list);
|
|
||||||
|
|
||||||
int batchInsertSelective(@Param("list") List<ApiReportBlob> list, @Param("selective") ApiReportBlob.Column ... selective);
|
|
||||||
}
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
package io.metersphere.api.mapper;
|
||||||
|
|
||||||
|
import io.metersphere.api.domain.ApiReportDetail;
|
||||||
|
import io.metersphere.api.domain.ApiReportDetailExample;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
public interface ApiReportDetailMapper {
|
||||||
|
long countByExample(ApiReportDetailExample example);
|
||||||
|
|
||||||
|
int deleteByExample(ApiReportDetailExample example);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String id);
|
||||||
|
|
||||||
|
int insert(ApiReportDetail record);
|
||||||
|
|
||||||
|
int insertSelective(ApiReportDetail record);
|
||||||
|
|
||||||
|
List<ApiReportDetail> selectByExampleWithBLOBs(ApiReportDetailExample example);
|
||||||
|
|
||||||
|
List<ApiReportDetail> selectByExample(ApiReportDetailExample example);
|
||||||
|
|
||||||
|
ApiReportDetail selectByPrimaryKey(String id);
|
||||||
|
|
||||||
|
int updateByExampleSelective(@Param("record") ApiReportDetail record, @Param("example") ApiReportDetailExample example);
|
||||||
|
|
||||||
|
int updateByExampleWithBLOBs(@Param("record") ApiReportDetail record, @Param("example") ApiReportDetailExample example);
|
||||||
|
|
||||||
|
int updateByExample(@Param("record") ApiReportDetail record, @Param("example") ApiReportDetailExample example);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(ApiReportDetail record);
|
||||||
|
|
||||||
|
int updateByPrimaryKeyWithBLOBs(ApiReportDetail record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(ApiReportDetail record);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<ApiReportDetail> list);
|
||||||
|
|
||||||
|
int batchInsertSelective(@Param("list") List<ApiReportDetail> list, @Param("selective") ApiReportDetail.Column ... selective);
|
||||||
|
}
|
|
@ -0,0 +1,482 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="io.metersphere.api.mapper.ApiReportDetailMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiReportDetail">
|
||||||
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
|
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
||||||
|
<result column="resource_id" jdbcType="VARCHAR" property="resourceId" />
|
||||||
|
<result column="start_time" jdbcType="BIGINT" property="startTime" />
|
||||||
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
|
<result column="request_time" jdbcType="BIGINT" property="requestTime" />
|
||||||
|
<result column="assertions_total" jdbcType="BIGINT" property="assertionsTotal" />
|
||||||
|
<result column="pass_assertions_total" jdbcType="BIGINT" property="passAssertionsTotal" />
|
||||||
|
<result column="fake_code" jdbcType="VARCHAR" property="fakeCode" />
|
||||||
|
<result column="request_name" jdbcType="VARCHAR" property="requestName" />
|
||||||
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
|
<result column="error_total" jdbcType="INTEGER" property="errorTotal" />
|
||||||
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||||
|
</resultMap>
|
||||||
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.api.domain.ApiReportDetail">
|
||||||
|
<result column="content" jdbcType="LONGVARBINARY" property="content" />
|
||||||
|
</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, report_id, resource_id, start_time, `status`, request_time, assertions_total,
|
||||||
|
pass_assertions_total, fake_code, request_name, project_id, error_total, code
|
||||||
|
</sql>
|
||||||
|
<sql id="Blob_Column_List">
|
||||||
|
content
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.api.domain.ApiReportDetailExample" resultMap="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from api_report_detail
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiReportDetailExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from api_report_detail
|
||||||
|
<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="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from api_report_detail
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from api_report_detail
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="io.metersphere.api.domain.ApiReportDetailExample">
|
||||||
|
delete from api_report_detail
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="io.metersphere.api.domain.ApiReportDetail">
|
||||||
|
insert into api_report_detail (id, report_id, resource_id,
|
||||||
|
start_time, `status`, request_time,
|
||||||
|
assertions_total, pass_assertions_total, fake_code,
|
||||||
|
request_name, project_id, error_total,
|
||||||
|
code, content)
|
||||||
|
values (#{id,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR},
|
||||||
|
#{startTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR}, #{requestTime,jdbcType=BIGINT},
|
||||||
|
#{assertionsTotal,jdbcType=BIGINT}, #{passAssertionsTotal,jdbcType=BIGINT}, #{fakeCode,jdbcType=VARCHAR},
|
||||||
|
#{requestName,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{errorTotal,jdbcType=INTEGER},
|
||||||
|
#{code,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARBINARY})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiReportDetail">
|
||||||
|
insert into api_report_detail
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="reportId != null">
|
||||||
|
report_id,
|
||||||
|
</if>
|
||||||
|
<if test="resourceId != null">
|
||||||
|
resource_id,
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
start_time,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status`,
|
||||||
|
</if>
|
||||||
|
<if test="requestTime != null">
|
||||||
|
request_time,
|
||||||
|
</if>
|
||||||
|
<if test="assertionsTotal != null">
|
||||||
|
assertions_total,
|
||||||
|
</if>
|
||||||
|
<if test="passAssertionsTotal != null">
|
||||||
|
pass_assertions_total,
|
||||||
|
</if>
|
||||||
|
<if test="fakeCode != null">
|
||||||
|
fake_code,
|
||||||
|
</if>
|
||||||
|
<if test="requestName != null">
|
||||||
|
request_name,
|
||||||
|
</if>
|
||||||
|
<if test="projectId != null">
|
||||||
|
project_id,
|
||||||
|
</if>
|
||||||
|
<if test="errorTotal != null">
|
||||||
|
error_total,
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
code,
|
||||||
|
</if>
|
||||||
|
<if test="content != null">
|
||||||
|
content,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="reportId != null">
|
||||||
|
#{reportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="resourceId != null">
|
||||||
|
#{resourceId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
#{startTime,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="requestTime != null">
|
||||||
|
#{requestTime,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="assertionsTotal != null">
|
||||||
|
#{assertionsTotal,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="passAssertionsTotal != null">
|
||||||
|
#{passAssertionsTotal,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="fakeCode != null">
|
||||||
|
#{fakeCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="requestName != null">
|
||||||
|
#{requestName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="projectId != null">
|
||||||
|
#{projectId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="errorTotal != null">
|
||||||
|
#{errorTotal,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
#{code,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="content != null">
|
||||||
|
#{content,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiReportDetailExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from api_report_detail
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update api_report_detail
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.reportId != null">
|
||||||
|
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.resourceId != null">
|
||||||
|
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.startTime != null">
|
||||||
|
start_time = #{record.startTime,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.status != null">
|
||||||
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.requestTime != null">
|
||||||
|
request_time = #{record.requestTime,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.assertionsTotal != null">
|
||||||
|
assertions_total = #{record.assertionsTotal,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.passAssertionsTotal != null">
|
||||||
|
pass_assertions_total = #{record.passAssertionsTotal,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.fakeCode != null">
|
||||||
|
fake_code = #{record.fakeCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.requestName != null">
|
||||||
|
request_name = #{record.requestName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.projectId != null">
|
||||||
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.errorTotal != null">
|
||||||
|
error_total = #{record.errorTotal,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="record.code != null">
|
||||||
|
code = #{record.code,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.content != null">
|
||||||
|
content = #{record.content,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
|
update api_report_detail
|
||||||
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
|
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
|
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||||
|
start_time = #{record.startTime,jdbcType=BIGINT},
|
||||||
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
|
request_time = #{record.requestTime,jdbcType=BIGINT},
|
||||||
|
assertions_total = #{record.assertionsTotal,jdbcType=BIGINT},
|
||||||
|
pass_assertions_total = #{record.passAssertionsTotal,jdbcType=BIGINT},
|
||||||
|
fake_code = #{record.fakeCode,jdbcType=VARCHAR},
|
||||||
|
request_name = #{record.requestName,jdbcType=VARCHAR},
|
||||||
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
|
error_total = #{record.errorTotal,jdbcType=INTEGER},
|
||||||
|
code = #{record.code,jdbcType=VARCHAR},
|
||||||
|
content = #{record.content,jdbcType=LONGVARBINARY}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update api_report_detail
|
||||||
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
|
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
|
resource_id = #{record.resourceId,jdbcType=VARCHAR},
|
||||||
|
start_time = #{record.startTime,jdbcType=BIGINT},
|
||||||
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
|
request_time = #{record.requestTime,jdbcType=BIGINT},
|
||||||
|
assertions_total = #{record.assertionsTotal,jdbcType=BIGINT},
|
||||||
|
pass_assertions_total = #{record.passAssertionsTotal,jdbcType=BIGINT},
|
||||||
|
fake_code = #{record.fakeCode,jdbcType=VARCHAR},
|
||||||
|
request_name = #{record.requestName,jdbcType=VARCHAR},
|
||||||
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
|
error_total = #{record.errorTotal,jdbcType=INTEGER},
|
||||||
|
code = #{record.code,jdbcType=VARCHAR}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiReportDetail">
|
||||||
|
update api_report_detail
|
||||||
|
<set>
|
||||||
|
<if test="reportId != null">
|
||||||
|
report_id = #{reportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="resourceId != null">
|
||||||
|
resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
start_time = #{startTime,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="requestTime != null">
|
||||||
|
request_time = #{requestTime,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="assertionsTotal != null">
|
||||||
|
assertions_total = #{assertionsTotal,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="passAssertionsTotal != null">
|
||||||
|
pass_assertions_total = #{passAssertionsTotal,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="fakeCode != null">
|
||||||
|
fake_code = #{fakeCode,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="requestName != null">
|
||||||
|
request_name = #{requestName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="projectId != null">
|
||||||
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="errorTotal != null">
|
||||||
|
error_total = #{errorTotal,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="code != null">
|
||||||
|
code = #{code,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="content != null">
|
||||||
|
content = #{content,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.api.domain.ApiReportDetail">
|
||||||
|
update api_report_detail
|
||||||
|
set report_id = #{reportId,jdbcType=VARCHAR},
|
||||||
|
resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||||
|
start_time = #{startTime,jdbcType=BIGINT},
|
||||||
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
request_time = #{requestTime,jdbcType=BIGINT},
|
||||||
|
assertions_total = #{assertionsTotal,jdbcType=BIGINT},
|
||||||
|
pass_assertions_total = #{passAssertionsTotal,jdbcType=BIGINT},
|
||||||
|
fake_code = #{fakeCode,jdbcType=VARCHAR},
|
||||||
|
request_name = #{requestName,jdbcType=VARCHAR},
|
||||||
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
|
error_total = #{errorTotal,jdbcType=INTEGER},
|
||||||
|
code = #{code,jdbcType=VARCHAR},
|
||||||
|
content = #{content,jdbcType=LONGVARBINARY}
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.api.domain.ApiReportDetail">
|
||||||
|
update api_report_detail
|
||||||
|
set report_id = #{reportId,jdbcType=VARCHAR},
|
||||||
|
resource_id = #{resourceId,jdbcType=VARCHAR},
|
||||||
|
start_time = #{startTime,jdbcType=BIGINT},
|
||||||
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
request_time = #{requestTime,jdbcType=BIGINT},
|
||||||
|
assertions_total = #{assertionsTotal,jdbcType=BIGINT},
|
||||||
|
pass_assertions_total = #{passAssertionsTotal,jdbcType=BIGINT},
|
||||||
|
fake_code = #{fakeCode,jdbcType=VARCHAR},
|
||||||
|
request_name = #{requestName,jdbcType=VARCHAR},
|
||||||
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
|
error_total = #{errorTotal,jdbcType=INTEGER},
|
||||||
|
code = #{code,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<insert id="batchInsert" parameterType="map">
|
||||||
|
insert into api_report_detail
|
||||||
|
(id, report_id, resource_id, start_time, `status`, request_time, assertions_total,
|
||||||
|
pass_assertions_total, fake_code, request_name, project_id, error_total, code,
|
||||||
|
content)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.id,jdbcType=VARCHAR}, #{item.reportId,jdbcType=VARCHAR}, #{item.resourceId,jdbcType=VARCHAR},
|
||||||
|
#{item.startTime,jdbcType=BIGINT}, #{item.status,jdbcType=VARCHAR}, #{item.requestTime,jdbcType=BIGINT},
|
||||||
|
#{item.assertionsTotal,jdbcType=BIGINT}, #{item.passAssertionsTotal,jdbcType=BIGINT},
|
||||||
|
#{item.fakeCode,jdbcType=VARCHAR}, #{item.requestName,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR},
|
||||||
|
#{item.errorTotal,jdbcType=INTEGER}, #{item.code,jdbcType=VARCHAR}, #{item.content,jdbcType=LONGVARBINARY}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
|
insert into api_report_detail (
|
||||||
|
<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="'report_id'.toString() == column.value">
|
||||||
|
#{item.reportId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'resource_id'.toString() == column.value">
|
||||||
|
#{item.resourceId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'start_time'.toString() == column.value">
|
||||||
|
#{item.startTime,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
<if test="'status'.toString() == column.value">
|
||||||
|
#{item.status,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'request_time'.toString() == column.value">
|
||||||
|
#{item.requestTime,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
<if test="'assertions_total'.toString() == column.value">
|
||||||
|
#{item.assertionsTotal,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
<if test="'pass_assertions_total'.toString() == column.value">
|
||||||
|
#{item.passAssertionsTotal,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
<if test="'fake_code'.toString() == column.value">
|
||||||
|
#{item.fakeCode,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'request_name'.toString() == column.value">
|
||||||
|
#{item.requestName,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'project_id'.toString() == column.value">
|
||||||
|
#{item.projectId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'error_total'.toString() == column.value">
|
||||||
|
#{item.errorTotal,jdbcType=INTEGER}
|
||||||
|
</if>
|
||||||
|
<if test="'code'.toString() == column.value">
|
||||||
|
#{item.code,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'content'.toString() == column.value">
|
||||||
|
#{item.content,jdbcType=LONGVARBINARY}
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
|
@ -0,0 +1,38 @@
|
||||||
|
package io.metersphere.api.mapper;
|
||||||
|
|
||||||
|
import io.metersphere.api.domain.ApiReportLog;
|
||||||
|
import io.metersphere.api.domain.ApiReportLogExample;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
public interface ApiReportLogMapper {
|
||||||
|
long countByExample(ApiReportLogExample example);
|
||||||
|
|
||||||
|
int deleteByExample(ApiReportLogExample example);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String reportId);
|
||||||
|
|
||||||
|
int insert(ApiReportLog record);
|
||||||
|
|
||||||
|
int insertSelective(ApiReportLog record);
|
||||||
|
|
||||||
|
List<ApiReportLog> selectByExampleWithBLOBs(ApiReportLogExample example);
|
||||||
|
|
||||||
|
List<ApiReportLog> selectByExample(ApiReportLogExample example);
|
||||||
|
|
||||||
|
ApiReportLog selectByPrimaryKey(String reportId);
|
||||||
|
|
||||||
|
int updateByExampleSelective(@Param("record") ApiReportLog record, @Param("example") ApiReportLogExample example);
|
||||||
|
|
||||||
|
int updateByExampleWithBLOBs(@Param("record") ApiReportLog record, @Param("example") ApiReportLogExample example);
|
||||||
|
|
||||||
|
int updateByExample(@Param("record") ApiReportLog record, @Param("example") ApiReportLogExample example);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(ApiReportLog record);
|
||||||
|
|
||||||
|
int updateByPrimaryKeyWithBLOBs(ApiReportLog record);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<ApiReportLog> list);
|
||||||
|
|
||||||
|
int batchInsertSelective(@Param("list") List<ApiReportLog> list, @Param("selective") ApiReportLog.Column ... selective);
|
||||||
|
}
|
|
@ -1,12 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="io.metersphere.api.mapper.ApiReportBlobMapper">
|
<mapper namespace="io.metersphere.api.mapper.ApiReportLogMapper">
|
||||||
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiReportBlob">
|
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiReportLog">
|
||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
<id column="report_id" jdbcType="VARCHAR" property="reportId" />
|
||||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.api.domain.ApiReportBlob">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.api.domain.ApiReportLog">
|
||||||
<result column="content" jdbcType="LONGVARBINARY" property="content" />
|
|
||||||
<result column="console" jdbcType="LONGVARBINARY" property="console" />
|
<result column="console" jdbcType="LONGVARBINARY" property="console" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
|
@ -68,12 +66,12 @@
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, environment_id
|
report_id
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
content, console
|
console
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.api.domain.ApiReportBlobExample" resultMap="ResultMapWithBLOBs">
|
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.api.domain.ApiReportLogExample" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
<if test="distinct">
|
<if test="distinct">
|
||||||
distinct
|
distinct
|
||||||
|
@ -81,7 +79,7 @@
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
,
|
,
|
||||||
<include refid="Blob_Column_List" />
|
<include refid="Blob_Column_List" />
|
||||||
from api_report_blob
|
from api_report_log
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Example_Where_Clause" />
|
<include refid="Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -89,13 +87,13 @@
|
||||||
order by ${orderByClause}
|
order by ${orderByClause}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiReportBlobExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiReportLogExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
<if test="distinct">
|
<if test="distinct">
|
||||||
distinct
|
distinct
|
||||||
</if>
|
</if>
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
from api_report_blob
|
from api_report_log
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Example_Where_Clause" />
|
<include refid="Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -108,73 +106,53 @@
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
,
|
,
|
||||||
<include refid="Blob_Column_List" />
|
<include refid="Blob_Column_List" />
|
||||||
from api_report_blob
|
from api_report_log
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
delete from api_report_blob
|
delete from api_report_log
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="deleteByExample" parameterType="io.metersphere.api.domain.ApiReportBlobExample">
|
<delete id="deleteByExample" parameterType="io.metersphere.api.domain.ApiReportLogExample">
|
||||||
delete from api_report_blob
|
delete from api_report_log
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Example_Where_Clause" />
|
<include refid="Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.api.domain.ApiReportBlob">
|
<insert id="insert" parameterType="io.metersphere.api.domain.ApiReportLog">
|
||||||
insert into api_report_blob (id, environment_id, content,
|
insert into api_report_log (report_id, console)
|
||||||
console)
|
values (#{reportId,jdbcType=VARCHAR}, #{console,jdbcType=LONGVARBINARY})
|
||||||
values (#{id,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARBINARY},
|
|
||||||
#{console,jdbcType=LONGVARBINARY})
|
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiReportBlob">
|
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiReportLog">
|
||||||
insert into api_report_blob
|
insert into api_report_log
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="reportId != null">
|
||||||
id,
|
report_id,
|
||||||
</if>
|
|
||||||
<if test="environmentId != null">
|
|
||||||
environment_id,
|
|
||||||
</if>
|
|
||||||
<if test="content != null">
|
|
||||||
content,
|
|
||||||
</if>
|
</if>
|
||||||
<if test="console != null">
|
<if test="console != null">
|
||||||
console,
|
console,
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="reportId != null">
|
||||||
#{id,jdbcType=VARCHAR},
|
#{reportId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="environmentId != null">
|
|
||||||
#{environmentId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="content != null">
|
|
||||||
#{content,jdbcType=LONGVARBINARY},
|
|
||||||
</if>
|
</if>
|
||||||
<if test="console != null">
|
<if test="console != null">
|
||||||
#{console,jdbcType=LONGVARBINARY},
|
#{console,jdbcType=LONGVARBINARY},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiReportBlobExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiReportLogExample" resultType="java.lang.Long">
|
||||||
select count(*) from api_report_blob
|
select count(*) from api_report_log
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Example_Where_Clause" />
|
<include refid="Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<update id="updateByExampleSelective" parameterType="map">
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
update api_report_blob
|
update api_report_log
|
||||||
<set>
|
<set>
|
||||||
<if test="record.id != null">
|
<if test="record.reportId != null">
|
||||||
id = #{record.id,jdbcType=VARCHAR},
|
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="record.environmentId != null">
|
|
||||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.content != null">
|
|
||||||
content = #{record.content,jdbcType=LONGVARBINARY},
|
|
||||||
</if>
|
</if>
|
||||||
<if test="record.console != null">
|
<if test="record.console != null">
|
||||||
console = #{record.console,jdbcType=LONGVARBINARY},
|
console = #{record.console,jdbcType=LONGVARBINARY},
|
||||||
|
@ -185,61 +163,44 @@
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
update api_report_blob
|
update api_report_log
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
|
||||||
content = #{record.content,jdbcType=LONGVARBINARY},
|
|
||||||
console = #{record.console,jdbcType=LONGVARBINARY}
|
console = #{record.console,jdbcType=LONGVARBINARY}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExample" parameterType="map">
|
<update id="updateByExample" parameterType="map">
|
||||||
update api_report_blob
|
update api_report_log
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set report_id = #{record.reportId,jdbcType=VARCHAR}
|
||||||
environment_id = #{record.environmentId,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>
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiReportBlob">
|
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiReportLog">
|
||||||
update api_report_blob
|
update api_report_log
|
||||||
<set>
|
<set>
|
||||||
<if test="environmentId != null">
|
|
||||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="content != null">
|
|
||||||
content = #{content,jdbcType=LONGVARBINARY},
|
|
||||||
</if>
|
|
||||||
<if test="console != null">
|
<if test="console != null">
|
||||||
console = #{console,jdbcType=LONGVARBINARY},
|
console = #{console,jdbcType=LONGVARBINARY},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.api.domain.ApiReportBlob">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.api.domain.ApiReportLog">
|
||||||
update api_report_blob
|
update api_report_log
|
||||||
set environment_id = #{environmentId,jdbcType=VARCHAR},
|
set console = #{console,jdbcType=LONGVARBINARY}
|
||||||
content = #{content,jdbcType=LONGVARBINARY},
|
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||||
console = #{console,jdbcType=LONGVARBINARY}
|
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
|
||||||
</update>
|
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.api.domain.ApiReportBlob">
|
|
||||||
update api_report_blob
|
|
||||||
set environment_id = #{environmentId,jdbcType=VARCHAR}
|
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
|
||||||
</update>
|
</update>
|
||||||
<insert id="batchInsert" parameterType="map">
|
<insert id="batchInsert" parameterType="map">
|
||||||
insert into api_report_blob
|
insert into api_report_log
|
||||||
(id, environment_id, content, console)
|
(report_id, console)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.id,jdbcType=VARCHAR}, #{item.environmentId,jdbcType=VARCHAR}, #{item.content,jdbcType=LONGVARBINARY},
|
(#{item.reportId,jdbcType=VARCHAR}, #{item.console,jdbcType=LONGVARBINARY})
|
||||||
#{item.console,jdbcType=LONGVARBINARY})
|
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="batchInsertSelective" parameterType="map">
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
insert into api_report_blob (
|
insert into api_report_log (
|
||||||
<foreach collection="selective" item="column" separator=",">
|
<foreach collection="selective" item="column" separator=",">
|
||||||
${column.escapedColumnName}
|
${column.escapedColumnName}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
@ -248,14 +209,8 @@
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(
|
(
|
||||||
<foreach collection="selective" item="column" separator=",">
|
<foreach collection="selective" item="column" separator=",">
|
||||||
<if test="'id'.toString() == column.value">
|
<if test="'report_id'.toString() == column.value">
|
||||||
#{item.id,jdbcType=VARCHAR}
|
#{item.reportId,jdbcType=VARCHAR}
|
||||||
</if>
|
|
||||||
<if test="'environment_id'.toString() == column.value">
|
|
||||||
#{item.environmentId,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="'content'.toString() == column.value">
|
|
||||||
#{item.content,jdbcType=LONGVARBINARY}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="'console'.toString() == column.value">
|
<if test="'console'.toString() == column.value">
|
||||||
#{item.console,jdbcType=LONGVARBINARY}
|
#{item.console,jdbcType=LONGVARBINARY}
|
|
@ -11,15 +11,13 @@
|
||||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
<result column="start_time" jdbcType="BIGINT" property="startTime" />
|
|
||||||
<result column="end_time" jdbcType="BIGINT" property="endTime" />
|
|
||||||
<result column="run_mode" jdbcType="VARCHAR" property="runMode" />
|
<result column="run_mode" jdbcType="VARCHAR" property="runMode" />
|
||||||
<result column="pool_id" jdbcType="VARCHAR" property="poolId" />
|
<result column="pool_id" jdbcType="VARCHAR" property="poolId" />
|
||||||
<result column="trigger_mode" jdbcType="VARCHAR" property="triggerMode" />
|
<result column="trigger_mode" jdbcType="VARCHAR" property="triggerMode" />
|
||||||
<result column="version_id" jdbcType="VARCHAR" property="versionId" />
|
<result column="version_id" jdbcType="VARCHAR" property="versionId" />
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
<result column="integrated_report_id" jdbcType="VARCHAR" property="integratedReportId" />
|
|
||||||
<result column="integrated" jdbcType="BIT" property="integrated" />
|
<result column="integrated" jdbcType="BIT" property="integrated" />
|
||||||
|
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
|
@ -81,8 +79,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, `name`, resource_id, create_time, update_time, create_user, update_user, deleted,
|
id, `name`, resource_id, create_time, update_time, create_user, update_user, deleted,
|
||||||
`status`, start_time, end_time, run_mode, pool_id, trigger_mode, version_id, project_id,
|
`status`, run_mode, pool_id, trigger_mode, version_id, project_id, integrated, environment_id
|
||||||
integrated_report_id, integrated
|
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiReportExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiReportExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
|
@ -118,17 +115,15 @@
|
||||||
insert into api_report (id, `name`, resource_id,
|
insert into api_report (id, `name`, resource_id,
|
||||||
create_time, update_time, create_user,
|
create_time, update_time, create_user,
|
||||||
update_user, deleted, `status`,
|
update_user, deleted, `status`,
|
||||||
start_time, end_time, run_mode,
|
run_mode, pool_id, trigger_mode,
|
||||||
pool_id, trigger_mode, version_id,
|
version_id, project_id, integrated,
|
||||||
project_id, integrated_report_id, integrated
|
environment_id)
|
||||||
)
|
|
||||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR},
|
||||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR},
|
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR},
|
||||||
#{updateUser,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT}, #{status,jdbcType=VARCHAR},
|
#{updateUser,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT}, #{status,jdbcType=VARCHAR},
|
||||||
#{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{runMode,jdbcType=VARCHAR},
|
#{runMode,jdbcType=VARCHAR}, #{poolId,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR},
|
||||||
#{poolId,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}, #{versionId,jdbcType=VARCHAR},
|
#{versionId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{integrated,jdbcType=BIT},
|
||||||
#{projectId,jdbcType=VARCHAR}, #{integratedReportId,jdbcType=VARCHAR}, #{integrated,jdbcType=BIT}
|
#{environmentId,jdbcType=VARCHAR})
|
||||||
)
|
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiReport">
|
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiReport">
|
||||||
insert into api_report
|
insert into api_report
|
||||||
|
@ -160,12 +155,6 @@
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
`status`,
|
`status`,
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null">
|
|
||||||
start_time,
|
|
||||||
</if>
|
|
||||||
<if test="endTime != null">
|
|
||||||
end_time,
|
|
||||||
</if>
|
|
||||||
<if test="runMode != null">
|
<if test="runMode != null">
|
||||||
run_mode,
|
run_mode,
|
||||||
</if>
|
</if>
|
||||||
|
@ -181,12 +170,12 @@
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id,
|
project_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="integratedReportId != null">
|
|
||||||
integrated_report_id,
|
|
||||||
</if>
|
|
||||||
<if test="integrated != null">
|
<if test="integrated != null">
|
||||||
integrated,
|
integrated,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="environmentId != null">
|
||||||
|
environment_id,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
@ -216,12 +205,6 @@
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
#{status,jdbcType=VARCHAR},
|
#{status,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null">
|
|
||||||
#{startTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="endTime != null">
|
|
||||||
#{endTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="runMode != null">
|
<if test="runMode != null">
|
||||||
#{runMode,jdbcType=VARCHAR},
|
#{runMode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -237,12 +220,12 @@
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
#{projectId,jdbcType=VARCHAR},
|
#{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="integratedReportId != null">
|
|
||||||
#{integratedReportId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="integrated != null">
|
<if test="integrated != null">
|
||||||
#{integrated,jdbcType=BIT},
|
#{integrated,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="environmentId != null">
|
||||||
|
#{environmentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiReportExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiReportExample" resultType="java.lang.Long">
|
||||||
|
@ -281,12 +264,6 @@
|
||||||
<if test="record.status != null">
|
<if test="record.status != null">
|
||||||
`status` = #{record.status,jdbcType=VARCHAR},
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.startTime != null">
|
|
||||||
start_time = #{record.startTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="record.endTime != null">
|
|
||||||
end_time = #{record.endTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="record.runMode != null">
|
<if test="record.runMode != null">
|
||||||
run_mode = #{record.runMode,jdbcType=VARCHAR},
|
run_mode = #{record.runMode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -302,12 +279,12 @@
|
||||||
<if test="record.projectId != null">
|
<if test="record.projectId != null">
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.integratedReportId != null">
|
|
||||||
integrated_report_id = #{record.integratedReportId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.integrated != null">
|
<if test="record.integrated != null">
|
||||||
integrated = #{record.integrated,jdbcType=BIT},
|
integrated = #{record.integrated,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.environmentId != null">
|
||||||
|
environment_id = #{record.environmentId,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" />
|
||||||
|
@ -324,15 +301,13 @@
|
||||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||||
deleted = #{record.deleted,jdbcType=BIT},
|
deleted = #{record.deleted,jdbcType=BIT},
|
||||||
`status` = #{record.status,jdbcType=VARCHAR},
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
start_time = #{record.startTime,jdbcType=BIGINT},
|
|
||||||
end_time = #{record.endTime,jdbcType=BIGINT},
|
|
||||||
run_mode = #{record.runMode,jdbcType=VARCHAR},
|
run_mode = #{record.runMode,jdbcType=VARCHAR},
|
||||||
pool_id = #{record.poolId,jdbcType=VARCHAR},
|
pool_id = #{record.poolId,jdbcType=VARCHAR},
|
||||||
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR},
|
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR},
|
||||||
version_id = #{record.versionId,jdbcType=VARCHAR},
|
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
integrated_report_id = #{record.integratedReportId,jdbcType=VARCHAR},
|
integrated = #{record.integrated,jdbcType=BIT},
|
||||||
integrated = #{record.integrated,jdbcType=BIT}
|
environment_id = #{record.environmentId,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>
|
||||||
|
@ -364,12 +339,6 @@
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
`status` = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null">
|
|
||||||
start_time = #{startTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="endTime != null">
|
|
||||||
end_time = #{endTime,jdbcType=BIGINT},
|
|
||||||
</if>
|
|
||||||
<if test="runMode != null">
|
<if test="runMode != null">
|
||||||
run_mode = #{runMode,jdbcType=VARCHAR},
|
run_mode = #{runMode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -385,12 +354,12 @@
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="integratedReportId != null">
|
|
||||||
integrated_report_id = #{integratedReportId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="integrated != null">
|
<if test="integrated != null">
|
||||||
integrated = #{integrated,jdbcType=BIT},
|
integrated = #{integrated,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="environmentId != null">
|
||||||
|
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
@ -404,31 +373,28 @@
|
||||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||||
deleted = #{deleted,jdbcType=BIT},
|
deleted = #{deleted,jdbcType=BIT},
|
||||||
`status` = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
start_time = #{startTime,jdbcType=BIGINT},
|
|
||||||
end_time = #{endTime,jdbcType=BIGINT},
|
|
||||||
run_mode = #{runMode,jdbcType=VARCHAR},
|
run_mode = #{runMode,jdbcType=VARCHAR},
|
||||||
pool_id = #{poolId,jdbcType=VARCHAR},
|
pool_id = #{poolId,jdbcType=VARCHAR},
|
||||||
trigger_mode = #{triggerMode,jdbcType=VARCHAR},
|
trigger_mode = #{triggerMode,jdbcType=VARCHAR},
|
||||||
version_id = #{versionId,jdbcType=VARCHAR},
|
version_id = #{versionId,jdbcType=VARCHAR},
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
integrated_report_id = #{integratedReportId,jdbcType=VARCHAR},
|
integrated = #{integrated,jdbcType=BIT},
|
||||||
integrated = #{integrated,jdbcType=BIT}
|
environment_id = #{environmentId,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 api_report
|
insert into api_report
|
||||||
(id, `name`, resource_id, create_time, update_time, create_user, update_user, deleted,
|
(id, `name`, resource_id, create_time, update_time, create_user, update_user, deleted,
|
||||||
`status`, start_time, end_time, run_mode, pool_id, trigger_mode, version_id, project_id,
|
`status`, run_mode, pool_id, trigger_mode, version_id, project_id, integrated,
|
||||||
integrated_report_id, integrated)
|
environment_id)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.resourceId,jdbcType=VARCHAR},
|
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.resourceId,jdbcType=VARCHAR},
|
||||||
#{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR},
|
#{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR},
|
||||||
#{item.updateUser,jdbcType=VARCHAR}, #{item.deleted,jdbcType=BIT}, #{item.status,jdbcType=VARCHAR},
|
#{item.updateUser,jdbcType=VARCHAR}, #{item.deleted,jdbcType=BIT}, #{item.status,jdbcType=VARCHAR},
|
||||||
#{item.startTime,jdbcType=BIGINT}, #{item.endTime,jdbcType=BIGINT}, #{item.runMode,jdbcType=VARCHAR},
|
#{item.runMode,jdbcType=VARCHAR}, #{item.poolId,jdbcType=VARCHAR}, #{item.triggerMode,jdbcType=VARCHAR},
|
||||||
#{item.poolId,jdbcType=VARCHAR}, #{item.triggerMode,jdbcType=VARCHAR}, #{item.versionId,jdbcType=VARCHAR},
|
#{item.versionId,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.integrated,jdbcType=BIT},
|
||||||
#{item.projectId,jdbcType=VARCHAR}, #{item.integratedReportId,jdbcType=VARCHAR},
|
#{item.environmentId,jdbcType=VARCHAR})
|
||||||
#{item.integrated,jdbcType=BIT})
|
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="batchInsertSelective" parameterType="map">
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
|
@ -468,12 +434,6 @@
|
||||||
<if test="'status'.toString() == column.value">
|
<if test="'status'.toString() == column.value">
|
||||||
#{item.status,jdbcType=VARCHAR}
|
#{item.status,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="'start_time'.toString() == column.value">
|
|
||||||
#{item.startTime,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
<if test="'end_time'.toString() == column.value">
|
|
||||||
#{item.endTime,jdbcType=BIGINT}
|
|
||||||
</if>
|
|
||||||
<if test="'run_mode'.toString() == column.value">
|
<if test="'run_mode'.toString() == column.value">
|
||||||
#{item.runMode,jdbcType=VARCHAR}
|
#{item.runMode,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
|
@ -489,12 +449,12 @@
|
||||||
<if test="'project_id'.toString() == column.value">
|
<if test="'project_id'.toString() == column.value">
|
||||||
#{item.projectId,jdbcType=VARCHAR}
|
#{item.projectId,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="'integrated_report_id'.toString() == column.value">
|
|
||||||
#{item.integratedReportId,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="'integrated'.toString() == column.value">
|
<if test="'integrated'.toString() == column.value">
|
||||||
#{item.integrated,jdbcType=BIT}
|
#{item.integrated,jdbcType=BIT}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="'environment_id'.toString() == column.value">
|
||||||
|
#{item.environmentId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<result column="pass_assertions_total" jdbcType="BIGINT" property="passAssertionsTotal" />
|
<result column="pass_assertions_total" jdbcType="BIGINT" property="passAssertionsTotal" />
|
||||||
<result column="fake_code" jdbcType="VARCHAR" property="fakeCode" />
|
<result column="fake_code" jdbcType="VARCHAR" property="fakeCode" />
|
||||||
<result column="request_name" jdbcType="VARCHAR" property="requestName" />
|
<result column="request_name" jdbcType="VARCHAR" property="requestName" />
|
||||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
<result column="error_total" jdbcType="INTEGER" property="errorTotal" />
|
<result column="error_total" jdbcType="INTEGER" property="errorTotal" />
|
||||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||||
|
@ -80,8 +79,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, report_id, resource_id, start_time, `status`, request_time, assertions_total,
|
id, report_id, resource_id, start_time, `status`, request_time, assertions_total,
|
||||||
pass_assertions_total, fake_code, request_name, environment_id, project_id, error_total,
|
pass_assertions_total, fake_code, request_name, project_id, error_total, code
|
||||||
code
|
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
content
|
content
|
||||||
|
@ -138,15 +136,13 @@
|
||||||
insert into api_scenario_report_detail (id, report_id, resource_id,
|
insert into api_scenario_report_detail (id, report_id, resource_id,
|
||||||
start_time, `status`, request_time,
|
start_time, `status`, request_time,
|
||||||
assertions_total, pass_assertions_total, fake_code,
|
assertions_total, pass_assertions_total, fake_code,
|
||||||
request_name, environment_id, project_id,
|
request_name, project_id, error_total,
|
||||||
error_total, code, content
|
code, content)
|
||||||
)
|
|
||||||
values (#{id,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR},
|
||||||
#{startTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR}, #{requestTime,jdbcType=BIGINT},
|
#{startTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR}, #{requestTime,jdbcType=BIGINT},
|
||||||
#{assertionsTotal,jdbcType=BIGINT}, #{passAssertionsTotal,jdbcType=BIGINT}, #{fakeCode,jdbcType=VARCHAR},
|
#{assertionsTotal,jdbcType=BIGINT}, #{passAssertionsTotal,jdbcType=BIGINT}, #{fakeCode,jdbcType=VARCHAR},
|
||||||
#{requestName,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
|
#{requestName,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{errorTotal,jdbcType=INTEGER},
|
||||||
#{errorTotal,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARBINARY}
|
#{code,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARBINARY})
|
||||||
)
|
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenarioReportDetail">
|
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenarioReportDetail">
|
||||||
insert into api_scenario_report_detail
|
insert into api_scenario_report_detail
|
||||||
|
@ -181,9 +177,6 @@
|
||||||
<if test="requestName != null">
|
<if test="requestName != null">
|
||||||
request_name,
|
request_name,
|
||||||
</if>
|
</if>
|
||||||
<if test="environmentId != null">
|
|
||||||
environment_id,
|
|
||||||
</if>
|
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id,
|
project_id,
|
||||||
</if>
|
</if>
|
||||||
|
@ -228,9 +221,6 @@
|
||||||
<if test="requestName != null">
|
<if test="requestName != null">
|
||||||
#{requestName,jdbcType=VARCHAR},
|
#{requestName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="environmentId != null">
|
|
||||||
#{environmentId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
#{projectId,jdbcType=VARCHAR},
|
#{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -284,9 +274,6 @@
|
||||||
<if test="record.requestName != null">
|
<if test="record.requestName != null">
|
||||||
request_name = #{record.requestName,jdbcType=VARCHAR},
|
request_name = #{record.requestName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.environmentId != null">
|
|
||||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.projectId != null">
|
<if test="record.projectId != null">
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -316,7 +303,6 @@
|
||||||
pass_assertions_total = #{record.passAssertionsTotal,jdbcType=BIGINT},
|
pass_assertions_total = #{record.passAssertionsTotal,jdbcType=BIGINT},
|
||||||
fake_code = #{record.fakeCode,jdbcType=VARCHAR},
|
fake_code = #{record.fakeCode,jdbcType=VARCHAR},
|
||||||
request_name = #{record.requestName,jdbcType=VARCHAR},
|
request_name = #{record.requestName,jdbcType=VARCHAR},
|
||||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
error_total = #{record.errorTotal,jdbcType=INTEGER},
|
error_total = #{record.errorTotal,jdbcType=INTEGER},
|
||||||
code = #{record.code,jdbcType=VARCHAR},
|
code = #{record.code,jdbcType=VARCHAR},
|
||||||
|
@ -337,7 +323,6 @@
|
||||||
pass_assertions_total = #{record.passAssertionsTotal,jdbcType=BIGINT},
|
pass_assertions_total = #{record.passAssertionsTotal,jdbcType=BIGINT},
|
||||||
fake_code = #{record.fakeCode,jdbcType=VARCHAR},
|
fake_code = #{record.fakeCode,jdbcType=VARCHAR},
|
||||||
request_name = #{record.requestName,jdbcType=VARCHAR},
|
request_name = #{record.requestName,jdbcType=VARCHAR},
|
||||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
error_total = #{record.errorTotal,jdbcType=INTEGER},
|
error_total = #{record.errorTotal,jdbcType=INTEGER},
|
||||||
code = #{record.code,jdbcType=VARCHAR}
|
code = #{record.code,jdbcType=VARCHAR}
|
||||||
|
@ -375,9 +360,6 @@
|
||||||
<if test="requestName != null">
|
<if test="requestName != null">
|
||||||
request_name = #{requestName,jdbcType=VARCHAR},
|
request_name = #{requestName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="environmentId != null">
|
|
||||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -404,7 +386,6 @@
|
||||||
pass_assertions_total = #{passAssertionsTotal,jdbcType=BIGINT},
|
pass_assertions_total = #{passAssertionsTotal,jdbcType=BIGINT},
|
||||||
fake_code = #{fakeCode,jdbcType=VARCHAR},
|
fake_code = #{fakeCode,jdbcType=VARCHAR},
|
||||||
request_name = #{requestName,jdbcType=VARCHAR},
|
request_name = #{requestName,jdbcType=VARCHAR},
|
||||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
error_total = #{errorTotal,jdbcType=INTEGER},
|
error_total = #{errorTotal,jdbcType=INTEGER},
|
||||||
code = #{code,jdbcType=VARCHAR},
|
code = #{code,jdbcType=VARCHAR},
|
||||||
|
@ -422,7 +403,6 @@
|
||||||
pass_assertions_total = #{passAssertionsTotal,jdbcType=BIGINT},
|
pass_assertions_total = #{passAssertionsTotal,jdbcType=BIGINT},
|
||||||
fake_code = #{fakeCode,jdbcType=VARCHAR},
|
fake_code = #{fakeCode,jdbcType=VARCHAR},
|
||||||
request_name = #{requestName,jdbcType=VARCHAR},
|
request_name = #{requestName,jdbcType=VARCHAR},
|
||||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
error_total = #{errorTotal,jdbcType=INTEGER},
|
error_total = #{errorTotal,jdbcType=INTEGER},
|
||||||
code = #{code,jdbcType=VARCHAR}
|
code = #{code,jdbcType=VARCHAR}
|
||||||
|
@ -431,16 +411,16 @@
|
||||||
<insert id="batchInsert" parameterType="map">
|
<insert id="batchInsert" parameterType="map">
|
||||||
insert into api_scenario_report_detail
|
insert into api_scenario_report_detail
|
||||||
(id, report_id, resource_id, start_time, `status`, request_time, assertions_total,
|
(id, report_id, resource_id, start_time, `status`, request_time, assertions_total,
|
||||||
pass_assertions_total, fake_code, request_name, environment_id, project_id, error_total,
|
pass_assertions_total, fake_code, request_name, project_id, error_total, code,
|
||||||
code, content)
|
content)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.id,jdbcType=VARCHAR}, #{item.reportId,jdbcType=VARCHAR}, #{item.resourceId,jdbcType=VARCHAR},
|
(#{item.id,jdbcType=VARCHAR}, #{item.reportId,jdbcType=VARCHAR}, #{item.resourceId,jdbcType=VARCHAR},
|
||||||
#{item.startTime,jdbcType=BIGINT}, #{item.status,jdbcType=VARCHAR}, #{item.requestTime,jdbcType=BIGINT},
|
#{item.startTime,jdbcType=BIGINT}, #{item.status,jdbcType=VARCHAR}, #{item.requestTime,jdbcType=BIGINT},
|
||||||
#{item.assertionsTotal,jdbcType=BIGINT}, #{item.passAssertionsTotal,jdbcType=BIGINT},
|
#{item.assertionsTotal,jdbcType=BIGINT}, #{item.passAssertionsTotal,jdbcType=BIGINT},
|
||||||
#{item.fakeCode,jdbcType=VARCHAR}, #{item.requestName,jdbcType=VARCHAR}, #{item.environmentId,jdbcType=VARCHAR},
|
#{item.fakeCode,jdbcType=VARCHAR}, #{item.requestName,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR},
|
||||||
#{item.projectId,jdbcType=VARCHAR}, #{item.errorTotal,jdbcType=INTEGER}, #{item.code,jdbcType=VARCHAR},
|
#{item.errorTotal,jdbcType=INTEGER}, #{item.code,jdbcType=VARCHAR}, #{item.content,jdbcType=LONGVARBINARY}
|
||||||
#{item.content,jdbcType=LONGVARBINARY})
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="batchInsertSelective" parameterType="map">
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
|
@ -483,9 +463,6 @@
|
||||||
<if test="'request_name'.toString() == column.value">
|
<if test="'request_name'.toString() == column.value">
|
||||||
#{item.requestName,jdbcType=VARCHAR}
|
#{item.requestName,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
<if test="'environment_id'.toString() == column.value">
|
|
||||||
#{item.environmentId,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="'project_id'.toString() == column.value">
|
<if test="'project_id'.toString() == column.value">
|
||||||
#{item.projectId,jdbcType=VARCHAR}
|
#{item.projectId,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
<result column="integrated" jdbcType="BIT" property="integrated" />
|
<result column="integrated" jdbcType="BIT" property="integrated" />
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
<result column="scenario_id" jdbcType="VARCHAR" property="scenarioId" />
|
<result column="scenario_id" jdbcType="VARCHAR" property="scenarioId" />
|
||||||
|
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
|
@ -82,7 +83,7 @@
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, `name`, create_time, create_user, delete_time, delete_user, deleted, update_user,
|
id, `name`, create_time, create_user, delete_time, delete_user, deleted, update_user,
|
||||||
update_time, pass_rate, `status`, trigger_mode, run_mode, pool_id, version_id, integrated,
|
update_time, pass_rate, `status`, trigger_mode, run_mode, pool_id, version_id, integrated,
|
||||||
project_id, scenario_id
|
project_id, scenario_id, environment_id
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiScenarioReportExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiScenarioReportExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
|
@ -120,15 +121,15 @@
|
||||||
deleted, update_user, update_time,
|
deleted, update_user, update_time,
|
||||||
pass_rate, `status`, trigger_mode,
|
pass_rate, `status`, trigger_mode,
|
||||||
run_mode, pool_id, version_id,
|
run_mode, pool_id, version_id,
|
||||||
integrated, project_id, scenario_id
|
integrated, project_id, scenario_id,
|
||||||
)
|
environment_id)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||||
#{createUser,jdbcType=VARCHAR}, #{deleteTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR},
|
#{createUser,jdbcType=VARCHAR}, #{deleteTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR},
|
||||||
#{deleted,jdbcType=BIT}, #{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT},
|
#{deleted,jdbcType=BIT}, #{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT},
|
||||||
#{passRate,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR},
|
#{passRate,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR},
|
||||||
#{runMode,jdbcType=VARCHAR}, #{poolId,jdbcType=VARCHAR}, #{versionId,jdbcType=VARCHAR},
|
#{runMode,jdbcType=VARCHAR}, #{poolId,jdbcType=VARCHAR}, #{versionId,jdbcType=VARCHAR},
|
||||||
#{integrated,jdbcType=BIT}, #{projectId,jdbcType=VARCHAR}, #{scenarioId,jdbcType=VARCHAR}
|
#{integrated,jdbcType=BIT}, #{projectId,jdbcType=VARCHAR}, #{scenarioId,jdbcType=VARCHAR},
|
||||||
)
|
#{environmentId,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenarioReport">
|
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenarioReport">
|
||||||
insert into api_scenario_report
|
insert into api_scenario_report
|
||||||
|
@ -187,6 +188,9 @@
|
||||||
<if test="scenarioId != null">
|
<if test="scenarioId != null">
|
||||||
scenario_id,
|
scenario_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="environmentId != null">
|
||||||
|
environment_id,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
@ -243,6 +247,9 @@
|
||||||
<if test="scenarioId != null">
|
<if test="scenarioId != null">
|
||||||
#{scenarioId,jdbcType=VARCHAR},
|
#{scenarioId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="environmentId != null">
|
||||||
|
#{environmentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiScenarioReportExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiScenarioReportExample" resultType="java.lang.Long">
|
||||||
|
@ -308,6 +315,9 @@
|
||||||
<if test="record.scenarioId != null">
|
<if test="record.scenarioId != null">
|
||||||
scenario_id = #{record.scenarioId,jdbcType=VARCHAR},
|
scenario_id = #{record.scenarioId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.environmentId != null">
|
||||||
|
environment_id = #{record.environmentId,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" />
|
||||||
|
@ -332,7 +342,8 @@
|
||||||
version_id = #{record.versionId,jdbcType=VARCHAR},
|
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||||
integrated = #{record.integrated,jdbcType=BIT},
|
integrated = #{record.integrated,jdbcType=BIT},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
scenario_id = #{record.scenarioId,jdbcType=VARCHAR}
|
scenario_id = #{record.scenarioId,jdbcType=VARCHAR},
|
||||||
|
environment_id = #{record.environmentId,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>
|
||||||
|
@ -391,6 +402,9 @@
|
||||||
<if test="scenarioId != null">
|
<if test="scenarioId != null">
|
||||||
scenario_id = #{scenarioId,jdbcType=VARCHAR},
|
scenario_id = #{scenarioId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="environmentId != null">
|
||||||
|
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
@ -412,14 +426,15 @@
|
||||||
version_id = #{versionId,jdbcType=VARCHAR},
|
version_id = #{versionId,jdbcType=VARCHAR},
|
||||||
integrated = #{integrated,jdbcType=BIT},
|
integrated = #{integrated,jdbcType=BIT},
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
scenario_id = #{scenarioId,jdbcType=VARCHAR}
|
scenario_id = #{scenarioId,jdbcType=VARCHAR},
|
||||||
|
environment_id = #{environmentId,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 api_scenario_report
|
insert into api_scenario_report
|
||||||
(id, `name`, create_time, create_user, delete_time, delete_user, deleted, update_user,
|
(id, `name`, create_time, create_user, delete_time, delete_user, deleted, update_user,
|
||||||
update_time, pass_rate, `status`, trigger_mode, run_mode, pool_id, version_id,
|
update_time, pass_rate, `status`, trigger_mode, run_mode, pool_id, version_id,
|
||||||
integrated, project_id, scenario_id)
|
integrated, project_id, scenario_id, environment_id)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
||||||
|
@ -427,8 +442,8 @@
|
||||||
#{item.deleted,jdbcType=BIT}, #{item.updateUser,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=BIGINT},
|
#{item.deleted,jdbcType=BIT}, #{item.updateUser,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=BIGINT},
|
||||||
#{item.passRate,jdbcType=BIGINT}, #{item.status,jdbcType=VARCHAR}, #{item.triggerMode,jdbcType=VARCHAR},
|
#{item.passRate,jdbcType=BIGINT}, #{item.status,jdbcType=VARCHAR}, #{item.triggerMode,jdbcType=VARCHAR},
|
||||||
#{item.runMode,jdbcType=VARCHAR}, #{item.poolId,jdbcType=VARCHAR}, #{item.versionId,jdbcType=VARCHAR},
|
#{item.runMode,jdbcType=VARCHAR}, #{item.poolId,jdbcType=VARCHAR}, #{item.versionId,jdbcType=VARCHAR},
|
||||||
#{item.integrated,jdbcType=BIT}, #{item.projectId,jdbcType=VARCHAR}, #{item.scenarioId,jdbcType=VARCHAR}
|
#{item.integrated,jdbcType=BIT}, #{item.projectId,jdbcType=VARCHAR}, #{item.scenarioId,jdbcType=VARCHAR},
|
||||||
)
|
#{item.environmentId,jdbcType=VARCHAR})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="batchInsertSelective" parameterType="map">
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
|
@ -495,6 +510,9 @@
|
||||||
<if test="'scenario_id'.toString() == column.value">
|
<if test="'scenario_id'.toString() == column.value">
|
||||||
#{item.scenarioId,jdbcType=VARCHAR}
|
#{item.scenarioId,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="'environment_id'.toString() == column.value">
|
||||||
|
#{item.environmentId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package io.metersphere.api.mapper;
|
||||||
|
|
||||||
|
import io.metersphere.api.domain.ApiScenarioReportStep;
|
||||||
|
import io.metersphere.api.domain.ApiScenarioReportStepExample;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
public interface ApiScenarioReportStepMapper {
|
||||||
|
long countByExample(ApiScenarioReportStepExample example);
|
||||||
|
|
||||||
|
int deleteByExample(ApiScenarioReportStepExample example);
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(String reportId);
|
||||||
|
|
||||||
|
int insert(ApiScenarioReportStep record);
|
||||||
|
|
||||||
|
int insertSelective(ApiScenarioReportStep record);
|
||||||
|
|
||||||
|
List<ApiScenarioReportStep> selectByExample(ApiScenarioReportStepExample example);
|
||||||
|
|
||||||
|
ApiScenarioReportStep selectByPrimaryKey(String reportId);
|
||||||
|
|
||||||
|
int updateByExampleSelective(@Param("record") ApiScenarioReportStep record, @Param("example") ApiScenarioReportStepExample example);
|
||||||
|
|
||||||
|
int updateByExample(@Param("record") ApiScenarioReportStep record, @Param("example") ApiScenarioReportStepExample example);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(ApiScenarioReportStep record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(ApiScenarioReportStep record);
|
||||||
|
|
||||||
|
int batchInsert(@Param("list") List<ApiScenarioReportStep> list);
|
||||||
|
|
||||||
|
int batchInsertSelective(@Param("list") List<ApiScenarioReportStep> list, @Param("selective") ApiScenarioReportStep.Column ... selective);
|
||||||
|
}
|
|
@ -0,0 +1,386 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="io.metersphere.api.mapper.ApiScenarioReportStepMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiScenarioReportStep">
|
||||||
|
<id column="report_id" jdbcType="VARCHAR" property="reportId" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="sort" jdbcType="BIGINT" property="sort" />
|
||||||
|
<result column="enable" jdbcType="BIT" property="enable" />
|
||||||
|
<result column="resource_id" jdbcType="BIGINT" property="resourceId" />
|
||||||
|
<result column="resource_num" jdbcType="VARCHAR" property="resourceNum" />
|
||||||
|
<result column="step_type" jdbcType="VARCHAR" property="stepType" />
|
||||||
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
|
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
|
||||||
|
<result column="version_id" jdbcType="VARCHAR" property="versionId" />
|
||||||
|
<result column="source" jdbcType="VARCHAR" property="source" />
|
||||||
|
<result column="config" jdbcType="VARCHAR" property="config" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
report_id, `name`, sort, `enable`, resource_id, resource_num, step_type, project_id,
|
||||||
|
parent_id, version_id, `source`, config
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiScenarioReportStepExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from api_scenario_report_step
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from api_scenario_report_step
|
||||||
|
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
|
delete from api_scenario_report_step
|
||||||
|
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="io.metersphere.api.domain.ApiScenarioReportStepExample">
|
||||||
|
delete from api_scenario_report_step
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="io.metersphere.api.domain.ApiScenarioReportStep">
|
||||||
|
insert into api_scenario_report_step (report_id, `name`, sort,
|
||||||
|
`enable`, resource_id, resource_num,
|
||||||
|
step_type, project_id, parent_id,
|
||||||
|
version_id, `source`, config
|
||||||
|
)
|
||||||
|
values (#{reportId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{sort,jdbcType=BIGINT},
|
||||||
|
#{enable,jdbcType=BIT}, #{resourceId,jdbcType=BIGINT}, #{resourceNum,jdbcType=VARCHAR},
|
||||||
|
#{stepType,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR},
|
||||||
|
#{versionId,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{config,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenarioReportStep">
|
||||||
|
insert into api_scenario_report_step
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="reportId != null">
|
||||||
|
report_id,
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</if>
|
||||||
|
<if test="sort != null">
|
||||||
|
sort,
|
||||||
|
</if>
|
||||||
|
<if test="enable != null">
|
||||||
|
`enable`,
|
||||||
|
</if>
|
||||||
|
<if test="resourceId != null">
|
||||||
|
resource_id,
|
||||||
|
</if>
|
||||||
|
<if test="resourceNum != null">
|
||||||
|
resource_num,
|
||||||
|
</if>
|
||||||
|
<if test="stepType != null">
|
||||||
|
step_type,
|
||||||
|
</if>
|
||||||
|
<if test="projectId != null">
|
||||||
|
project_id,
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id,
|
||||||
|
</if>
|
||||||
|
<if test="versionId != null">
|
||||||
|
version_id,
|
||||||
|
</if>
|
||||||
|
<if test="source != null">
|
||||||
|
`source`,
|
||||||
|
</if>
|
||||||
|
<if test="config != null">
|
||||||
|
config,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="reportId != null">
|
||||||
|
#{reportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sort != null">
|
||||||
|
#{sort,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="enable != null">
|
||||||
|
#{enable,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
|
<if test="resourceId != null">
|
||||||
|
#{resourceId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="resourceNum != null">
|
||||||
|
#{resourceNum,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="stepType != null">
|
||||||
|
#{stepType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="projectId != null">
|
||||||
|
#{projectId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
#{parentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="versionId != null">
|
||||||
|
#{versionId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="source != null">
|
||||||
|
#{source,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="config != null">
|
||||||
|
#{config,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiScenarioReportStepExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from api_scenario_report_step
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update api_scenario_report_step
|
||||||
|
<set>
|
||||||
|
<if test="record.reportId != null">
|
||||||
|
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.name != null">
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.sort != null">
|
||||||
|
sort = #{record.sort,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.enable != null">
|
||||||
|
`enable` = #{record.enable,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
|
<if test="record.resourceId != null">
|
||||||
|
resource_id = #{record.resourceId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.resourceNum != null">
|
||||||
|
resource_num = #{record.resourceNum,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.stepType != null">
|
||||||
|
step_type = #{record.stepType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.projectId != null">
|
||||||
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.parentId != null">
|
||||||
|
parent_id = #{record.parentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.versionId != null">
|
||||||
|
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.source != null">
|
||||||
|
`source` = #{record.source,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.config != null">
|
||||||
|
config = #{record.config,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update api_scenario_report_step
|
||||||
|
set report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
sort = #{record.sort,jdbcType=BIGINT},
|
||||||
|
`enable` = #{record.enable,jdbcType=BIT},
|
||||||
|
resource_id = #{record.resourceId,jdbcType=BIGINT},
|
||||||
|
resource_num = #{record.resourceNum,jdbcType=VARCHAR},
|
||||||
|
step_type = #{record.stepType,jdbcType=VARCHAR},
|
||||||
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
|
parent_id = #{record.parentId,jdbcType=VARCHAR},
|
||||||
|
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||||
|
`source` = #{record.source,jdbcType=VARCHAR},
|
||||||
|
config = #{record.config,jdbcType=VARCHAR}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiScenarioReportStep">
|
||||||
|
update api_scenario_report_step
|
||||||
|
<set>
|
||||||
|
<if test="name != null">
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sort != null">
|
||||||
|
sort = #{sort,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="enable != null">
|
||||||
|
`enable` = #{enable,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
|
<if test="resourceId != null">
|
||||||
|
resource_id = #{resourceId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="resourceNum != null">
|
||||||
|
resource_num = #{resourceNum,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="stepType != null">
|
||||||
|
step_type = #{stepType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="projectId != null">
|
||||||
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="versionId != null">
|
||||||
|
version_id = #{versionId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="source != null">
|
||||||
|
`source` = #{source,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="config != null">
|
||||||
|
config = #{config,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.api.domain.ApiScenarioReportStep">
|
||||||
|
update api_scenario_report_step
|
||||||
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
|
sort = #{sort,jdbcType=BIGINT},
|
||||||
|
`enable` = #{enable,jdbcType=BIT},
|
||||||
|
resource_id = #{resourceId,jdbcType=BIGINT},
|
||||||
|
resource_num = #{resourceNum,jdbcType=VARCHAR},
|
||||||
|
step_type = #{stepType,jdbcType=VARCHAR},
|
||||||
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
|
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||||
|
version_id = #{versionId,jdbcType=VARCHAR},
|
||||||
|
`source` = #{source,jdbcType=VARCHAR},
|
||||||
|
config = #{config,jdbcType=VARCHAR}
|
||||||
|
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
<insert id="batchInsert" parameterType="map">
|
||||||
|
insert into api_scenario_report_step
|
||||||
|
(report_id, `name`, sort, `enable`, resource_id, resource_num, step_type, project_id,
|
||||||
|
parent_id, version_id, `source`, config)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(#{item.reportId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.sort,jdbcType=BIGINT},
|
||||||
|
#{item.enable,jdbcType=BIT}, #{item.resourceId,jdbcType=BIGINT}, #{item.resourceNum,jdbcType=VARCHAR},
|
||||||
|
#{item.stepType,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.parentId,jdbcType=VARCHAR},
|
||||||
|
#{item.versionId,jdbcType=VARCHAR}, #{item.source,jdbcType=VARCHAR}, #{item.config,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
|
insert into api_scenario_report_step (
|
||||||
|
<foreach collection="selective" item="column" separator=",">
|
||||||
|
${column.escapedColumnName}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
values
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(
|
||||||
|
<foreach collection="selective" item="column" separator=",">
|
||||||
|
<if test="'report_id'.toString() == column.value">
|
||||||
|
#{item.reportId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'name'.toString() == column.value">
|
||||||
|
#{item.name,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'sort'.toString() == column.value">
|
||||||
|
#{item.sort,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
<if test="'enable'.toString() == column.value">
|
||||||
|
#{item.enable,jdbcType=BIT}
|
||||||
|
</if>
|
||||||
|
<if test="'resource_id'.toString() == column.value">
|
||||||
|
#{item.resourceId,jdbcType=BIGINT}
|
||||||
|
</if>
|
||||||
|
<if test="'resource_num'.toString() == column.value">
|
||||||
|
#{item.resourceNum,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'step_type'.toString() == column.value">
|
||||||
|
#{item.stepType,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'project_id'.toString() == column.value">
|
||||||
|
#{item.projectId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'parent_id'.toString() == column.value">
|
||||||
|
#{item.parentId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'version_id'.toString() == column.value">
|
||||||
|
#{item.versionId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'source'.toString() == column.value">
|
||||||
|
#{item.source,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="'config'.toString() == column.value">
|
||||||
|
#{item.config,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
|
@ -108,28 +108,60 @@ CREATE TABLE IF NOT EXISTS api_report(
|
||||||
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
||||||
`deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '删除状态' ,
|
`deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '删除状态' ,
|
||||||
`status` VARCHAR(50) NOT NULL DEFAULT 'Pending' COMMENT '结果状态' ,
|
`status` VARCHAR(50) NOT NULL DEFAULT 'Pending' COMMENT '结果状态' ,
|
||||||
`start_time` BIGINT COMMENT '接口开始执行时间' ,
|
|
||||||
`end_time` BIGINT COMMENT '接口执行结束时间' ,
|
|
||||||
`run_mode` VARCHAR(20) NOT NULL COMMENT '执行模块/API/CASE/API_PLAN' ,
|
`run_mode` VARCHAR(20) NOT NULL COMMENT '执行模块/API/CASE/API_PLAN' ,
|
||||||
`pool_id` VARCHAR(50) NOT NULL COMMENT '资源池fk' ,
|
`pool_id` VARCHAR(50) NOT NULL COMMENT '资源池fk' ,
|
||||||
`trigger_mode` VARCHAR(50) NOT NULL COMMENT '触发模式/手动/批量/定时任务/JENKINS' ,
|
`trigger_mode` VARCHAR(50) NOT NULL COMMENT '触发模式/手动/批量/定时任务/JENKINS' ,
|
||||||
`version_id` VARCHAR(50) COMMENT '版本fk' ,
|
`version_id` VARCHAR(50) COMMENT '版本fk' ,
|
||||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||||
`integrated_report_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '集成报告id/api_scenario_report_id' ,
|
|
||||||
`integrated` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否为集成报告,默认否' ,
|
`integrated` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否为集成报告,默认否' ,
|
||||||
|
`environment_id` VARCHAR(50) COMMENT '环境id' ,
|
||||||
PRIMARY KEY (id)
|
PRIMARY KEY (id)
|
||||||
) ENGINE = InnoDB
|
)
|
||||||
|
ENGINE = InnoDB
|
||||||
DEFAULT CHARSET = utf8mb4
|
DEFAULT CHARSET = utf8mb4
|
||||||
COLLATE = utf8mb4_general_ci COMMENT = 'API/CASE执行结果';
|
COLLATE = utf8mb4_general_ci COMMENT = 'API/CASE执行结果';
|
||||||
|
|
||||||
|
|
||||||
CREATE INDEX idx_integrated ON api_report(integrated);
|
CREATE INDEX idx_integrated ON api_report(integrated);
|
||||||
CREATE INDEX idx_update_time ON api_report(update_time desc);
|
CREATE INDEX idx_update_time ON api_report(update_time);
|
||||||
CREATE INDEX idx_project_id ON api_report(project_id);
|
CREATE INDEX idx_project_id ON api_report(project_id);
|
||||||
CREATE INDEX idx_resource_id ON api_report(resource_id);
|
CREATE INDEX idx_resource_id ON api_report(resource_id);
|
||||||
CREATE INDEX idx_status ON api_report(status);
|
CREATE INDEX idx_status ON api_report(status);
|
||||||
CREATE INDEX idx_create_user ON api_report(create_user);
|
CREATE INDEX idx_create_user ON api_report(create_user);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS api_report_detail(
|
||||||
|
`id` VARCHAR(50) NOT NULL COMMENT '报告详情id' ,
|
||||||
|
`report_id` VARCHAR(50) NOT NULL COMMENT '接口报告id' ,
|
||||||
|
`resource_id` VARCHAR(50) NOT NULL COMMENT '场景中各个步骤请求唯一标识' ,
|
||||||
|
`start_time` BIGINT NOT NULL COMMENT '开始时间' ,
|
||||||
|
`status` VARCHAR(20) NOT NULL COMMENT '结果状态' ,
|
||||||
|
`request_time` BIGINT COMMENT '单个请求步骤时间' ,
|
||||||
|
`assertions_total` BIGINT COMMENT '总断言数' ,
|
||||||
|
`pass_assertions_total` BIGINT COMMENT '失败断言数' ,
|
||||||
|
`fake_code` VARCHAR(200) COMMENT '误报编号' ,
|
||||||
|
`request_name` VARCHAR(500) COMMENT '请求名称' ,
|
||||||
|
`project_id` VARCHAR(50) COMMENT '项目fk' ,
|
||||||
|
`error_total` INT COMMENT '失败总数' ,
|
||||||
|
`code` VARCHAR(500) COMMENT '请求响应码' ,
|
||||||
|
`content` LONGBLOB COMMENT '结果内容详情' ,
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
)
|
||||||
|
ENGINE = InnoDB
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci COMMENT = 'API/CASE执行结果详情';
|
||||||
|
|
||||||
|
CREATE INDEX idx_report ON api_report_detail(report_id);
|
||||||
|
CREATE INDEX idx_resource_id ON api_report_detail(resource_id);
|
||||||
|
|
||||||
|
CREATE TABLE api_report_log(
|
||||||
|
`report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' ,
|
||||||
|
`console` LONGBLOB COMMENT '执行日志' ,
|
||||||
|
PRIMARY KEY (report_id)
|
||||||
|
)
|
||||||
|
ENGINE = InnoDB
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci COMMENT = '接口报告过程日志';
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS api_definition_follower(
|
CREATE TABLE IF NOT EXISTS api_definition_follower(
|
||||||
`api_definition_id` VARCHAR(50) NOT NULL COMMENT '接口fk' ,
|
`api_definition_id` VARCHAR(50) NOT NULL COMMENT '接口fk' ,
|
||||||
`user_id` VARCHAR(50) NOT NULL COMMENT '关注人/用户fk' ,
|
`user_id` VARCHAR(50) NOT NULL COMMENT '关注人/用户fk' ,
|
||||||
|
@ -214,7 +246,7 @@ CREATE TABLE IF NOT EXISTS api_scenario_step(
|
||||||
`step_type` VARCHAR(50) COMMENT '步骤类型/API/CASE等' ,
|
`step_type` VARCHAR(50) COMMENT '步骤类型/API/CASE等' ,
|
||||||
`project_id` VARCHAR(50) COMMENT '项目fk' ,
|
`project_id` VARCHAR(50) COMMENT '项目fk' ,
|
||||||
`parent_id` VARCHAR(50) DEFAULT 'NONE' COMMENT '父级fk' ,
|
`parent_id` VARCHAR(50) DEFAULT 'NONE' COMMENT '父级fk' ,
|
||||||
`version_id` VARCHAR(255) COMMENT '版本号' ,
|
`version_id` VARCHAR(50) COMMENT '版本号' ,
|
||||||
`source` VARCHAR(10) COMMENT '引用/复制/自定义' ,
|
`source` VARCHAR(10) COMMENT '引用/复制/自定义' ,
|
||||||
`config` VARCHAR(500) COMMENT '循环等组件基础数据' ,
|
`config` VARCHAR(500) COMMENT '循环等组件基础数据' ,
|
||||||
PRIMARY KEY (id)
|
PRIMARY KEY (id)
|
||||||
|
@ -287,18 +319,18 @@ CREATE TABLE IF NOT EXISTS api_scenario_report(
|
||||||
`integrated` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否是集成报告' ,
|
`integrated` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否是集成报告' ,
|
||||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||||
`scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' ,
|
`scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' ,
|
||||||
|
`environment_id` VARCHAR(50) COMMENT '环境' ,
|
||||||
PRIMARY KEY (id)
|
PRIMARY KEY (id)
|
||||||
) ENGINE = InnoDB
|
) ENGINE = InnoDB
|
||||||
DEFAULT CHARSET = utf8mb4
|
DEFAULT CHARSET = utf8mb4
|
||||||
COLLATE = utf8mb4_general_ci COMMENT = '场景报告';
|
COLLATE = utf8mb4_general_ci COMMENT = '场景报告';
|
||||||
|
|
||||||
|
|
||||||
CREATE INDEX idx_project_id ON api_scenario_report(project_id);
|
CREATE INDEX idx_project_id ON api_scenario_report(project_id);
|
||||||
CREATE INDEX idx_scenario_id ON api_scenario_report(scenario_id);
|
CREATE INDEX idx_scenario_id ON api_scenario_report(scenario_id);
|
||||||
CREATE INDEX idx_trigger_mode ON api_scenario_report(trigger_mode);
|
CREATE INDEX idx_trigger_mode ON api_scenario_report(trigger_mode);
|
||||||
CREATE INDEX idx_run_mode ON api_scenario_report(run_mode);
|
CREATE INDEX idx_run_mode ON api_scenario_report(run_mode);
|
||||||
CREATE INDEX idx_status ON api_scenario_report(status);
|
CREATE INDEX idx_status ON api_scenario_report(status);
|
||||||
CREATE INDEX idx_update_time ON api_scenario_report(update_time desc);
|
CREATE INDEX idx_update_time ON api_scenario_report(update_time);
|
||||||
CREATE INDEX idx_create_user ON api_scenario_report(create_user);
|
CREATE INDEX idx_create_user ON api_scenario_report(create_user);
|
||||||
CREATE INDEX idx_name ON api_scenario_report(name);
|
CREATE INDEX idx_name ON api_scenario_report(name);
|
||||||
CREATE INDEX idx_pool_id ON api_scenario_report(pool_id);
|
CREATE INDEX idx_pool_id ON api_scenario_report(pool_id);
|
||||||
|
@ -314,7 +346,6 @@ CREATE TABLE IF NOT EXISTS api_scenario_report_detail(
|
||||||
`pass_assertions_total` BIGINT COMMENT '失败断言数' ,
|
`pass_assertions_total` BIGINT COMMENT '失败断言数' ,
|
||||||
`fake_code` VARCHAR(200) COMMENT '误报编号' ,
|
`fake_code` VARCHAR(200) COMMENT '误报编号' ,
|
||||||
`request_name` VARCHAR(500) COMMENT '请求名称' ,
|
`request_name` VARCHAR(500) COMMENT '请求名称' ,
|
||||||
`environment_id` VARCHAR(50) COMMENT '环境fk' ,
|
|
||||||
`project_id` VARCHAR(50) COMMENT '项目fk' ,
|
`project_id` VARCHAR(50) COMMENT '项目fk' ,
|
||||||
`error_total` INT COMMENT '失败总数' ,
|
`error_total` INT COMMENT '失败总数' ,
|
||||||
`code` VARCHAR(500) COMMENT '请求响应码' ,
|
`code` VARCHAR(500) COMMENT '请求响应码' ,
|
||||||
|
@ -329,13 +360,35 @@ CREATE INDEX idx_report_id ON api_scenario_report_detail(report_id);
|
||||||
CREATE INDEX idx_resource_id ON api_scenario_report_detail(resource_id);
|
CREATE INDEX idx_resource_id ON api_scenario_report_detail(resource_id);
|
||||||
CREATE INDEX idx_project_id ON api_scenario_report_detail(project_id);
|
CREATE INDEX idx_project_id ON api_scenario_report_detail(project_id);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS api_scenario_report_structure(
|
CREATE TABLE IF NOT EXISTS api_scenario_report_step(
|
||||||
`report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' ,
|
`report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' ,
|
||||||
`resource_tree` LONGBLOB COMMENT '资源步骤结构树' ,
|
`name` VARCHAR(255) COMMENT '步骤名称' ,
|
||||||
|
`sort` BIGINT NOT NULL COMMENT '序号' ,
|
||||||
|
`enable` BIT(1) NOT NULL DEFAULT 1 COMMENT '启用/禁用' ,
|
||||||
|
`resource_id` BIGINT COMMENT '资源id' ,
|
||||||
|
`resource_num` VARCHAR(50) COMMENT '资源编号' ,
|
||||||
|
`step_type` VARCHAR(50) COMMENT '步骤类型/API/CASE等' ,
|
||||||
|
`project_id` VARCHAR(50) COMMENT '项目fk' ,
|
||||||
|
`parent_id` VARCHAR(50) DEFAULT 'NONE' COMMENT '父级fk' ,
|
||||||
|
`version_id` VARCHAR(50) COMMENT '版本号' ,
|
||||||
|
`source` VARCHAR(10) COMMENT '引用/复制/自定义' ,
|
||||||
|
`config` VARCHAR(500) COMMENT '循环等组件基础数据' ,
|
||||||
PRIMARY KEY (report_id)
|
PRIMARY KEY (report_id)
|
||||||
) ENGINE = InnoDB
|
) ENGINE = InnoDB
|
||||||
DEFAULT CHARSET = utf8mb4
|
DEFAULT CHARSET = utf8mb4
|
||||||
COLLATE = utf8mb4_general_ci COMMENT = '场景报告结构';
|
COLLATE = utf8mb4_general_ci COMMENT = '场景报告步骤';
|
||||||
|
|
||||||
|
CREATE INDEX idx_sort ON api_scenario_report_step(sort);
|
||||||
|
CREATE INDEX idx_enable ON api_scenario_report_step(enable);
|
||||||
|
CREATE INDEX idx_parent_id ON api_scenario_report_step(parent_id);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS api_scenario_report_log(
|
||||||
|
`report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' ,
|
||||||
|
`console` LONGBLOB COMMENT '执行日志' ,
|
||||||
|
PRIMARY KEY (report_id)
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
DEFAULT CHARSET = utf8mb4
|
||||||
|
COLLATE = utf8mb4_general_ci COMMENT = '场景报告过程日志';
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS api_sync_config(
|
CREATE TABLE IF NOT EXISTS api_sync_config(
|
||||||
`id` VARCHAR(50) NOT NULL COMMENT '' ,
|
`id` VARCHAR(50) NOT NULL COMMENT '' ,
|
||||||
|
@ -486,14 +539,6 @@ CREATE TABLE IF NOT EXISTS api_test_case_blob(
|
||||||
DEFAULT CHARSET = utf8mb4
|
DEFAULT CHARSET = utf8mb4
|
||||||
COLLATE = utf8mb4_general_ci COMMENT = '接口用例详情';
|
COLLATE = utf8mb4_general_ci COMMENT = '接口用例详情';
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS api_scenario_report_log(
|
|
||||||
`report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' ,
|
|
||||||
`console` LONGBLOB COMMENT '执行日志' ,
|
|
||||||
PRIMARY KEY (report_id)
|
|
||||||
) ENGINE = InnoDB
|
|
||||||
DEFAULT CHARSET = utf8mb4
|
|
||||||
COLLATE = utf8mb4_general_ci COMMENT = '场景报告过程日志';
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS api_scenario_environment(
|
CREATE TABLE IF NOT EXISTS api_scenario_environment(
|
||||||
`id` VARCHAR(50) NOT NULL COMMENT '场景环境pk' ,
|
`id` VARCHAR(50) NOT NULL COMMENT '场景环境pk' ,
|
||||||
`api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' ,
|
`api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' ,
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
package io.metersphere.sdk.dto.api;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CollectionReportDTO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
// 集合报告id
|
||||||
|
private String reportId;
|
||||||
|
|
||||||
|
// 集合报告名称
|
||||||
|
private String reportName;
|
||||||
|
}
|
|
@ -6,7 +6,6 @@ import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ -20,7 +19,7 @@ public class ApiNoticeDTO implements java.io.Serializable {
|
||||||
private String reportStatus;
|
private String reportStatus;
|
||||||
private String userId;
|
private String userId;
|
||||||
private String projectId;
|
private String projectId;
|
||||||
private List<String> environmentIds;
|
private String environmentId;
|
||||||
private String reportId;
|
private String reportId;
|
||||||
private String queueId;
|
private String queueId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,44 +16,61 @@ public class RequestResult {
|
||||||
// 步骤请求唯一ID
|
// 步骤请求唯一ID
|
||||||
private String resourceId;
|
private String resourceId;
|
||||||
|
|
||||||
|
// 线程名称
|
||||||
private String threadName;
|
private String threadName;
|
||||||
|
|
||||||
|
// 步骤名称
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
// 请求地址
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
|
// 请求大小
|
||||||
private long requestSize;
|
private long requestSize;
|
||||||
|
|
||||||
|
// 开始时间
|
||||||
private long startTime;
|
private long startTime;
|
||||||
|
|
||||||
|
// 结束时间
|
||||||
private long endTime;
|
private long endTime;
|
||||||
|
|
||||||
|
// 失败数量
|
||||||
private int error;
|
private int error;
|
||||||
|
|
||||||
private boolean success;
|
// 请求头
|
||||||
|
|
||||||
private String headers;
|
private String headers;
|
||||||
|
|
||||||
|
// cookies
|
||||||
private String cookies;
|
private String cookies;
|
||||||
|
|
||||||
|
// 请求体
|
||||||
private String body;
|
private String body;
|
||||||
|
|
||||||
|
// 响应状态
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
// 请求方法
|
||||||
private String method;
|
private String method;
|
||||||
|
|
||||||
private int totalAssertionCount = 0;
|
// 断言总数
|
||||||
|
private int assertionTotal = 0;
|
||||||
|
|
||||||
private int passAssertionsCount= 0;
|
// 断言通过数
|
||||||
|
private int passAssertionsTotal = 0;
|
||||||
|
|
||||||
|
// 子请求结果
|
||||||
private List<RequestResult> subRequestResults = new ArrayList<>();
|
private List<RequestResult> subRequestResults = new ArrayList<>();
|
||||||
|
|
||||||
|
// 响应结果
|
||||||
private ResponseResult responseResult = new ResponseResult();
|
private ResponseResult responseResult = new ResponseResult();
|
||||||
|
|
||||||
|
private Boolean isSuccessful;
|
||||||
|
|
||||||
public void increasePassAssertionCount() {
|
public void increasePassAssertionCount() {
|
||||||
this.passAssertionsCount++;
|
this.passAssertionsTotal++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 误报信息
|
||||||
private String fakeErrorMessage;
|
private String fakeErrorMessage;
|
||||||
// 误报编码名称
|
// 误报编码名称
|
||||||
private String fakeErrorCode;
|
private String fakeErrorCode;
|
||||||
|
|
|
@ -10,29 +10,34 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class ResponseResult {
|
public class ResponseResult {
|
||||||
|
// 响应状态
|
||||||
private String responseCode;
|
private String responseCode;
|
||||||
|
|
||||||
|
// 响应详细信息
|
||||||
private String responseMessage;
|
private String responseMessage;
|
||||||
|
|
||||||
// 总响应时间
|
// 总响应时间
|
||||||
private long responseTime;
|
private long responseTime;
|
||||||
|
|
||||||
|
// 从客户端向服务器发送请求到收到响应的时间
|
||||||
private long latency;
|
private long latency;
|
||||||
|
|
||||||
// 总响应内容大小
|
// 总响应内容大小
|
||||||
private long responseSize;
|
private long responseSize;
|
||||||
|
|
||||||
|
// 响应头
|
||||||
private String headers;
|
private String headers;
|
||||||
|
|
||||||
|
// 响应内容
|
||||||
private String body;
|
private String body;
|
||||||
|
|
||||||
private String vars;
|
// 响应类型
|
||||||
|
|
||||||
private String console;
|
|
||||||
|
|
||||||
private String contentType;
|
private String contentType;
|
||||||
|
|
||||||
|
// 过程变量处理信息
|
||||||
|
private String vars;
|
||||||
|
|
||||||
|
// 图片内容
|
||||||
private byte[] imageUrl;
|
private byte[] imageUrl;
|
||||||
|
|
||||||
// Socket Initialization(Socket 初始化时间)
|
// Socket Initialization(Socket 初始化时间)
|
||||||
|
@ -59,6 +64,7 @@ public class ResponseResult {
|
||||||
// header size
|
// header size
|
||||||
private long headerSize = 0;
|
private long headerSize = 0;
|
||||||
|
|
||||||
|
// 断言结果
|
||||||
private final List<ResponseAssertionResult> assertions = new ArrayList<>();
|
private final List<ResponseAssertionResult> assertions = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package io.metersphere.sdk.dto.api.result;
|
package io.metersphere.sdk.dto.api.result;
|
||||||
|
|
||||||
|
import io.metersphere.sdk.dto.api.CollectionReportDTO;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
@ -30,10 +31,6 @@ public class TaskResult implements Serializable {
|
||||||
* 项目id
|
* 项目id
|
||||||
*/
|
*/
|
||||||
private String projectId;
|
private String projectId;
|
||||||
/**
|
|
||||||
* 执行环境id
|
|
||||||
*/
|
|
||||||
private List<String> environmentIds;
|
|
||||||
/**
|
/**
|
||||||
* 执行过程状态
|
* 执行过程状态
|
||||||
*/
|
*/
|
||||||
|
@ -46,5 +43,10 @@ public class TaskResult implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 环境变量处理信息
|
* 环境变量处理信息
|
||||||
*/
|
*/
|
||||||
List<String> environmentList;
|
String environmentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 集合报告,空则是单报告
|
||||||
|
*/
|
||||||
|
private CollectionReportDTO collectionReport;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package io.metersphere.sdk.dto.api.task;
|
package io.metersphere.sdk.dto.api.task;
|
||||||
|
|
||||||
|
import io.metersphere.sdk.dto.api.CollectionReportDTO;
|
||||||
import io.metersphere.sdk.dto.api.result.MsRegexDTO;
|
import io.metersphere.sdk.dto.api.result.MsRegexDTO;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
@ -66,7 +67,12 @@ public class TaskRequest implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 执行环境id
|
* 执行环境id
|
||||||
*/
|
*/
|
||||||
private List<String> environmentIds;
|
private String environmentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 集合报告,空则是单报告
|
||||||
|
*/
|
||||||
|
private CollectionReportDTO collectionReport;
|
||||||
|
|
||||||
// TODO 其它执行参数
|
// TODO 其它执行参数
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ExecutionQueue implements Serializable {
|
public class ExecutionQueue implements Serializable {
|
||||||
|
@ -49,9 +48,9 @@ public class ExecutionQueue implements Serializable {
|
||||||
private Long retryNumber;
|
private Long retryNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 环境,key= projectID,value=envID
|
* 环境Id
|
||||||
*/
|
*/
|
||||||
private Map<String, String> envMap;
|
private String environmentId;
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
@ -23,7 +23,6 @@ import io.metersphere.system.service.NoticeSendService;
|
||||||
import io.metersphere.system.service.SystemParameterService;
|
import io.metersphere.system.service.SystemParameterService;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.apache.commons.beanutils.BeanMap;
|
import org.apache.commons.beanutils.BeanMap;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -97,8 +96,8 @@ public class ApiReportSendNoticeService {
|
||||||
paramMap.put("status", noticeDTO.getReportStatus());
|
paramMap.put("status", noticeDTO.getReportStatus());
|
||||||
|
|
||||||
// TODO 暂时取一个环境处理
|
// TODO 暂时取一个环境处理
|
||||||
if (CollectionUtils.isNotEmpty(noticeDTO.getEnvironmentIds())) {
|
if (StringUtils.isNotEmpty(noticeDTO.getEnvironmentId())) {
|
||||||
Environment environment = environmentMapper.selectByPrimaryKey(noticeDTO.getEnvironmentIds().getFirst());
|
Environment environment = environmentMapper.selectByPrimaryKey(noticeDTO.getEnvironmentId());
|
||||||
if (environment != null) {
|
if (environment != null) {
|
||||||
paramMap.put("environment", environment.getName());
|
paramMap.put("environment", environment.getName());
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,8 @@
|
||||||
<table tableName="api_definition_swagger"/>
|
<table tableName="api_definition_swagger"/>
|
||||||
<table tableName="api_environment_config"/>
|
<table tableName="api_environment_config"/>
|
||||||
<table tableName="api_report"/>
|
<table tableName="api_report"/>
|
||||||
<table tableName="api_report_blob"/>
|
<table tableName="api_report_detail"/>
|
||||||
|
<table tableName="api_report_log"/>
|
||||||
|
|
||||||
<table tableName="api_scenario"/>
|
<table tableName="api_scenario"/>
|
||||||
<table tableName="api_scenario">
|
<table tableName="api_scenario">
|
||||||
|
@ -97,7 +98,7 @@
|
||||||
<table tableName="api_scenario_report"/>
|
<table tableName="api_scenario_report"/>
|
||||||
<table tableName="api_scenario_report_detail"/>
|
<table tableName="api_scenario_report_detail"/>
|
||||||
<table tableName="api_scenario_report_log"/>
|
<table tableName="api_scenario_report_log"/>
|
||||||
<table tableName="api_scenario_report_structure"/>
|
<table tableName="api_scenario_report_step"/>
|
||||||
<table tableName="api_sync_config"/>
|
<table tableName="api_sync_config"/>
|
||||||
<table tableName="api_test_case_blob"/>
|
<table tableName="api_test_case_blob"/>
|
||||||
<table tableName="api_test_case_follower"/>
|
<table tableName="api_test_case_follower"/>
|
||||||
|
|
|
@ -12,8 +12,6 @@ import org.junit.jupiter.api.TestMethodOrder;
|
||||||
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 java.util.ArrayList;
|
|
||||||
|
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||||
@AutoConfigureMockMvc
|
@AutoConfigureMockMvc
|
||||||
|
@ -33,7 +31,7 @@ public class MessageListenerTest {
|
||||||
api.setReportStatus("exampleReportStatus");
|
api.setReportStatus("exampleReportStatus");
|
||||||
api.setUserId("exampleUserId");
|
api.setUserId("exampleUserId");
|
||||||
api.setProjectId("exampleProjectId");
|
api.setProjectId("exampleProjectId");
|
||||||
api.setEnvironmentIds(new ArrayList<>(){{this.add("exampleEnvironmentId");}});
|
api.setEnvironmentId("exampleEnvironmentId");
|
||||||
api.setReportId("exampleReportId");
|
api.setReportId("exampleReportId");
|
||||||
|
|
||||||
ConsumerRecord<Object, String> record = new ConsumerRecord<>(KafkaTopicConstants.API_REPORT_TASK_TOPIC, 0, 0, "123", JSON.toJSONString(api));
|
ConsumerRecord<Object, String> record = new ConsumerRecord<>(KafkaTopicConstants.API_REPORT_TASK_TOPIC, 0, 0, "123", JSON.toJSONString(api));
|
||||||
|
@ -49,7 +47,7 @@ public class MessageListenerTest {
|
||||||
scenario.setReportStatus("exampleReportStatus");
|
scenario.setReportStatus("exampleReportStatus");
|
||||||
scenario.setUserId("exampleUserId");
|
scenario.setUserId("exampleUserId");
|
||||||
scenario.setProjectId("exampleProjectId");
|
scenario.setProjectId("exampleProjectId");
|
||||||
api.setEnvironmentIds(new ArrayList<>(){{this.add("exampleEnvironmentId");}});
|
api.setEnvironmentId("exampleEnvironmentId");
|
||||||
scenario.setReportId("exampleReportId");
|
scenario.setReportId("exampleReportId");
|
||||||
|
|
||||||
ConsumerRecord<Object, String> scenarioRecord = new ConsumerRecord<>(KafkaTopicConstants.API_REPORT_TASK_TOPIC, 0, 0, "123", JSON.toJSONString(scenario));
|
ConsumerRecord<Object, String> scenarioRecord = new ConsumerRecord<>(KafkaTopicConstants.API_REPORT_TASK_TOPIC, 0, 0, "123", JSON.toJSONString(scenario));
|
||||||
|
@ -65,7 +63,7 @@ public class MessageListenerTest {
|
||||||
testCase.setReportStatus("exampleReportStatus");
|
testCase.setReportStatus("exampleReportStatus");
|
||||||
testCase.setUserId("exampleUserId");
|
testCase.setUserId("exampleUserId");
|
||||||
testCase.setProjectId("exampleProjectId");
|
testCase.setProjectId("exampleProjectId");
|
||||||
api.setEnvironmentIds(new ArrayList<>(){{this.add("exampleEnvironmentId");}});
|
api.setEnvironmentId("exampleEnvironmentId");
|
||||||
testCase.setReportId("exampleReportId");
|
testCase.setReportId("exampleReportId");
|
||||||
|
|
||||||
ConsumerRecord<Object, String> testCaseRecord = new ConsumerRecord<>(KafkaTopicConstants.API_REPORT_TASK_TOPIC, 0, 0, "123", JSON.toJSONString(testCase));
|
ConsumerRecord<Object, String> testCaseRecord = new ConsumerRecord<>(KafkaTopicConstants.API_REPORT_TASK_TOPIC, 0, 0, "123", JSON.toJSONString(testCase));
|
||||||
|
|
|
@ -47,7 +47,6 @@ public class ApiExecutionQueueServiceTest {
|
||||||
queue.setFailure(true);
|
queue.setFailure(true);
|
||||||
queue.setRetryEnable(true);
|
queue.setRetryEnable(true);
|
||||||
queue.setRetryNumber(3L);
|
queue.setRetryNumber(3L);
|
||||||
queue.setEnvMap(Map.of("projectID1", "envID1", "projectID2", "envID2"));
|
|
||||||
|
|
||||||
ExecutionQueueDetail queueDetail1 = new ExecutionQueueDetail();
|
ExecutionQueueDetail queueDetail1 = new ExecutionQueueDetail();
|
||||||
queueDetail1.setResourceId("resourceId1");
|
queueDetail1.setResourceId("resourceId1");
|
||||||
|
|
|
@ -23,14 +23,14 @@ INSERT INTO `api_test_case` (`id`, `name`, `priority`, `num`, `tags`, `status`,
|
||||||
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 ('3ee2ae9c-a680-4ed6-b115-1f6ab8980545', '查询Linux主机6', 'P0', 100002009, NULL, 'PENDING', NULL, NULL, 10000, '100001100001', '1005', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0');
|
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 ('3ee2ae9c-a680-4ed6-b115-1f6ab8980545', '查询Linux主机6', 'P0', 100002009, NULL, 'PENDING', NULL, NULL, 10000, '100001100001', '1005', '100570499574136985', 'admin', 1699500298164, 'admin', 1699500298164, 'admin', NULL, NULL, b'0');
|
||||||
|
|
||||||
DELETE FROM `api_report` WHERE `id` in ('10001','10002','10003','10004','10005','10006','10007','10008');
|
DELETE FROM `api_report` WHERE `id` in ('10001','10002','10003','10004','10005','10006','10007','10008');
|
||||||
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `start_time`, `end_time`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated_report_id`, `integrated`) VALUES ('10001', '报告001', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'SUCCESS', 1680624405386, 1680624405386, 'API', 'pol_id_100001', 'hand', NULL, '100001100001', 'NONE', b'0');
|
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated`) VALUES ('10001', '报告001', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'SUCCESS', 'API', 'pol_id_100001', 'hand', NULL, '100001100001', b'0');
|
||||||
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `start_time`, `end_time`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated_report_id`, `integrated`) VALUES ('10002', '报告002', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'ERROR', 1680624405386, 1680624405386, 'API', 'pol_id_100001', 'hand', NULL, '100001100001', 'NONE', b'0');
|
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated`) VALUES ('10002', '报告002', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'ERROR', 'API', 'pol_id_100001', 'hand', NULL, '100001100001', b'0');
|
||||||
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `start_time`, `end_time`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated_report_id`, `integrated`) VALUES ('10003', '报告003', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'FAKE_ERROR', 1680624405386, 1680624405386, 'API', 'pol_id_100001', 'hand', NULL, '100001100001', 'NONE', b'0');
|
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated`) VALUES ('10003', '报告003', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'FAKE_ERROR', 'API', 'pol_id_100001', 'hand', NULL, '100001100001', b'0');
|
||||||
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `start_time`, `end_time`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated_report_id`, `integrated`) VALUES ('10004', '报告004', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'SUCCESS', 1680624405386, 1680624405386, 'API', 'pol_id_100001', 'hand', NULL, '100001100001', 'NONE', b'0');
|
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated`) VALUES ('10004', '报告004', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'SUCCESS', 'API', 'pol_id_100001', 'hand', NULL, '100001100001', b'0');
|
||||||
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `start_time`, `end_time`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated_report_id`, `integrated`) VALUES ('10005', '报告005', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'ERROR', 1680624405386, 1680624405386, 'API', 'pol_id_100001', 'hand', NULL, '100001100001', 'NONE', b'0');
|
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated`) VALUES ('10005', '报告005', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'ERROR', 'API', 'pol_id_100001', 'hand', NULL, '100001100001', b'0');
|
||||||
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `start_time`, `end_time`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated_report_id`, `integrated`) VALUES ('10006', '报告006', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'SUCCESS', 1680624405386, 1680624405386, 'API', 'pol_id_100001', 'hand', NULL, '100001100001', 'NONE', b'0');
|
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated`) VALUES ('10006', '报告006', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'SUCCESS', 'API', 'pol_id_100001', 'hand', NULL, '100001100001', b'0');
|
||||||
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `start_time`, `end_time`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated_report_id`, `integrated`) VALUES ('10007', '报告004', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'SUCCESS', 1680624405386, 1680624405386, 'API', 'pol_id_100001', 'hand', NULL, '100001100001', 'NONE', b'0');
|
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated`) VALUES ('10007', '报告004', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'SUCCESS', 'API', 'pol_id_100001', 'hand', NULL, '100001100001', b'0');
|
||||||
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `start_time`, `end_time`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated_report_id`, `integrated`) VALUES ('10008', '报告005', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'ERROR', 1680624405386, 1680624405386, 'API', 'pol_id_100001', 'hand', NULL, '100001100001', 'NONE', b'0');
|
INSERT INTO `api_report` (`id`, `name`, `resource_id`, `create_time`, `update_time`, `create_user`, `update_user`, `deleted`, `status`, `run_mode`, `pool_id`, `trigger_mode`, `version_id`, `project_id`, `integrated`) VALUES ('10008', '报告005', 'resource_id_10001', 1680624405386, 1680624405386, 'admin', 'admin', b'0', 'ERROR', 'API', 'pol_id_100001', 'hand', NULL, '100001100001', b'0');
|
||||||
|
|
||||||
DELETE FROM `api_definition_module` WHERE `id` in ('10001', 'case-moduleId');
|
DELETE FROM `api_definition_module` WHERE `id` in ('10001', 'case-moduleId');
|
||||||
INSERT INTO `api_definition_module` (`id`, `name`, `parent_id`, `project_id`, `pos`, `create_time`, `update_time`, `update_user`, `create_user`) VALUES ('10001', 'module1', 'NONE', '100001100001', 10, 0, 0, 'admin', 'admin');
|
INSERT INTO `api_definition_module` (`id`, `name`, `parent_id`, `project_id`, `pos`, `create_time`, `update_time`, `update_user`, `create_user`) VALUES ('10001', 'module1', 'NONE', '100001100001', 10, 0, 0, 'admin', 'admin');
|
||||||
|
|
|
@ -24,8 +24,8 @@ public class ApiTestInterceptor {
|
||||||
// ApiTestCaseBlob
|
// ApiTestCaseBlob
|
||||||
configList.add(new MybatisInterceptorConfig(ApiTestCaseBlob.class, "request", CompressUtils.class, "zip", "unzip"));
|
configList.add(new MybatisInterceptorConfig(ApiTestCaseBlob.class, "request", CompressUtils.class, "zip", "unzip"));
|
||||||
// ApiReportBlob
|
// ApiReportBlob
|
||||||
configList.add(new MybatisInterceptorConfig(ApiReportBlob.class, "content", CompressUtils.class, "zip", "unzip"));
|
configList.add(new MybatisInterceptorConfig(ApiReportDetail.class, "content", CompressUtils.class, "zip", "unzip"));
|
||||||
configList.add(new MybatisInterceptorConfig(ApiReportBlob.class, "console", CompressUtils.class, "zip", "unzip"));
|
configList.add(new MybatisInterceptorConfig(ApiReportLog.class, "console", CompressUtils.class, "zip", "unzip"));
|
||||||
// ApiScenarioBlob
|
// ApiScenarioBlob
|
||||||
configList.add(new MybatisInterceptorConfig(ApiScenarioStepBlob.class, "content", CompressUtils.class, "zip", "unzip"));
|
configList.add(new MybatisInterceptorConfig(ApiScenarioStepBlob.class, "content", CompressUtils.class, "zip", "unzip"));
|
||||||
// ApiScenarioReportBlob
|
// ApiScenarioReportBlob
|
||||||
|
|
Loading…
Reference in New Issue