refactor(功能用例): 去除用例模块变更历史表
This commit is contained in:
parent
7e42c5cc3b
commit
a554003902
|
@ -18,29 +18,29 @@ public class FunctionalCaseBlob implements Serializable {
|
|||
private String id;
|
||||
|
||||
@Schema(description = "用例步骤(JSON),step_model 为 Step 时启用")
|
||||
private String steps;
|
||||
private byte[] steps;
|
||||
|
||||
@Schema(description = "步骤描述,step_model 为 Text 时启用")
|
||||
private String textDescription;
|
||||
private byte[] textDescription;
|
||||
|
||||
@Schema(description = "预期结果,step_model 为 Text 时启用")
|
||||
private String expectedResult;
|
||||
private byte[] expectedResult;
|
||||
|
||||
@Schema(description = "前置条件")
|
||||
private String prerequisite;
|
||||
private byte[] prerequisite;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String description;
|
||||
private byte[] description;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
steps("steps", "steps", "LONGVARCHAR", false),
|
||||
textDescription("text_description", "textDescription", "LONGVARCHAR", false),
|
||||
expectedResult("expected_result", "expectedResult", "LONGVARCHAR", false),
|
||||
prerequisite("prerequisite", "prerequisite", "LONGVARCHAR", false),
|
||||
description("description", "description", "LONGVARCHAR", false);
|
||||
steps("steps", "steps", "LONGVARBINARY", false),
|
||||
textDescription("text_description", "textDescription", "LONGVARBINARY", false),
|
||||
expectedResult("expected_result", "expectedResult", "LONGVARBINARY", false),
|
||||
prerequisite("prerequisite", "prerequisite", "LONGVARBINARY", false),
|
||||
description("description", "description", "LONGVARBINARY", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
|
|
|
@ -1,124 +0,0 @@
|
|||
package io.metersphere.functional.domain;
|
||||
|
||||
import io.metersphere.validation.groups.Created;
|
||||
import io.metersphere.validation.groups.Updated;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FunctionalCaseHistory implements Serializable {
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{functional_case_history.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{functional_case_history.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "用例ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{functional_case_history.case_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{functional_case_history.case_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String caseId;
|
||||
|
||||
@Schema(description = "变更记录批次号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer num;
|
||||
|
||||
@Schema(description = "变更类型;IMPORT/EDIT/ROLLBACK", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String type;
|
||||
|
||||
@Schema(description = "回退来源")
|
||||
private String rollbackSourceId;
|
||||
|
||||
@Schema(description = "操作人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "操作时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "修改内容", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{functional_case_history.content.not_blank}", groups = {Created.class})
|
||||
private byte[] content;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
caseId("case_id", "caseId", "VARCHAR", false),
|
||||
num("num", "num", "INTEGER", false),
|
||||
type("type", "type", "VARCHAR", true),
|
||||
rollbackSourceId("rollback_source_id", "rollbackSourceId", "VARCHAR", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", 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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,670 +0,0 @@
|
|||
package io.metersphere.functional.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class FunctionalCaseHistoryExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public FunctionalCaseHistoryExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdIsNull() {
|
||||
addCriterion("case_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdIsNotNull() {
|
||||
addCriterion("case_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdEqualTo(String value) {
|
||||
addCriterion("case_id =", value, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdNotEqualTo(String value) {
|
||||
addCriterion("case_id <>", value, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdGreaterThan(String value) {
|
||||
addCriterion("case_id >", value, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("case_id >=", value, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdLessThan(String value) {
|
||||
addCriterion("case_id <", value, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("case_id <=", value, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdLike(String value) {
|
||||
addCriterion("case_id like", value, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdNotLike(String value) {
|
||||
addCriterion("case_id not like", value, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdIn(List<String> values) {
|
||||
addCriterion("case_id in", values, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdNotIn(List<String> values) {
|
||||
addCriterion("case_id not in", values, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdBetween(String value1, String value2) {
|
||||
addCriterion("case_id between", value1, value2, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseIdNotBetween(String value1, String value2) {
|
||||
addCriterion("case_id not between", value1, value2, "caseId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumIsNull() {
|
||||
addCriterion("num is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumIsNotNull() {
|
||||
addCriterion("num is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumEqualTo(Integer value) {
|
||||
addCriterion("num =", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumNotEqualTo(Integer value) {
|
||||
addCriterion("num <>", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumGreaterThan(Integer value) {
|
||||
addCriterion("num >", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("num >=", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumLessThan(Integer value) {
|
||||
addCriterion("num <", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("num <=", value, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumIn(List<Integer> values) {
|
||||
addCriterion("num in", values, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumNotIn(List<Integer> values) {
|
||||
addCriterion("num not in", values, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumBetween(Integer value1, Integer value2) {
|
||||
addCriterion("num between", value1, value2, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNumNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("num not between", value1, value2, "num");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNull() {
|
||||
addCriterion("`type` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIsNotNull() {
|
||||
addCriterion("`type` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeEqualTo(String value) {
|
||||
addCriterion("`type` =", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotEqualTo(String value) {
|
||||
addCriterion("`type` <>", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThan(String value) {
|
||||
addCriterion("`type` >", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`type` >=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThan(String value) {
|
||||
addCriterion("`type` <", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLessThanOrEqualTo(String value) {
|
||||
addCriterion("`type` <=", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeLike(String value) {
|
||||
addCriterion("`type` like", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotLike(String value) {
|
||||
addCriterion("`type` not like", value, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeIn(List<String> values) {
|
||||
addCriterion("`type` in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotIn(List<String> values) {
|
||||
addCriterion("`type` not in", values, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeBetween(String value1, String value2) {
|
||||
addCriterion("`type` between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTypeNotBetween(String value1, String value2) {
|
||||
addCriterion("`type` not between", value1, value2, "type");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdIsNull() {
|
||||
addCriterion("rollback_source_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdIsNotNull() {
|
||||
addCriterion("rollback_source_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdEqualTo(String value) {
|
||||
addCriterion("rollback_source_id =", value, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdNotEqualTo(String value) {
|
||||
addCriterion("rollback_source_id <>", value, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdGreaterThan(String value) {
|
||||
addCriterion("rollback_source_id >", value, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("rollback_source_id >=", value, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdLessThan(String value) {
|
||||
addCriterion("rollback_source_id <", value, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("rollback_source_id <=", value, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdLike(String value) {
|
||||
addCriterion("rollback_source_id like", value, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdNotLike(String value) {
|
||||
addCriterion("rollback_source_id not like", value, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdIn(List<String> values) {
|
||||
addCriterion("rollback_source_id in", values, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdNotIn(List<String> values) {
|
||||
addCriterion("rollback_source_id not in", values, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdBetween(String value1, String value2) {
|
||||
addCriterion("rollback_source_id between", value1, value2, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRollbackSourceIdNotBetween(String value1, String value2) {
|
||||
addCriterion("rollback_source_id not between", value1, value2, "rollbackSourceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNotNull() {
|
||||
addCriterion("create_user is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserEqualTo(String value) {
|
||||
addCriterion("create_user =", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotEqualTo(String value) {
|
||||
addCriterion("create_user <>", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThan(String value) {
|
||||
addCriterion("create_user >", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("create_user >=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThan(String value) {
|
||||
addCriterion("create_user <", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLessThanOrEqualTo(String value) {
|
||||
addCriterion("create_user <=", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserLike(String value) {
|
||||
addCriterion("create_user like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotLike(String value) {
|
||||
addCriterion("create_user not like", value, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIn(List<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotIn(List<String> values) {
|
||||
addCriterion("create_user not in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserBetween(String value1, String value2) {
|
||||
addCriterion("create_user between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotBetween(String value1, String value2) {
|
||||
addCriterion("create_user not between", value1, value2, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNotNull() {
|
||||
addCriterion("create_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(Long value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(Long value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(Long value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(Long value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<Long> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Long> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public 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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,11 +5,11 @@
|
|||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.functional.domain.FunctionalCaseBlob">
|
||||
<result column="steps" jdbcType="LONGVARCHAR" property="steps" />
|
||||
<result column="text_description" jdbcType="LONGVARCHAR" property="textDescription" />
|
||||
<result column="expected_result" jdbcType="LONGVARCHAR" property="expectedResult" />
|
||||
<result column="prerequisite" jdbcType="LONGVARCHAR" property="prerequisite" />
|
||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||
<result column="steps" jdbcType="LONGVARBINARY" property="steps" />
|
||||
<result column="text_description" jdbcType="LONGVARBINARY" property="textDescription" />
|
||||
<result column="expected_result" jdbcType="LONGVARBINARY" property="expectedResult" />
|
||||
<result column="prerequisite" jdbcType="LONGVARBINARY" property="prerequisite" />
|
||||
<result column="description" jdbcType="LONGVARBINARY" property="description" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -125,11 +125,11 @@
|
|||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.functional.domain.FunctionalCaseBlob">
|
||||
insert into functional_case_blob (id, steps, text_description,
|
||||
expected_result, prerequisite, description
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{steps,jdbcType=LONGVARCHAR}, #{textDescription,jdbcType=LONGVARCHAR},
|
||||
#{expectedResult,jdbcType=LONGVARCHAR}, #{prerequisite,jdbcType=LONGVARCHAR}, #{description,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
expected_result, prerequisite,
|
||||
description)
|
||||
values (#{id,jdbcType=VARCHAR}, #{steps,jdbcType=LONGVARBINARY}, #{textDescription,jdbcType=LONGVARBINARY},
|
||||
#{expectedResult,jdbcType=LONGVARBINARY}, #{prerequisite,jdbcType=LONGVARBINARY},
|
||||
#{description,jdbcType=LONGVARBINARY})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.FunctionalCaseBlob">
|
||||
insert into functional_case_blob
|
||||
|
@ -158,19 +158,19 @@
|
|||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="steps != null">
|
||||
#{steps,jdbcType=LONGVARCHAR},
|
||||
#{steps,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="textDescription != null">
|
||||
#{textDescription,jdbcType=LONGVARCHAR},
|
||||
#{textDescription,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="expectedResult != null">
|
||||
#{expectedResult,jdbcType=LONGVARCHAR},
|
||||
#{expectedResult,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
#{prerequisite,jdbcType=LONGVARCHAR},
|
||||
#{prerequisite,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
#{description,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
@ -187,19 +187,19 @@
|
|||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.steps != null">
|
||||
steps = #{record.steps,jdbcType=LONGVARCHAR},
|
||||
steps = #{record.steps,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="record.textDescription != null">
|
||||
text_description = #{record.textDescription,jdbcType=LONGVARCHAR},
|
||||
text_description = #{record.textDescription,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="record.expectedResult != null">
|
||||
expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR},
|
||||
expected_result = #{record.expectedResult,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="record.prerequisite != null">
|
||||
prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR},
|
||||
prerequisite = #{record.prerequisite,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
|
@ -209,11 +209,11 @@
|
|||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update functional_case_blob
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
steps = #{record.steps,jdbcType=LONGVARCHAR},
|
||||
text_description = #{record.textDescription,jdbcType=LONGVARCHAR},
|
||||
expected_result = #{record.expectedResult,jdbcType=LONGVARCHAR},
|
||||
prerequisite = #{record.prerequisite,jdbcType=LONGVARCHAR},
|
||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||
steps = #{record.steps,jdbcType=LONGVARBINARY},
|
||||
text_description = #{record.textDescription,jdbcType=LONGVARBINARY},
|
||||
expected_result = #{record.expectedResult,jdbcType=LONGVARBINARY},
|
||||
prerequisite = #{record.prerequisite,jdbcType=LONGVARBINARY},
|
||||
description = #{record.description,jdbcType=LONGVARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -229,30 +229,30 @@
|
|||
update functional_case_blob
|
||||
<set>
|
||||
<if test="steps != null">
|
||||
steps = #{steps,jdbcType=LONGVARCHAR},
|
||||
steps = #{steps,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="textDescription != null">
|
||||
text_description = #{textDescription,jdbcType=LONGVARCHAR},
|
||||
text_description = #{textDescription,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="expectedResult != null">
|
||||
expected_result = #{expectedResult,jdbcType=LONGVARCHAR},
|
||||
expected_result = #{expectedResult,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="prerequisite != null">
|
||||
prerequisite = #{prerequisite,jdbcType=LONGVARCHAR},
|
||||
prerequisite = #{prerequisite,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
description = #{description,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.functional.domain.FunctionalCaseBlob">
|
||||
update functional_case_blob
|
||||
set steps = #{steps,jdbcType=LONGVARCHAR},
|
||||
text_description = #{textDescription,jdbcType=LONGVARCHAR},
|
||||
expected_result = #{expectedResult,jdbcType=LONGVARCHAR},
|
||||
prerequisite = #{prerequisite,jdbcType=LONGVARCHAR},
|
||||
description = #{description,jdbcType=LONGVARCHAR}
|
||||
set steps = #{steps,jdbcType=LONGVARBINARY},
|
||||
text_description = #{textDescription,jdbcType=LONGVARBINARY},
|
||||
expected_result = #{expectedResult,jdbcType=LONGVARBINARY},
|
||||
prerequisite = #{prerequisite,jdbcType=LONGVARBINARY},
|
||||
description = #{description,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
|
@ -260,9 +260,9 @@
|
|||
(id, steps, text_description, expected_result, prerequisite, description)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.steps,jdbcType=LONGVARCHAR}, #{item.textDescription,jdbcType=LONGVARCHAR},
|
||||
#{item.expectedResult,jdbcType=LONGVARCHAR}, #{item.prerequisite,jdbcType=LONGVARCHAR},
|
||||
#{item.description,jdbcType=LONGVARCHAR})
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.steps,jdbcType=LONGVARBINARY}, #{item.textDescription,jdbcType=LONGVARBINARY},
|
||||
#{item.expectedResult,jdbcType=LONGVARBINARY}, #{item.prerequisite,jdbcType=LONGVARBINARY},
|
||||
#{item.description,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
|
@ -279,19 +279,19 @@
|
|||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'steps'.toString() == column.value">
|
||||
#{item.steps,jdbcType=LONGVARCHAR}
|
||||
#{item.steps,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
<if test="'text_description'.toString() == column.value">
|
||||
#{item.textDescription,jdbcType=LONGVARCHAR}
|
||||
#{item.textDescription,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
<if test="'expected_result'.toString() == column.value">
|
||||
#{item.expectedResult,jdbcType=LONGVARCHAR}
|
||||
#{item.expectedResult,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
<if test="'prerequisite'.toString() == column.value">
|
||||
#{item.prerequisite,jdbcType=LONGVARCHAR}
|
||||
#{item.prerequisite,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
<if test="'description'.toString() == column.value">
|
||||
#{item.description,jdbcType=LONGVARCHAR}
|
||||
#{item.description,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
package io.metersphere.functional.mapper;
|
||||
|
||||
import io.metersphere.functional.domain.FunctionalCaseHistory;
|
||||
import io.metersphere.functional.domain.FunctionalCaseHistoryExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface FunctionalCaseHistoryMapper {
|
||||
long countByExample(FunctionalCaseHistoryExample example);
|
||||
|
||||
int deleteByExample(FunctionalCaseHistoryExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(FunctionalCaseHistory record);
|
||||
|
||||
int insertSelective(FunctionalCaseHistory record);
|
||||
|
||||
List<FunctionalCaseHistory> selectByExampleWithBLOBs(FunctionalCaseHistoryExample example);
|
||||
|
||||
List<FunctionalCaseHistory> selectByExample(FunctionalCaseHistoryExample example);
|
||||
|
||||
FunctionalCaseHistory selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") FunctionalCaseHistory record, @Param("example") FunctionalCaseHistoryExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") FunctionalCaseHistory record, @Param("example") FunctionalCaseHistoryExample example);
|
||||
|
||||
int updateByExample(@Param("record") FunctionalCaseHistory record, @Param("example") FunctionalCaseHistoryExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(FunctionalCaseHistory record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(FunctionalCaseHistory record);
|
||||
|
||||
int updateByPrimaryKey(FunctionalCaseHistory record);
|
||||
|
||||
int batchInsert(@Param("list") List<FunctionalCaseHistory> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<FunctionalCaseHistory> list, @Param("selective") FunctionalCaseHistory.Column ... selective);
|
||||
}
|
|
@ -1,352 +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.functional.mapper.FunctionalCaseHistoryMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.functional.domain.FunctionalCaseHistory">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="rollback_source_id" jdbcType="VARCHAR" property="rollbackSourceId" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.functional.domain.FunctionalCaseHistory">
|
||||
<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, case_id, num, `type`, rollback_source_id, create_user, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
content
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.functional.domain.FunctionalCaseHistoryExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from functional_case_history
|
||||
<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.functional.domain.FunctionalCaseHistoryExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from functional_case_history
|
||||
<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 functional_case_history
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from functional_case_history
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.functional.domain.FunctionalCaseHistoryExample">
|
||||
delete from functional_case_history
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.functional.domain.FunctionalCaseHistory">
|
||||
insert into functional_case_history (id, case_id, num,
|
||||
`type`, rollback_source_id, create_user,
|
||||
create_time, content)
|
||||
values (#{id,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
|
||||
#{type,jdbcType=VARCHAR}, #{rollbackSourceId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARBINARY})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.functional.domain.FunctionalCaseHistory">
|
||||
insert into functional_case_history
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="caseId != null">
|
||||
case_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="rollbackSourceId != null">
|
||||
rollback_source_id,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="caseId != null">
|
||||
#{caseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rollbackSourceId != null">
|
||||
#{rollbackSourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.functional.domain.FunctionalCaseHistoryExample" resultType="java.lang.Long">
|
||||
select count(*) from functional_case_history
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update functional_case_history
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.caseId != null">
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.rollbackSourceId != null">
|
||||
rollback_source_id = #{record.rollbackSourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</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 functional_case_history
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
rollback_source_id = #{record.rollbackSourceId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
content = #{record.content,jdbcType=LONGVARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update functional_case_history
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
rollback_source_id = #{record.rollbackSourceId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.functional.domain.FunctionalCaseHistory">
|
||||
update functional_case_history
|
||||
<set>
|
||||
<if test="caseId != null">
|
||||
case_id = #{caseId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rollbackSourceId != null">
|
||||
rollback_source_id = #{rollbackSourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.functional.domain.FunctionalCaseHistory">
|
||||
update functional_case_history
|
||||
set case_id = #{caseId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
rollback_source_id = #{rollbackSourceId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
content = #{content,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.functional.domain.FunctionalCaseHistory">
|
||||
update functional_case_history
|
||||
set case_id = #{caseId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
rollback_source_id = #{rollbackSourceId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into functional_case_history
|
||||
(id, case_id, num, `type`, rollback_source_id, create_user, create_time, content)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.caseId,jdbcType=VARCHAR}, #{item.num,jdbcType=INTEGER},
|
||||
#{item.type,jdbcType=VARCHAR}, #{item.rollbackSourceId,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR},
|
||||
#{item.createTime,jdbcType=BIGINT}, #{item.content,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into functional_case_history (
|
||||
<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="'case_id'.toString() == column.value">
|
||||
#{item.caseId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'num'.toString() == column.value">
|
||||
#{item.num,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'type'.toString() == column.value">
|
||||
#{item.type,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'rollback_source_id'.toString() == column.value">
|
||||
#{item.rollbackSourceId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'content'.toString() == column.value">
|
||||
#{item.content,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
|
@ -46,11 +46,11 @@ CREATE INDEX idx_pos ON functional_case(pos);
|
|||
CREATE TABLE IF NOT EXISTS functional_case_blob
|
||||
(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '功能用例ID',
|
||||
`steps` LONGTEXT COMMENT '用例步骤(JSON),step_model 为 Step 时启用',
|
||||
`text_description` LONGTEXT COMMENT '文本描述,step_model 为 Text 时启用',
|
||||
`expected_result` LONGTEXT COMMENT '预期结果,step_model 为 Text 时启用',
|
||||
`prerequisite` LONGTEXT COMMENT '前置条件',
|
||||
`description` LONGTEXT COMMENT '备注',
|
||||
`steps` LONGBLOB COMMENT '用例步骤(JSON),step_model 为 Step 时启用',
|
||||
`text_description` LONGBLOB COMMENT '文本描述,step_model 为 Text 时启用',
|
||||
`expected_result` LONGBLOB COMMENT '预期结果,step_model 为 Text 时启用',
|
||||
`prerequisite` LONGBLOB COMMENT '前置条件',
|
||||
`description` LONGBLOB COMMENT '备注',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
|
@ -228,25 +228,6 @@ CREATE TABLE IF NOT EXISTS functional_case_custom_field
|
|||
COLLATE = utf8mb4_general_ci COMMENT = '自定义字段功能用例关系';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS functional_case_history
|
||||
(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'ID',
|
||||
`case_id` VARCHAR(50) NOT NULL COMMENT '用例ID',
|
||||
`num` INT NOT NULL COMMENT '变更记录批次号',
|
||||
`type` VARCHAR(64) NOT NULL COMMENT '变更类型;IMPORT/EDIT/ROLLBACK',
|
||||
`rollback_source_id` VARCHAR(50) COMMENT '回退来源',
|
||||
`content` BLOB NOT NULL COMMENT '修改内容',
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '操作人',
|
||||
`create_time` BIGINT NOT NULL COMMENT '操作时间',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '用例变更记录';
|
||||
|
||||
|
||||
CREATE INDEX idx_case_id ON functional_case_history (case_id);
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS case_review
|
||||
(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
|
||||
|
|
|
@ -91,10 +91,6 @@ functional_case_test.source_type.not_blank=Test type cannot be empty
|
|||
#FunctionalCaseCustomField
|
||||
functional_case_custom_field.case_id.not_blank=Case ID cannot be empty
|
||||
functional_case_custom_field.field_id.not_blank=Field ID cannot be empty
|
||||
#module:FunctionalCaseHistory
|
||||
functional_case_history.id.not_blank=ID cannot be empty
|
||||
functional_case_history.case_id.not_blank=Case ID cannot be empty
|
||||
functional_case_history.content.not_blank=Content cannot be empty
|
||||
#module:MinderExtraNode
|
||||
minder_extra_node.id.not_blank=ID cannot be empty
|
||||
minder_extra_node.parent_id.length_range=The length of the parent node ID must be between 1 and 50
|
||||
|
|
|
@ -90,10 +90,6 @@ functional_case_test.source_type.not_blank=用例类型不能为空
|
|||
#FunctionalCaseCustomField
|
||||
functional_case_custom_field.case_id.not_blank=功能用例ID不能为空
|
||||
functional_case_custom_field.field_id.not_blank=自定义字段ID不能为空
|
||||
#module:FunctionalCaseHistory
|
||||
functional_case_history.id.not_blank=ID不能为空
|
||||
functional_case_history.case_id.not_blank=功能用例ID不能为空
|
||||
functional_case_history.content.not_blank=内容不能为空
|
||||
#module:MinderExtraNode
|
||||
minder_extra_node.id.not_blank=ID不能为空
|
||||
minder_extra_node.parent_id.length_range=父节点的ID长度必须在1-50之间
|
||||
|
|
|
@ -91,10 +91,6 @@ functional_case_test.source_type.not_blank=用例類型不能為空
|
|||
#FunctionalCaseCustomField
|
||||
functional_case_custom_field.case_id.not_blank=功能用例ID不能爲空
|
||||
functional_case_custom_field.field_id.not_blank=自定義字段ID不能爲空
|
||||
#module:FunctionalCaseHistory
|
||||
functional_case_history.id.not_blank=ID不能為空
|
||||
functional_case_history.case_id.not_blank=功能用例ID不能爲空
|
||||
functional_case_history.content.not_blank=內容不能爲空
|
||||
#module:MinderExtraNode
|
||||
minder_extra_node.id.not_blank=ID不能為空
|
||||
minder_extra_node.parent_id.length_range=父節點的ID長度必須在1-50之間
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
package io.metersphere.functional.constants;
|
||||
|
||||
/**
|
||||
* @author wx
|
||||
*/
|
||||
|
||||
public enum HistoryLogEnum {
|
||||
IMPORT,
|
||||
EDIT,
|
||||
ROLLBACK
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package io.metersphere.functional.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface FunctionalCaseHistoryService {
|
||||
void saveHistoryLog(List<String> caseIds, String type, String userId);
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
package io.metersphere.functional.service;
|
||||
|
||||
import io.metersphere.functional.constants.FunctionalCaseReviewStatus;
|
||||
import io.metersphere.functional.constants.HistoryLogEnum;
|
||||
import io.metersphere.functional.domain.*;
|
||||
import io.metersphere.functional.dto.*;
|
||||
import io.metersphere.functional.mapper.ExtFunctionalCaseMapper;
|
||||
|
@ -19,7 +18,6 @@ import io.metersphere.sdk.constants.FunctionalCaseExecuteResult;
|
|||
import io.metersphere.sdk.constants.TemplateScene;
|
||||
import io.metersphere.sdk.exception.MSException;
|
||||
import io.metersphere.sdk.util.BeanUtils;
|
||||
import io.metersphere.sdk.util.CommonBeanFactory;
|
||||
import io.metersphere.sdk.util.JSON;
|
||||
import io.metersphere.system.dto.sdk.TemplateCustomFieldDTO;
|
||||
import io.metersphere.system.dto.sdk.TemplateDTO;
|
||||
|
@ -102,17 +100,10 @@ public class FunctionalCaseService {
|
|||
functionalCaseAttachmentService.association(request.getRelateFileMetaIds(), caseId, userId, ADD_FUNCTIONAL_CASE_FILE_LOG_URL, request.getProjectId());
|
||||
}
|
||||
|
||||
saveHistory(Collections.singletonList(caseId), HistoryLogEnum.EDIT.name(), userId);
|
||||
|
||||
return functionalCase;
|
||||
}
|
||||
|
||||
private void saveHistory(List<String> ids, String type, String userId) {
|
||||
FunctionalCaseHistoryService functionalCaseHistoryService = CommonBeanFactory.getBean(FunctionalCaseHistoryService.class);
|
||||
if (functionalCaseHistoryService != null) {
|
||||
functionalCaseHistoryService.saveHistoryLog(ids, type, userId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加功能用例
|
||||
|
@ -282,7 +273,6 @@ public class FunctionalCaseService {
|
|||
functionalCaseAttachmentService.association(request.getRelateFileMetaIds(), request.getId(), userId, UPDATE_FUNCTIONAL_CASE_FILE_LOG_URL, request.getProjectId());
|
||||
}
|
||||
|
||||
saveHistory(Collections.singletonList(request.getId()), HistoryLogEnum.EDIT.name(), userId);
|
||||
|
||||
return functionalCase;
|
||||
|
||||
|
@ -308,7 +298,7 @@ public class FunctionalCaseService {
|
|||
//更新附属表信息
|
||||
FunctionalCaseBlob functionalCaseBlob = new FunctionalCaseBlob();
|
||||
BeanUtils.copyBean(functionalCaseBlob, request);
|
||||
functionalCaseBlobMapper.updateByPrimaryKeySelective(functionalCaseBlob);
|
||||
functionalCaseBlobMapper.updateByPrimaryKeyWithBLOBs(functionalCaseBlob);
|
||||
|
||||
//更新自定义字段
|
||||
Map<String, Object> customFields = request.getCustomFields();
|
||||
|
@ -565,7 +555,6 @@ public class FunctionalCaseService {
|
|||
handleTags(request, userId, ids);
|
||||
//自定义字段处理
|
||||
handleCustomFields(request, userId, ids);
|
||||
saveHistory(ids, HistoryLogEnum.EDIT.name(), userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package io.metersphere.system.config.interceptor;
|
||||
|
||||
import io.metersphere.functional.domain.CaseReviewFunctionalCaseArchive;
|
||||
import io.metersphere.functional.domain.FunctionalCaseHistory;
|
||||
import io.metersphere.functional.domain.FunctionalCaseBlob;
|
||||
import io.metersphere.sdk.util.CompressUtils;
|
||||
import io.metersphere.system.utils.MybatisInterceptorConfig;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
@ -16,8 +16,12 @@ public class FunctionalCaseInterceptor {
|
|||
public List<MybatisInterceptorConfig> functionalCaseCompressConfigs() {
|
||||
List<MybatisInterceptorConfig> configList = new ArrayList<>();
|
||||
|
||||
configList.add(new MybatisInterceptorConfig(FunctionalCaseHistory.class, "content", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(CaseReviewFunctionalCaseArchive.class, "content", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(FunctionalCaseBlob.class, "steps", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(FunctionalCaseBlob.class, "textDescription", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(FunctionalCaseBlob.class, "expectedResult", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(FunctionalCaseBlob.class, "prerequisite", CompressUtils.class, "zip", "unzip"));
|
||||
configList.add(new MybatisInterceptorConfig(FunctionalCaseBlob.class, "description", CompressUtils.class, "zip", "unzip"));
|
||||
return configList;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue