测试报告后段
This commit is contained in:
parent
2124226f0f
commit
b87fa51440
|
@ -0,0 +1,47 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class TestCaseReport implements Serializable {
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String planId;
|
||||
|
||||
private String content;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public String getPlanId() {
|
||||
return planId;
|
||||
}
|
||||
|
||||
public void setPlanId(String planId) {
|
||||
this.planId = planId == null ? null : planId.trim();
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content == null ? null : content.trim();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,400 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TestCaseReportExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TestCaseReportExample() {
|
||||
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(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
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 andPlanIdIsNull() {
|
||||
addCriterion("plan_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdIsNotNull() {
|
||||
addCriterion("plan_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdEqualTo(String value) {
|
||||
addCriterion("plan_id =", value, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdNotEqualTo(String value) {
|
||||
addCriterion("plan_id <>", value, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdGreaterThan(String value) {
|
||||
addCriterion("plan_id >", value, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("plan_id >=", value, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdLessThan(String value) {
|
||||
addCriterion("plan_id <", value, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("plan_id <=", value, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdLike(String value) {
|
||||
addCriterion("plan_id like", value, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdNotLike(String value) {
|
||||
addCriterion("plan_id not like", value, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdIn(List<String> values) {
|
||||
addCriterion("plan_id in", values, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdNotIn(List<String> values) {
|
||||
addCriterion("plan_id not in", values, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdBetween(String value1, String value2) {
|
||||
addCriterion("plan_id between", value1, value2, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlanIdNotBetween(String value1, String value2) {
|
||||
addCriterion("plan_id not between", value1, value2, "planId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class TestCaseReportTemplate implements Serializable {
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String workspaceId;
|
||||
|
||||
private String content;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public String getWorkspaceId() {
|
||||
return workspaceId;
|
||||
}
|
||||
|
||||
public void setWorkspaceId(String workspaceId) {
|
||||
this.workspaceId = workspaceId == null ? null : workspaceId.trim();
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content == null ? null : content.trim();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,400 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TestCaseReportTemplateExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TestCaseReportTemplateExample() {
|
||||
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(Long value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(Long value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(Long value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(Long value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<Long> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<Long> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(Long value1, Long value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
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 andWorkspaceIdIsNull() {
|
||||
addCriterion("workspace_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIsNotNull() {
|
||||
addCriterion("workspace_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdEqualTo(String value) {
|
||||
addCriterion("workspace_id =", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotEqualTo(String value) {
|
||||
addCriterion("workspace_id <>", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThan(String value) {
|
||||
addCriterion("workspace_id >", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id >=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThan(String value) {
|
||||
addCriterion("workspace_id <", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("workspace_id <=", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdLike(String value) {
|
||||
addCriterion("workspace_id like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotLike(String value) {
|
||||
addCriterion("workspace_id not like", value, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdIn(List<String> values) {
|
||||
addCriterion("workspace_id in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotIn(List<String> values) {
|
||||
addCriterion("workspace_id not in", values, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andWorkspaceIdNotBetween(String value1, String value2) {
|
||||
addCriterion("workspace_id not between", value1, value2, "workspaceId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReport;
|
||||
import io.metersphere.base.domain.TestCaseReportExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TestCaseReportMapper {
|
||||
long countByExample(TestCaseReportExample example);
|
||||
|
||||
int deleteByExample(TestCaseReportExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(TestCaseReport record);
|
||||
|
||||
int insertSelective(TestCaseReport record);
|
||||
|
||||
List<TestCaseReport> selectByExampleWithBLOBs(TestCaseReportExample example);
|
||||
|
||||
List<TestCaseReport> selectByExample(TestCaseReportExample example);
|
||||
|
||||
TestCaseReport selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TestCaseReport record, @Param("example") TestCaseReportExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") TestCaseReport record, @Param("example") TestCaseReportExample example);
|
||||
|
||||
int updateByExample(@Param("record") TestCaseReport record, @Param("example") TestCaseReportExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TestCaseReport record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TestCaseReport record);
|
||||
|
||||
int updateByPrimaryKey(TestCaseReport record);
|
||||
}
|
|
@ -0,0 +1,234 @@
|
|||
<?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.base.mapper.TestCaseReportMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReport">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="plan_id" jdbcType="VARCHAR" property="planId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseReport">
|
||||
<result column="content" jdbcType="LONGVARCHAR" 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, name, plan_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
content
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReportExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from test_case_report
|
||||
<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.base.domain.TestCaseReportExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from test_case_report
|
||||
<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.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from test_case_report
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from test_case_report
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReportExample">
|
||||
delete from test_case_report
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReport">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into test_case_report (name, plan_id, content
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReport">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into test_case_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="planId != null">
|
||||
plan_id,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="planId != null">
|
||||
#{planId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReportExample" resultType="java.lang.Long">
|
||||
select count(*) from test_case_report
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update test_case_report
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.planId != null">
|
||||
plan_id = #{record.planId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update test_case_report
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
plan_id = #{record.planId,jdbcType=VARCHAR},
|
||||
content = #{record.content,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update test_case_report
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
plan_id = #{record.planId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.TestCaseReport">
|
||||
update test_case_report
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="planId != null">
|
||||
plan_id = #{planId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReport">
|
||||
update test_case_report
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
plan_id = #{planId,jdbcType=VARCHAR},
|
||||
content = #{content,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReport">
|
||||
update test_case_report
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
plan_id = #{planId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,36 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReportTemplate;
|
||||
import io.metersphere.base.domain.TestCaseReportTemplateExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TestCaseReportTemplateMapper {
|
||||
long countByExample(TestCaseReportTemplateExample example);
|
||||
|
||||
int deleteByExample(TestCaseReportTemplateExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(TestCaseReportTemplate record);
|
||||
|
||||
int insertSelective(TestCaseReportTemplate record);
|
||||
|
||||
List<TestCaseReportTemplate> selectByExampleWithBLOBs(TestCaseReportTemplateExample example);
|
||||
|
||||
List<TestCaseReportTemplate> selectByExample(TestCaseReportTemplateExample example);
|
||||
|
||||
TestCaseReportTemplate selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TestCaseReportTemplate record, @Param("example") TestCaseReportTemplateExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") TestCaseReportTemplate record, @Param("example") TestCaseReportTemplateExample example);
|
||||
|
||||
int updateByExample(@Param("record") TestCaseReportTemplate record, @Param("example") TestCaseReportTemplateExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TestCaseReportTemplate record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TestCaseReportTemplate record);
|
||||
|
||||
int updateByPrimaryKey(TestCaseReportTemplate record);
|
||||
}
|
|
@ -0,0 +1,234 @@
|
|||
<?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.base.mapper.TestCaseReportTemplateMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||
<result column="content" jdbcType="LONGVARCHAR" 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, name, workspace_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
content
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReportTemplateExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from test_case_report_template
|
||||
<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.base.domain.TestCaseReportTemplateExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from test_case_report_template
|
||||
<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.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from test_case_report_template
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from test_case_report_template
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReportTemplateExample">
|
||||
delete from test_case_report_template
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into test_case_report_template (name, workspace_id, content
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into test_case_report_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
#{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReportTemplateExample" resultType="java.lang.Long">
|
||||
select count(*) from test_case_report_template
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update test_case_report_template
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.workspaceId != null">
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update test_case_report_template
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||
content = #{record.content,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update test_case_report_template
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||
update test_case_report_template
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="workspaceId != null">
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||
update test_case_report_template
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||
content = #{content,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||
update test_case_report_template
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
workspace_id = #{workspaceId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,42 @@
|
|||
package io.metersphere.controller;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReport;
|
||||
import io.metersphere.service.TestCaseReportService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RequestMapping("/case/report")
|
||||
@RestController
|
||||
public class TestCaseReportController {
|
||||
|
||||
@Resource
|
||||
TestCaseReportService testCaseReportService;
|
||||
|
||||
@PostMapping("/list")
|
||||
public List<TestCaseReport> list(@RequestBody TestCaseReport request) {
|
||||
return testCaseReportService.listTestCaseReport(request);
|
||||
}
|
||||
|
||||
@GetMapping("/get/{id}")
|
||||
public TestCaseReport get(@PathVariable Long id){
|
||||
return testCaseReportService.getTestCaseReport(id);
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
public void add(@RequestBody TestCaseReport TestCaseReport){
|
||||
testCaseReportService.addTestCaseReport(TestCaseReport);
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
public void edit(@RequestBody TestCaseReport TestCaseReport){
|
||||
testCaseReportService.editTestCaseReport(TestCaseReport);
|
||||
}
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
public int delete(@PathVariable Long id){
|
||||
return testCaseReportService.deleteTestCaseReport(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package io.metersphere.controller;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReportTemplate;
|
||||
import io.metersphere.service.TestCaseReportTemplateService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RequestMapping("/case/report/template")
|
||||
@RestController
|
||||
public class TestCaseReportTemplateController {
|
||||
|
||||
@Resource
|
||||
TestCaseReportTemplateService testCaseReportTemplateService;
|
||||
|
||||
@PostMapping("/list")
|
||||
public List<TestCaseReportTemplate> list(@RequestBody TestCaseReportTemplate request) {
|
||||
return testCaseReportTemplateService.listTestCaseReportTemplate(request);
|
||||
}
|
||||
|
||||
@GetMapping("/get/{id}")
|
||||
public TestCaseReportTemplate get(@PathVariable Long id){
|
||||
return testCaseReportTemplateService.getTestCaseReportTemplate(id);
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
public void add(@RequestBody TestCaseReportTemplate testCaseReportTemplate){
|
||||
testCaseReportTemplateService.addTestCaseReportTemplate(testCaseReportTemplate);
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
public void edit(@RequestBody TestCaseReportTemplate testCaseReportTemplate){
|
||||
testCaseReportTemplateService.editTestCaseReportTemplate(testCaseReportTemplate);
|
||||
}
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
public int delete(@PathVariable Long id){
|
||||
return testCaseReportTemplateService.deleteTestCaseReportTemplate(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package io.metersphere.service;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReport;
|
||||
import io.metersphere.base.domain.TestCaseReportExample;
|
||||
import io.metersphere.base.mapper.TestCaseReportMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class TestCaseReportService {
|
||||
|
||||
@Resource
|
||||
TestCaseReportMapper testCaseReportMapper;
|
||||
|
||||
public List<TestCaseReport> listTestCaseReport(TestCaseReport request) {
|
||||
TestCaseReportExample example = new TestCaseReportExample();
|
||||
if ( StringUtils.isNotBlank(request.getName()) ) {
|
||||
example.createCriteria().andNameEqualTo(request.getName());
|
||||
}
|
||||
if ( StringUtils.isNotBlank(request.getPlanId()) ) {
|
||||
example.createCriteria().andPlanIdEqualTo(request.getPlanId());
|
||||
}
|
||||
return testCaseReportMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public TestCaseReport getTestCaseReport(Long id) {
|
||||
return testCaseReportMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public void addTestCaseReport(TestCaseReport TestCaseReport) {
|
||||
testCaseReportMapper.insert(TestCaseReport);
|
||||
}
|
||||
|
||||
public void editTestCaseReport(TestCaseReport TestCaseReport) {
|
||||
testCaseReportMapper.updateByPrimaryKeyWithBLOBs(TestCaseReport);
|
||||
}
|
||||
|
||||
public int deleteTestCaseReport(Long id) {
|
||||
return testCaseReportMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
package io.metersphere.service;
|
||||
|
||||
import io.metersphere.base.domain.TestCaseReportTemplate;
|
||||
import io.metersphere.base.domain.TestCaseReportTemplateExample;
|
||||
import io.metersphere.base.mapper.TestCaseReportMapper;
|
||||
import io.metersphere.base.mapper.TestCaseReportTemplateMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class TestCaseReportTemplateService {
|
||||
|
||||
@Resource
|
||||
TestCaseReportTemplateMapper testCaseReportTemplateMapper;
|
||||
|
||||
public List<TestCaseReportTemplate> listTestCaseReportTemplate(TestCaseReportTemplate request) {
|
||||
TestCaseReportTemplateExample example = new TestCaseReportTemplateExample();
|
||||
if ( StringUtils.isNotBlank(request.getName()) ) {
|
||||
example.createCriteria().andNameEqualTo(request.getName());
|
||||
}
|
||||
if ( StringUtils.isNotBlank(request.getWorkspaceId()) ) {
|
||||
example.createCriteria().andWorkspaceIdEqualTo(request.getWorkspaceId());
|
||||
}
|
||||
return testCaseReportTemplateMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public TestCaseReportTemplate getTestCaseReportTemplate(Long id) {
|
||||
return testCaseReportTemplateMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public void addTestCaseReportTemplate(TestCaseReportTemplate testCaseReportTemplate) {
|
||||
testCaseReportTemplateMapper.insert(testCaseReportTemplate);
|
||||
}
|
||||
|
||||
public void editTestCaseReportTemplate(TestCaseReportTemplate testCaseReportTemplate) {
|
||||
testCaseReportTemplateMapper.updateByPrimaryKeyWithBLOBs(testCaseReportTemplate);
|
||||
}
|
||||
|
||||
public int deleteTestCaseReportTemplate(Long id) {
|
||||
return testCaseReportTemplateMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -341,7 +341,7 @@ CREATE TABLE IF NOT EXISTS `test_case_report_template` (
|
|||
CREATE TABLE IF NOT EXISTS `test_case_report` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(64) NOT NULL COMMENT 'Test case report name',
|
||||
`plan_id` bigint(50) DEFAULT NULL COMMENT 'Plan ID relation to',
|
||||
`plan_id` varchar(50) NOT NULL COMMENT 'Plan ID relation to',
|
||||
`content` longtext COMMENT 'Report content (JSON format)',
|
||||
PRIMARY KEY (`id`)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue