refactor: 误报库表结构更新

This commit is contained in:
WangXu10 2023-09-07 15:37:06 +08:00 committed by 刘瑞斌
parent 594fabe413
commit 666fce56a4
12 changed files with 477 additions and 813 deletions

View File

@ -1,8 +1,10 @@
package io.metersphere.project.domain; package io.metersphere.project.domain;
import io.metersphere.validation.groups.*; import io.metersphere.validation.groups.Created;
import io.metersphere.validation.groups.Updated;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -20,6 +22,11 @@ public class FakeError implements Serializable {
@Size(min = 1, max = 50, message = "{fake_error.project_id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{fake_error.project_id.length_range}", groups = {Created.class, Updated.class})
private String projectId; private String projectId;
@Schema(description = "误报名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{fake_error.name.not_blank}", groups = {Created.class})
@Size(min = 1, max = 255, message = "{fake_error.name.length_range}", groups = {Created.class, Updated.class})
private String name;
@Schema(description = "创建时间") @Schema(description = "创建时间")
private Long createTime; private Long createTime;
@ -32,31 +39,46 @@ public class FakeError implements Serializable {
@Schema(description = "更新人") @Schema(description = "更新人")
private String updateUser; private String updateUser;
@Schema(description = "错误码", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "匹配类型/文本内容", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{fake_error.error_code.not_blank}", groups = {Created.class}) @NotBlank(message = "{fake_error.type.not_blank}", groups = {Created.class})
@Size(min = 1, max = 255, message = "{fake_error.error_code.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 20, message = "{fake_error.type.length_range}", groups = {Created.class, Updated.class})
private String errorCode; private String type;
@Schema(description = "匹配类型", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "响应内容类型/header/data/body", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{fake_error.match_type.not_blank}", groups = {Created.class}) @NotBlank(message = "{fake_error.resp_type.not_blank}", groups = {Created.class})
@Size(min = 1, max = 255, message = "{fake_error.match_type.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 20, message = "{fake_error.resp_type.length_range}", groups = {Created.class, Updated.class})
private String matchType; private String respType;
@Schema(description = "状态") @Schema(description = "操作类型/大于/等于/小于", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean status; @NotBlank(message = "{fake_error.relation.not_blank}", groups = {Created.class})
@Size(min = 1, max = 20, message = "{fake_error.relation.length_range}", groups = {Created.class, Updated.class})
private String relation;
@Schema(description = "表达式", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{fake_error.expression.not_blank}", groups = {Created.class})
@Size(min = 1, max = 255, message = "{fake_error.expression.length_range}", groups = {Created.class, Updated.class})
private String expression;
@Schema(description = "启用/禁用", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{fake_error.enable.not_blank}", groups = {Created.class})
@Size(min = 1, max = 1, message = "{fake_error.enable.length_range}", groups = {Created.class, Updated.class})
private Boolean enable;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public enum Column { public enum Column {
id("id", "id", "VARCHAR", false), id("id", "id", "VARCHAR", false),
projectId("project_id", "projectId", "VARCHAR", false), projectId("project_id", "projectId", "VARCHAR", false),
name("name", "name", "VARCHAR", true),
createTime("create_time", "createTime", "BIGINT", false), createTime("create_time", "createTime", "BIGINT", false),
updateTime("update_time", "updateTime", "BIGINT", false), updateTime("update_time", "updateTime", "BIGINT", false),
createUser("create_user", "createUser", "VARCHAR", false), createUser("create_user", "createUser", "VARCHAR", false),
updateUser("update_user", "updateUser", "VARCHAR", false), updateUser("update_user", "updateUser", "VARCHAR", false),
errorCode("error_code", "errorCode", "VARCHAR", false), type("type", "type", "VARCHAR", true),
matchType("match_type", "matchType", "VARCHAR", false), respType("resp_type", "respType", "VARCHAR", false),
status("status", "status", "BIT", true); relation("relation", "relation", "VARCHAR", false),
expression("expression", "expression", "VARCHAR", false),
enable("enable", "enable", "BIT", true);
private static final String BEGINNING_DELIMITER = "`"; private static final String BEGINNING_DELIMITER = "`";

View File

@ -1,98 +0,0 @@
package io.metersphere.project.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 FakeErrorBlob implements Serializable {
@Schema(description = "Test ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{fake_error_blob.id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 50, message = "{fake_error_blob.id.length_range}", groups = {Created.class, Updated.class})
private String id;
@Schema(description = "内容")
private byte[] content;
@Schema(description = "报告内容")
private byte[] description;
private static final long serialVersionUID = 1L;
public enum Column {
id("id", "id", "VARCHAR", false),
content("content", "content", "LONGVARBINARY", false),
description("description", "description", "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();
}
}
}

View File

@ -1,270 +0,0 @@
package io.metersphere.project.domain;
import java.util.ArrayList;
import java.util.List;
public class FakeErrorBlobExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public FakeErrorBlobExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(String value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(String value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(String value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(String value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdLike(String value) {
addCriterion("id like", value, "id");
return (Criteria) this;
}
public Criteria andIdNotLike(String value) {
addCriterion("id not like", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(String value1, String value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@ -244,6 +244,76 @@ public class FakeErrorExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andNameIsNull() {
addCriterion("`name` is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("`name` is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("`name` =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("`name` <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("`name` >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("`name` >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("`name` <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("`name` <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("`name` like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("`name` not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("`name` not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("`name` between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("`name` not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() { public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;
@ -504,203 +574,343 @@ public class FakeErrorExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeIsNull() { public Criteria andTypeIsNull() {
addCriterion("error_code is null"); addCriterion("`type` is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeIsNotNull() { public Criteria andTypeIsNotNull() {
addCriterion("error_code is not null"); addCriterion("`type` is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeEqualTo(String value) { public Criteria andTypeEqualTo(String value) {
addCriterion("error_code =", value, "errorCode"); addCriterion("`type` =", value, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeNotEqualTo(String value) { public Criteria andTypeNotEqualTo(String value) {
addCriterion("error_code <>", value, "errorCode"); addCriterion("`type` <>", value, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeGreaterThan(String value) { public Criteria andTypeGreaterThan(String value) {
addCriterion("error_code >", value, "errorCode"); addCriterion("`type` >", value, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeGreaterThanOrEqualTo(String value) { public Criteria andTypeGreaterThanOrEqualTo(String value) {
addCriterion("error_code >=", value, "errorCode"); addCriterion("`type` >=", value, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeLessThan(String value) { public Criteria andTypeLessThan(String value) {
addCriterion("error_code <", value, "errorCode"); addCriterion("`type` <", value, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeLessThanOrEqualTo(String value) { public Criteria andTypeLessThanOrEqualTo(String value) {
addCriterion("error_code <=", value, "errorCode"); addCriterion("`type` <=", value, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeLike(String value) { public Criteria andTypeLike(String value) {
addCriterion("error_code like", value, "errorCode"); addCriterion("`type` like", value, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeNotLike(String value) { public Criteria andTypeNotLike(String value) {
addCriterion("error_code not like", value, "errorCode"); addCriterion("`type` not like", value, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeIn(List<String> values) { public Criteria andTypeIn(List<String> values) {
addCriterion("error_code in", values, "errorCode"); addCriterion("`type` in", values, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeNotIn(List<String> values) { public Criteria andTypeNotIn(List<String> values) {
addCriterion("error_code not in", values, "errorCode"); addCriterion("`type` not in", values, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeBetween(String value1, String value2) { public Criteria andTypeBetween(String value1, String value2) {
addCriterion("error_code between", value1, value2, "errorCode"); addCriterion("`type` between", value1, value2, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andErrorCodeNotBetween(String value1, String value2) { public Criteria andTypeNotBetween(String value1, String value2) {
addCriterion("error_code not between", value1, value2, "errorCode"); addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeIsNull() { public Criteria andRespTypeIsNull() {
addCriterion("match_type is null"); addCriterion("resp_type is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeIsNotNull() { public Criteria andRespTypeIsNotNull() {
addCriterion("match_type is not null"); addCriterion("resp_type is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeEqualTo(String value) { public Criteria andRespTypeEqualTo(String value) {
addCriterion("match_type =", value, "matchType"); addCriterion("resp_type =", value, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeNotEqualTo(String value) { public Criteria andRespTypeNotEqualTo(String value) {
addCriterion("match_type <>", value, "matchType"); addCriterion("resp_type <>", value, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeGreaterThan(String value) { public Criteria andRespTypeGreaterThan(String value) {
addCriterion("match_type >", value, "matchType"); addCriterion("resp_type >", value, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeGreaterThanOrEqualTo(String value) { public Criteria andRespTypeGreaterThanOrEqualTo(String value) {
addCriterion("match_type >=", value, "matchType"); addCriterion("resp_type >=", value, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeLessThan(String value) { public Criteria andRespTypeLessThan(String value) {
addCriterion("match_type <", value, "matchType"); addCriterion("resp_type <", value, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeLessThanOrEqualTo(String value) { public Criteria andRespTypeLessThanOrEqualTo(String value) {
addCriterion("match_type <=", value, "matchType"); addCriterion("resp_type <=", value, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeLike(String value) { public Criteria andRespTypeLike(String value) {
addCriterion("match_type like", value, "matchType"); addCriterion("resp_type like", value, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeNotLike(String value) { public Criteria andRespTypeNotLike(String value) {
addCriterion("match_type not like", value, "matchType"); addCriterion("resp_type not like", value, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeIn(List<String> values) { public Criteria andRespTypeIn(List<String> values) {
addCriterion("match_type in", values, "matchType"); addCriterion("resp_type in", values, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeNotIn(List<String> values) { public Criteria andRespTypeNotIn(List<String> values) {
addCriterion("match_type not in", values, "matchType"); addCriterion("resp_type not in", values, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeBetween(String value1, String value2) { public Criteria andRespTypeBetween(String value1, String value2) {
addCriterion("match_type between", value1, value2, "matchType"); addCriterion("resp_type between", value1, value2, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andMatchTypeNotBetween(String value1, String value2) { public Criteria andRespTypeNotBetween(String value1, String value2) {
addCriterion("match_type not between", value1, value2, "matchType"); addCriterion("resp_type not between", value1, value2, "respType");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusIsNull() { public Criteria andRelationIsNull() {
addCriterion("`status` is null"); addCriterion("relation is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusIsNotNull() { public Criteria andRelationIsNotNull() {
addCriterion("`status` is not null"); addCriterion("relation is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusEqualTo(Boolean value) { public Criteria andRelationEqualTo(String value) {
addCriterion("`status` =", value, "status"); addCriterion("relation =", value, "relation");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusNotEqualTo(Boolean value) { public Criteria andRelationNotEqualTo(String value) {
addCriterion("`status` <>", value, "status"); addCriterion("relation <>", value, "relation");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusGreaterThan(Boolean value) { public Criteria andRelationGreaterThan(String value) {
addCriterion("`status` >", value, "status"); addCriterion("relation >", value, "relation");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusGreaterThanOrEqualTo(Boolean value) { public Criteria andRelationGreaterThanOrEqualTo(String value) {
addCriterion("`status` >=", value, "status"); addCriterion("relation >=", value, "relation");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusLessThan(Boolean value) { public Criteria andRelationLessThan(String value) {
addCriterion("`status` <", value, "status"); addCriterion("relation <", value, "relation");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusLessThanOrEqualTo(Boolean value) { public Criteria andRelationLessThanOrEqualTo(String value) {
addCriterion("`status` <=", value, "status"); addCriterion("relation <=", value, "relation");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusIn(List<Boolean> values) { public Criteria andRelationLike(String value) {
addCriterion("`status` in", values, "status"); addCriterion("relation like", value, "relation");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusNotIn(List<Boolean> values) { public Criteria andRelationNotLike(String value) {
addCriterion("`status` not in", values, "status"); addCriterion("relation not like", value, "relation");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusBetween(Boolean value1, Boolean value2) { public Criteria andRelationIn(List<String> values) {
addCriterion("`status` between", value1, value2, "status"); addCriterion("relation in", values, "relation");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusNotBetween(Boolean value1, Boolean value2) { public Criteria andRelationNotIn(List<String> values) {
addCriterion("`status` not between", value1, value2, "status"); addCriterion("relation not in", values, "relation");
return (Criteria) this;
}
public Criteria andRelationBetween(String value1, String value2) {
addCriterion("relation between", value1, value2, "relation");
return (Criteria) this;
}
public Criteria andRelationNotBetween(String value1, String value2) {
addCriterion("relation not between", value1, value2, "relation");
return (Criteria) this;
}
public Criteria andExpressionIsNull() {
addCriterion("expression is null");
return (Criteria) this;
}
public Criteria andExpressionIsNotNull() {
addCriterion("expression is not null");
return (Criteria) this;
}
public Criteria andExpressionEqualTo(String value) {
addCriterion("expression =", value, "expression");
return (Criteria) this;
}
public Criteria andExpressionNotEqualTo(String value) {
addCriterion("expression <>", value, "expression");
return (Criteria) this;
}
public Criteria andExpressionGreaterThan(String value) {
addCriterion("expression >", value, "expression");
return (Criteria) this;
}
public Criteria andExpressionGreaterThanOrEqualTo(String value) {
addCriterion("expression >=", value, "expression");
return (Criteria) this;
}
public Criteria andExpressionLessThan(String value) {
addCriterion("expression <", value, "expression");
return (Criteria) this;
}
public Criteria andExpressionLessThanOrEqualTo(String value) {
addCriterion("expression <=", value, "expression");
return (Criteria) this;
}
public Criteria andExpressionLike(String value) {
addCriterion("expression like", value, "expression");
return (Criteria) this;
}
public Criteria andExpressionNotLike(String value) {
addCriterion("expression not like", value, "expression");
return (Criteria) this;
}
public Criteria andExpressionIn(List<String> values) {
addCriterion("expression in", values, "expression");
return (Criteria) this;
}
public Criteria andExpressionNotIn(List<String> values) {
addCriterion("expression not in", values, "expression");
return (Criteria) this;
}
public Criteria andExpressionBetween(String value1, String value2) {
addCriterion("expression between", value1, value2, "expression");
return (Criteria) this;
}
public Criteria andExpressionNotBetween(String value1, String value2) {
addCriterion("expression not between", value1, value2, "expression");
return (Criteria) this;
}
public Criteria andEnableIsNull() {
addCriterion("`enable` is null");
return (Criteria) this;
}
public Criteria andEnableIsNotNull() {
addCriterion("`enable` is not null");
return (Criteria) this;
}
public Criteria andEnableEqualTo(Boolean value) {
addCriterion("`enable` =", value, "enable");
return (Criteria) this;
}
public Criteria andEnableNotEqualTo(Boolean value) {
addCriterion("`enable` <>", value, "enable");
return (Criteria) this;
}
public Criteria andEnableGreaterThan(Boolean value) {
addCriterion("`enable` >", value, "enable");
return (Criteria) this;
}
public Criteria andEnableGreaterThanOrEqualTo(Boolean value) {
addCriterion("`enable` >=", value, "enable");
return (Criteria) this;
}
public Criteria andEnableLessThan(Boolean value) {
addCriterion("`enable` <", value, "enable");
return (Criteria) this;
}
public Criteria andEnableLessThanOrEqualTo(Boolean value) {
addCriterion("`enable` <=", value, "enable");
return (Criteria) this;
}
public Criteria andEnableIn(List<Boolean> values) {
addCriterion("`enable` in", values, "enable");
return (Criteria) this;
}
public Criteria andEnableNotIn(List<Boolean> values) {
addCriterion("`enable` not in", values, "enable");
return (Criteria) this;
}
public Criteria andEnableBetween(Boolean value1, Boolean value2) {
addCriterion("`enable` between", value1, value2, "enable");
return (Criteria) this;
}
public Criteria andEnableNotBetween(Boolean value1, Boolean value2) {
addCriterion("`enable` not between", value1, value2, "enable");
return (Criteria) this; return (Criteria) this;
} }
} }

View File

@ -1,38 +0,0 @@
package io.metersphere.project.mapper;
import io.metersphere.project.domain.FakeErrorBlob;
import io.metersphere.project.domain.FakeErrorBlobExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface FakeErrorBlobMapper {
long countByExample(FakeErrorBlobExample example);
int deleteByExample(FakeErrorBlobExample example);
int deleteByPrimaryKey(String id);
int insert(FakeErrorBlob record);
int insertSelective(FakeErrorBlob record);
List<FakeErrorBlob> selectByExampleWithBLOBs(FakeErrorBlobExample example);
List<FakeErrorBlob> selectByExample(FakeErrorBlobExample example);
FakeErrorBlob selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") FakeErrorBlob record, @Param("example") FakeErrorBlobExample example);
int updateByExampleWithBLOBs(@Param("record") FakeErrorBlob record, @Param("example") FakeErrorBlobExample example);
int updateByExample(@Param("record") FakeErrorBlob record, @Param("example") FakeErrorBlobExample example);
int updateByPrimaryKeySelective(FakeErrorBlob record);
int updateByPrimaryKeyWithBLOBs(FakeErrorBlob record);
int batchInsert(@Param("list") List<FakeErrorBlob> list);
int batchInsertSelective(@Param("list") List<FakeErrorBlob> list, @Param("selective") FakeErrorBlob.Column ... selective);
}

View File

@ -1,243 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.project.mapper.FakeErrorBlobMapper">
<resultMap id="BaseResultMap" type="io.metersphere.project.domain.FakeErrorBlob">
<id column="id" jdbcType="VARCHAR" property="id" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.project.domain.FakeErrorBlob">
<result column="content" jdbcType="LONGVARBINARY" property="content" />
<result column="description" jdbcType="LONGVARBINARY" property="description" />
</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
</sql>
<sql id="Blob_Column_List">
content, description
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.project.domain.FakeErrorBlobExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from fake_error_blob
<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.project.domain.FakeErrorBlobExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from fake_error_blob
<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 fake_error_blob
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from fake_error_blob
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.project.domain.FakeErrorBlobExample">
delete from fake_error_blob
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.project.domain.FakeErrorBlob">
insert into fake_error_blob (id, content, description
)
values (#{id,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARBINARY}, #{description,jdbcType=LONGVARBINARY}
)
</insert>
<insert id="insertSelective" parameterType="io.metersphere.project.domain.FakeErrorBlob">
insert into fake_error_blob
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="content != null">
content,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARBINARY},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARBINARY},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.project.domain.FakeErrorBlobExample" resultType="java.lang.Long">
select count(*) from fake_error_blob
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update fake_error_blob
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARBINARY},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=LONGVARBINARY},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update fake_error_blob
set id = #{record.id,jdbcType=VARCHAR},
content = #{record.content,jdbcType=LONGVARBINARY},
description = #{record.description,jdbcType=LONGVARBINARY}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update fake_error_blob
set id = #{record.id,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.project.domain.FakeErrorBlob">
update fake_error_blob
<set>
<if test="content != null">
content = #{content,jdbcType=LONGVARBINARY},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARBINARY},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.project.domain.FakeErrorBlob">
update fake_error_blob
set content = #{content,jdbcType=LONGVARBINARY},
description = #{description,jdbcType=LONGVARBINARY}
where id = #{id,jdbcType=VARCHAR}
</update>
<insert id="batchInsert" parameterType="map">
insert into fake_error_blob
(id, content, description)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.content,jdbcType=LONGVARBINARY}, #{item.description,jdbcType=LONGVARBINARY}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
insert into fake_error_blob (
<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="'content'.toString() == column.value">
#{item.content,jdbcType=LONGVARBINARY}
</if>
<if test="'description'.toString() == column.value">
#{item.description,jdbcType=LONGVARBINARY}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

View File

@ -4,13 +4,16 @@
<resultMap id="BaseResultMap" type="io.metersphere.project.domain.FakeError"> <resultMap id="BaseResultMap" type="io.metersphere.project.domain.FakeError">
<id column="id" jdbcType="VARCHAR" property="id" /> <id column="id" jdbcType="VARCHAR" property="id" />
<result column="project_id" jdbcType="VARCHAR" property="projectId" /> <result column="project_id" jdbcType="VARCHAR" property="projectId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="create_time" jdbcType="BIGINT" property="createTime" /> <result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" /> <result column="update_time" jdbcType="BIGINT" property="updateTime" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" /> <result column="create_user" jdbcType="VARCHAR" property="createUser" />
<result column="update_user" jdbcType="VARCHAR" property="updateUser" /> <result column="update_user" jdbcType="VARCHAR" property="updateUser" />
<result column="error_code" jdbcType="VARCHAR" property="errorCode" /> <result column="type" jdbcType="VARCHAR" property="type" />
<result column="match_type" jdbcType="VARCHAR" property="matchType" /> <result column="resp_type" jdbcType="VARCHAR" property="respType" />
<result column="status" jdbcType="BIT" property="status" /> <result column="relation" jdbcType="VARCHAR" property="relation" />
<result column="expression" jdbcType="VARCHAR" property="expression" />
<result column="enable" jdbcType="BIT" property="enable" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
@ -71,8 +74,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, project_id, create_time, update_time, create_user, update_user, error_code, match_type, id, project_id, `name`, create_time, update_time, create_user, update_user, `type`,
`status` resp_type, relation, expression, `enable`
</sql> </sql>
<select id="selectByExample" parameterType="io.metersphere.project.domain.FakeErrorExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="io.metersphere.project.domain.FakeErrorExample" resultMap="BaseResultMap">
select select
@ -105,13 +108,15 @@
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="io.metersphere.project.domain.FakeError"> <insert id="insert" parameterType="io.metersphere.project.domain.FakeError">
insert into fake_error (id, project_id, create_time, insert into fake_error (id, project_id, `name`,
update_time, create_user, update_user, create_time, update_time, create_user,
error_code, match_type, `status` update_user, `type`, resp_type,
relation, expression, `enable`
) )
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR},
#{errorCode,jdbcType=VARCHAR}, #{matchType,jdbcType=VARCHAR}, #{status,jdbcType=BIT} #{updateUser,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{respType,jdbcType=VARCHAR},
#{relation,jdbcType=VARCHAR}, #{expression,jdbcType=VARCHAR}, #{enable,jdbcType=BIT}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="io.metersphere.project.domain.FakeError"> <insert id="insertSelective" parameterType="io.metersphere.project.domain.FakeError">
@ -123,6 +128,9 @@
<if test="projectId != null"> <if test="projectId != null">
project_id, project_id,
</if> </if>
<if test="name != null">
`name`,
</if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
@ -135,14 +143,20 @@
<if test="updateUser != null"> <if test="updateUser != null">
update_user, update_user,
</if> </if>
<if test="errorCode != null"> <if test="type != null">
error_code, `type`,
</if> </if>
<if test="matchType != null"> <if test="respType != null">
match_type, resp_type,
</if> </if>
<if test="status != null"> <if test="relation != null">
`status`, relation,
</if>
<if test="expression != null">
expression,
</if>
<if test="enable != null">
`enable`,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
@ -152,6 +166,9 @@
<if test="projectId != null"> <if test="projectId != null">
#{projectId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
</if> </if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT},
</if> </if>
@ -164,14 +181,20 @@
<if test="updateUser != null"> <if test="updateUser != null">
#{updateUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR},
</if> </if>
<if test="errorCode != null"> <if test="type != null">
#{errorCode,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
</if> </if>
<if test="matchType != null"> <if test="respType != null">
#{matchType,jdbcType=VARCHAR}, #{respType,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="relation != null">
#{status,jdbcType=BIT}, #{relation,jdbcType=VARCHAR},
</if>
<if test="expression != null">
#{expression,jdbcType=VARCHAR},
</if>
<if test="enable != null">
#{enable,jdbcType=BIT},
</if> </if>
</trim> </trim>
</insert> </insert>
@ -190,6 +213,9 @@
<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.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null"> <if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=BIGINT},
</if> </if>
@ -202,14 +228,20 @@
<if test="record.updateUser != null"> <if test="record.updateUser != null">
update_user = #{record.updateUser,jdbcType=VARCHAR}, update_user = #{record.updateUser,jdbcType=VARCHAR},
</if> </if>
<if test="record.errorCode != null"> <if test="record.type != null">
error_code = #{record.errorCode,jdbcType=VARCHAR}, `type` = #{record.type,jdbcType=VARCHAR},
</if> </if>
<if test="record.matchType != null"> <if test="record.respType != null">
match_type = #{record.matchType,jdbcType=VARCHAR}, resp_type = #{record.respType,jdbcType=VARCHAR},
</if> </if>
<if test="record.status != null"> <if test="record.relation != null">
`status` = #{record.status,jdbcType=BIT}, relation = #{record.relation,jdbcType=VARCHAR},
</if>
<if test="record.expression != null">
expression = #{record.expression,jdbcType=VARCHAR},
</if>
<if test="record.enable != null">
`enable` = #{record.enable,jdbcType=BIT},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
@ -220,13 +252,16 @@
update fake_error update fake_error
set id = #{record.id,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=VARCHAR}, project_id = #{record.projectId,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}, update_time = #{record.updateTime,jdbcType=BIGINT},
create_user = #{record.createUser,jdbcType=VARCHAR}, create_user = #{record.createUser,jdbcType=VARCHAR},
update_user = #{record.updateUser,jdbcType=VARCHAR}, update_user = #{record.updateUser,jdbcType=VARCHAR},
error_code = #{record.errorCode,jdbcType=VARCHAR}, `type` = #{record.type,jdbcType=VARCHAR},
match_type = #{record.matchType,jdbcType=VARCHAR}, resp_type = #{record.respType,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=BIT} relation = #{record.relation,jdbcType=VARCHAR},
expression = #{record.expression,jdbcType=VARCHAR},
`enable` = #{record.enable,jdbcType=BIT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -237,6 +272,9 @@
<if test="projectId != null"> <if test="projectId != null">
project_id = #{projectId,jdbcType=VARCHAR}, project_id = #{projectId,jdbcType=VARCHAR},
</if> </if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=BIGINT},
</if> </if>
@ -249,14 +287,20 @@
<if test="updateUser != null"> <if test="updateUser != null">
update_user = #{updateUser,jdbcType=VARCHAR}, update_user = #{updateUser,jdbcType=VARCHAR},
</if> </if>
<if test="errorCode != null"> <if test="type != null">
error_code = #{errorCode,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR},
</if> </if>
<if test="matchType != null"> <if test="respType != null">
match_type = #{matchType,jdbcType=VARCHAR}, resp_type = #{respType,jdbcType=VARCHAR},
</if> </if>
<if test="status != null"> <if test="relation != null">
`status` = #{status,jdbcType=BIT}, relation = #{relation,jdbcType=VARCHAR},
</if>
<if test="expression != null">
expression = #{expression,jdbcType=VARCHAR},
</if>
<if test="enable != null">
`enable` = #{enable,jdbcType=BIT},
</if> </if>
</set> </set>
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
@ -264,24 +308,28 @@
<update id="updateByPrimaryKey" parameterType="io.metersphere.project.domain.FakeError"> <update id="updateByPrimaryKey" parameterType="io.metersphere.project.domain.FakeError">
update fake_error update fake_error
set project_id = #{projectId,jdbcType=VARCHAR}, set project_id = #{projectId,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}, update_time = #{updateTime,jdbcType=BIGINT},
create_user = #{createUser,jdbcType=VARCHAR}, create_user = #{createUser,jdbcType=VARCHAR},
update_user = #{updateUser,jdbcType=VARCHAR}, update_user = #{updateUser,jdbcType=VARCHAR},
error_code = #{errorCode,jdbcType=VARCHAR}, `type` = #{type,jdbcType=VARCHAR},
match_type = #{matchType,jdbcType=VARCHAR}, resp_type = #{respType,jdbcType=VARCHAR},
`status` = #{status,jdbcType=BIT} relation = #{relation,jdbcType=VARCHAR},
expression = #{expression,jdbcType=VARCHAR},
`enable` = #{enable,jdbcType=BIT}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<insert id="batchInsert" parameterType="map"> <insert id="batchInsert" parameterType="map">
insert into fake_error insert into fake_error
(id, project_id, create_time, update_time, create_user, update_user, error_code, (id, project_id, `name`, create_time, update_time, create_user, update_user, `type`,
match_type, `status`) resp_type, relation, expression, `enable`)
values values
<foreach collection="list" item="item" separator=","> <foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, (#{item.id,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, #{item.updateUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR},
#{item.errorCode,jdbcType=VARCHAR}, #{item.matchType,jdbcType=VARCHAR}, #{item.status,jdbcType=BIT} #{item.updateUser,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR}, #{item.respType,jdbcType=VARCHAR},
#{item.relation,jdbcType=VARCHAR}, #{item.expression,jdbcType=VARCHAR}, #{item.enable,jdbcType=BIT}
) )
</foreach> </foreach>
</insert> </insert>
@ -301,6 +349,9 @@
<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="'name'.toString() == column.value">
#{item.name,jdbcType=VARCHAR}
</if>
<if test="'create_time'.toString() == column.value"> <if test="'create_time'.toString() == column.value">
#{item.createTime,jdbcType=BIGINT} #{item.createTime,jdbcType=BIGINT}
</if> </if>
@ -313,14 +364,20 @@
<if test="'update_user'.toString() == column.value"> <if test="'update_user'.toString() == column.value">
#{item.updateUser,jdbcType=VARCHAR} #{item.updateUser,jdbcType=VARCHAR}
</if> </if>
<if test="'error_code'.toString() == column.value"> <if test="'type'.toString() == column.value">
#{item.errorCode,jdbcType=VARCHAR} #{item.type,jdbcType=VARCHAR}
</if> </if>
<if test="'match_type'.toString() == column.value"> <if test="'resp_type'.toString() == column.value">
#{item.matchType,jdbcType=VARCHAR} #{item.respType,jdbcType=VARCHAR}
</if> </if>
<if test="'status'.toString() == column.value"> <if test="'relation'.toString() == column.value">
#{item.status,jdbcType=BIT} #{item.relation,jdbcType=VARCHAR}
</if>
<if test="'expression'.toString() == column.value">
#{item.expression,jdbcType=VARCHAR}
</if>
<if test="'enable'.toString() == column.value">
#{item.enable,jdbcType=BIT}
</if> </if>
</foreach> </foreach>
) )

View File

@ -19,13 +19,16 @@ CREATE TABLE IF NOT EXISTS fake_error
( (
`id` VARCHAR(50) NOT NULL COMMENT '误报ID', `id` VARCHAR(50) NOT NULL COMMENT '误报ID',
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID', `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID',
`name` VARCHAR(255) NOT NULL COMMENT '误报名称' ,
`create_time` BIGINT NOT NULL COMMENT '创建时间', `create_time` BIGINT NOT NULL COMMENT '创建时间',
`update_time` BIGINT NOT NULL COMMENT '更新时间', `update_time` BIGINT NOT NULL COMMENT '更新时间',
`create_user` VARCHAR(64) NOT NULL COMMENT '创建人', `create_user` VARCHAR(64) NOT NULL COMMENT '创建人',
`update_user` VARCHAR(64) NOT NULL COMMENT '更新人', `update_user` VARCHAR(64) NOT NULL COMMENT '更新人',
`error_code` VARCHAR(255) NOT NULL COMMENT '错误码', `type` VARCHAR(20) NOT NULL COMMENT '匹配类型/文本内容' ,
`match_type` VARCHAR(255) NOT NULL COMMENT '匹配类型', `resp_type` VARCHAR(20) NOT NULL COMMENT '响应内容类型/header/data/body' ,
`status` BIT COMMENT '状态', `relation` VARCHAR(20) NOT NULL COMMENT '操作类型/大于/等于/小于' ,
`expression` VARCHAR(255) NOT NULL COMMENT '表达式' ,
`enable` BIT(1) NOT NULL DEFAULT 1 COMMENT '启用/禁用' ,
PRIMARY KEY (id) PRIMARY KEY (id)
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 DEFAULT CHARSET = utf8mb4
@ -33,11 +36,12 @@ CREATE TABLE IF NOT EXISTS fake_error
CREATE INDEX idx_project_id ON fake_error (project_id); CREATE INDEX idx_project_id ON fake_error (project_id);
CREATE INDEX project_id_status ON fake_error (project_id, status); CREATE INDEX project_id_status ON fake_error (project_id,expression);
CREATE INDEX idx_create_time ON fake_error (create_time); CREATE INDEX idx_create_time ON fake_error (create_time);
CREATE INDEX idx_update_time ON fake_error (update_time); CREATE INDEX idx_update_time ON fake_error (update_time);
CREATE INDEX idx_create_user ON fake_error (create_user); CREATE INDEX idx_create_user ON fake_error (create_user);
CREATE INDEX idx_update_user ON fake_error (update_user); CREATE INDEX idx_update_user ON fake_error (update_user);
CREATE INDEX idx_name ON fake_error (name);
CREATE TABLE IF NOT EXISTS file_association CREATE TABLE IF NOT EXISTS file_association
( (
@ -210,16 +214,6 @@ CREATE TABLE IF NOT EXISTS custom_function_blob
DEFAULT CHARSET = utf8mb4 DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '自定义函数-代码片段大字段'; COLLATE = utf8mb4_general_ci COMMENT = '自定义函数-代码片段大字段';
CREATE TABLE IF NOT EXISTS fake_error_blob
(
`id` VARCHAR(50) NOT NULL COMMENT 'Test ID',
`content` LONGBLOB COMMENT '内容',
`description` LONGBLOB COMMENT '报告内容',
PRIMARY KEY (id)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci COMMENT = '误报库大字段';
CREATE TABLE IF NOT EXISTS file_metadata_blob CREATE TABLE IF NOT EXISTS file_metadata_blob
( (
`id` VARCHAR(50) NOT NULL COMMENT '文件ID', `id` VARCHAR(50) NOT NULL COMMENT '文件ID',

View File

@ -1,7 +1,6 @@
package io.metersphere.sdk.config.interceptor; package io.metersphere.sdk.config.interceptor;
import io.metersphere.project.domain.CustomFunctionBlob; import io.metersphere.project.domain.CustomFunctionBlob;
import io.metersphere.project.domain.FakeErrorBlob;
import io.metersphere.project.domain.FileMetadataBlob; import io.metersphere.project.domain.FileMetadataBlob;
import io.metersphere.sdk.util.CompressUtils; import io.metersphere.sdk.util.CompressUtils;
import io.metersphere.sdk.util.MybatisInterceptorConfig; import io.metersphere.sdk.util.MybatisInterceptorConfig;
@ -18,8 +17,6 @@ public class ProjectInterceptor {
List<MybatisInterceptorConfig> configList = new ArrayList<>(); List<MybatisInterceptorConfig> configList = new ArrayList<>();
configList.add(new MybatisInterceptorConfig(FileMetadataBlob.class, "gitInfo", CompressUtils.class, "zip", "unzip")); configList.add(new MybatisInterceptorConfig(FileMetadataBlob.class, "gitInfo", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(FakeErrorBlob.class, "description", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(FakeErrorBlob.class, "content", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(CustomFunctionBlob.class, "script", CompressUtils.class, "zip", "unzip")); configList.add(new MybatisInterceptorConfig(CustomFunctionBlob.class, "script", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(CustomFunctionBlob.class, "result", CompressUtils.class, "zip", "unzip")); configList.add(new MybatisInterceptorConfig(CustomFunctionBlob.class, "result", CompressUtils.class, "zip", "unzip"));
configList.add(new MybatisInterceptorConfig(CustomFunctionBlob.class, "params", CompressUtils.class, "zip", "unzip")); configList.add(new MybatisInterceptorConfig(CustomFunctionBlob.class, "params", CompressUtils.class, "zip", "unzip"));

View File

@ -1,11 +1,22 @@
fake_error.id.not_blank=ID is required fake_error.id.not_blank=ID is required
fake_error.project_id.length_range=Project ID length must be between {min} and {max} fake_error.project_id.length_range=Project ID length must be between {min} and {max}
fake_error.project_id.not_blank=Project ID is required fake_error.project_id.not_blank=Project ID is required
fake_error.name.length_range=Name length must be between {min} and {max}
fake_error.name.not_blank=Name is required
fake_error.create_user.length_range=Create User length must be between {min} and {max} fake_error.create_user.length_range=Create User length must be between {min} and {max}
fake_error.create_user.not_blank=Create User is required fake_error.create_user.not_blank=Create User is required
fake_error.update_user.length_range=Update User length must be between {min} and {max} fake_error.update_user.length_range=Update User length must be between {min} and {max}
fake_error.update_user.not_blank=Update User is required fake_error.update_user.not_blank=Update User is required
fake_error.error_code.length_range=Error Code length must be between {min} and {max} fake_error.error_code.length_range=Error Code length must be between {min} and {max}
fake_error.type.not_blank=Type is required
fake_error.type.length_range=Type length must be between {min} and {max}
fake_error.resp_type.not_blank=Resp Type is required
fake_error.relation.not_blank=Relation is required
fake_error.relation.length_range=Relation length must be between {min} and {max}
fake_error.expression.not_blank=Expression is required
fake_error.expression.length_range=Expression length must be between {min} and {max}
fake_error.enable.not_blank=Enable is required
fake_error.enable.length_range=Enable length must be between {min} and {max}
fake_error.error_code.not_blank=Error Code is required fake_error.error_code.not_blank=Error Code is required
fake_error.match_type.length_range=Match Type length must be between {min} and {max} fake_error.match_type.length_range=Match Type length must be between {min} and {max}
fake_error.match_type.not_blank=Match Type is required fake_error.match_type.not_blank=Match Type is required

View File

@ -1,10 +1,21 @@
fake_error.id.not_blank=ID不能为空 fake_error.id.not_blank=ID不能为空
fake_error.project_id.length_range=项目ID长度必须在{min}-{max}之间 fake_error.project_id.length_range=项目ID长度必须在{min}-{max}之间
fake_error.project_id.not_blank=项目ID不能为空 fake_error.project_id.not_blank=项目ID不能为空
fake_error.name.length_range=误报名称长度必须在{min}-{max}之间
fake_error.name.not_blank=误报名称不能为空
fake_error.create_user.length_range=创建人长度必须在{min}-{max}之间 fake_error.create_user.length_range=创建人长度必须在{min}-{max}之间
fake_error.create_user.not_blank=创建人不能为空 fake_error.create_user.not_blank=创建人不能为空
fake_error.update_user.length_range=更新人长度必须在{min}-{max}之间 fake_error.update_user.length_range=更新人长度必须在{min}-{max}之间
fake_error.update_user.not_blank=更新人不能为空 fake_error.update_user.not_blank=更新人不能为空
fake_error.type.not_blank=类型不能为空
fake_error.type.length_range=类型长度必须在{min}-{max}之间
fake_error.resp_type.not_blank=响应类型不能为空
fake_error.relation.not_blank=操作类型不能为空
fake_error.relation.length_range=操作类型长度必须在{min}-{max}之间
fake_error.expression.not_blank=表达式不能为空
fake_error.expression.length_range=表达式长度必须在{min}-{max}之间
fake_error.enable.not_blank=是否启用不能为空
fake_error.enable.length_range=是否启用长度必须在{min}-{max}之间
fake_error.error_code.length_range=错误码长度必须在{min}-{max}之间 fake_error.error_code.length_range=错误码长度必须在{min}-{max}之间
fake_error.error_code.not_blank=错误码不能为空 fake_error.error_code.not_blank=错误码不能为空
fake_error.match_type.length_range=匹配类型长度必须在{min}-{max}之间 fake_error.match_type.length_range=匹配类型长度必须在{min}-{max}之间

View File

@ -1,10 +1,21 @@
fake_error.id.not_blank=ID不能為空 fake_error.id.not_blank=ID不能為空
fake_error.project_id.length_range=項目ID長度必須在{min}-{max}之間 fake_error.project_id.length_range=項目ID長度必須在{min}-{max}之間
fake_error.project_id.not_blank=項目ID不能為空 fake_error.project_id.not_blank=項目ID不能為空
fake_error.name.length_range=誤報名稱長度必須在{min}-{max}之間
fake_error.name.not_blank=誤報名稱不能為空
fake_error.create_user.length_range=創建人長度必須在{min}-{max}之間 fake_error.create_user.length_range=創建人長度必須在{min}-{max}之間
fake_error.create_user.not_blank=創建人不能為空 fake_error.create_user.not_blank=創建人不能為空
fake_error.update_user.length_range=更新人長度必須在{min}-{max}之間 fake_error.update_user.length_range=更新人長度必須在{min}-{max}之間
fake_error.update_user.not_blank=更新人不能為空 fake_error.update_user.not_blank=更新人不能為空
fake_error.type.not_blank=類型不能為空
fake_error.type.length_range=類型長度必須在{min}-{max}之間
fake_error.resp_type.not_blank=響應類型不能為空
fake_error.relation.not_blank=操作類型不能為空
fake_error.relation.length_range=操作類型長度必須在{min}-{max}之間
fake_error.expression.not_blank=表達式不能為空
fake_error.expression.length_range=表達式長度必須在{min}-{max}之間
fake_error.enable.not_blank=是否啟用不能為空
fake_error.enable.length_range=是否啟用長度必須在{min}-{max}之間
fake_error.error_code.length_range=錯誤碼長度必須在{min}-{max}之間 fake_error.error_code.length_range=錯誤碼長度必須在{min}-{max}之間
fake_error.error_code.not_blank=錯誤碼不能為空 fake_error.error_code.not_blank=錯誤碼不能為空
fake_error.match_type.length_range=匹配類型長度必須在{min}-{max}之間 fake_error.match_type.length_range=匹配類型長度必須在{min}-{max}之間