提交 bd42309f 编写于 作者: W wenyann

Merge remote-tracking branch 'origin/master'

package io.metersphere.api.dto.scenario.controller;
import lombok.Data;
@Data
public class IfController {
private String type;
private String id;
private Boolean enable;
private String variable;
private String operator;
private String value;
}
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.annotation.JSONType;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.metersphere.api.dto.scenario.KeyValue;
import io.metersphere.api.dto.scenario.assertions.Assertions;
import io.metersphere.api.dto.scenario.controller.IfController;
import io.metersphere.api.dto.scenario.extract.Extract;
import io.metersphere.api.dto.scenario.processor.BeanShellPostProcessor;
import io.metersphere.api.dto.scenario.processor.BeanShellPreProcessor;
......@@ -13,6 +14,7 @@ import io.metersphere.api.dto.scenario.processor.JSR223PreProcessor;
import io.metersphere.api.dto.scenario.request.dubbo.ConfigCenter;
import io.metersphere.api.dto.scenario.request.dubbo.ConsumerAndService;
import io.metersphere.api.dto.scenario.request.dubbo.RegistryCenter;
import io.metersphere.api.dto.scenario.timer.ConstantTimer;
import lombok.Data;
import java.util.List;
......@@ -59,4 +61,8 @@ public class DubboRequest implements Request {
private JSR223PreProcessor jsr223PreProcessor;
@JSONField(ordinal = 16)
private JSR223PostProcessor jsr223PostProcessor;
@JSONField(ordinal = 17)
private IfController controller;
@JSONField(ordinal = 18)
private ConstantTimer timer;
}
......@@ -5,11 +5,13 @@ import com.alibaba.fastjson.annotation.JSONType;
import io.metersphere.api.dto.scenario.Body;
import io.metersphere.api.dto.scenario.KeyValue;
import io.metersphere.api.dto.scenario.assertions.Assertions;
import io.metersphere.api.dto.scenario.controller.IfController;
import io.metersphere.api.dto.scenario.extract.Extract;
import io.metersphere.api.dto.scenario.processor.BeanShellPostProcessor;
import io.metersphere.api.dto.scenario.processor.BeanShellPreProcessor;
import io.metersphere.api.dto.scenario.processor.JSR223PostProcessor;
import io.metersphere.api.dto.scenario.processor.JSR223PreProcessor;
import io.metersphere.api.dto.scenario.timer.ConstantTimer;
import lombok.Data;
import java.util.List;
......@@ -57,4 +59,8 @@ public class HttpRequest implements Request {
private JSR223PreProcessor jsr223PreProcessor;
@JSONField(ordinal = 18)
private JSR223PostProcessor jsr223PostProcessor;
@JSONField(ordinal = 19)
private IfController controller;
@JSONField(ordinal = 20)
private ConstantTimer timer;
}
package io.metersphere.api.dto.scenario.timer;
import lombok.Data;
@Data
public class ConstantTimer {
private String type;
private String id;
private Boolean enable;
private String delay;
}
package io.metersphere.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class TestCaseComment implements Serializable {
private String id;
private String caseId;
private String author;
private Long createTime;
private Long updateTime;
private String description;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.metersphere.base.domain;
import java.util.ArrayList;
import java.util.List;
public class TestCaseCommentExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TestCaseCommentExample() {
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 andAuthorIsNull() {
addCriterion("author is null");
return (Criteria) this;
}
public Criteria andAuthorIsNotNull() {
addCriterion("author is not null");
return (Criteria) this;
}
public Criteria andAuthorEqualTo(String value) {
addCriterion("author =", value, "author");
return (Criteria) this;
}
public Criteria andAuthorNotEqualTo(String value) {
addCriterion("author <>", value, "author");
return (Criteria) this;
}
public Criteria andAuthorGreaterThan(String value) {
addCriterion("author >", value, "author");
return (Criteria) this;
}
public Criteria andAuthorGreaterThanOrEqualTo(String value) {
addCriterion("author >=", value, "author");
return (Criteria) this;
}
public Criteria andAuthorLessThan(String value) {
addCriterion("author <", value, "author");
return (Criteria) this;
}
public Criteria andAuthorLessThanOrEqualTo(String value) {
addCriterion("author <=", value, "author");
return (Criteria) this;
}
public Criteria andAuthorLike(String value) {
addCriterion("author like", value, "author");
return (Criteria) this;
}
public Criteria andAuthorNotLike(String value) {
addCriterion("author not like", value, "author");
return (Criteria) this;
}
public Criteria andAuthorIn(List<String> values) {
addCriterion("author in", values, "author");
return (Criteria) this;
}
public Criteria andAuthorNotIn(List<String> values) {
addCriterion("author not in", values, "author");
return (Criteria) this;
}
public Criteria andAuthorBetween(String value1, String value2) {
addCriterion("author between", value1, value2, "author");
return (Criteria) this;
}
public Criteria andAuthorNotBetween(String value1, String value2) {
addCriterion("author not between", value1, value2, "author");
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 Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Long value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Long value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Long value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Long value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Long value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Long> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Long> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Long value1, Long value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Long value1, Long value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
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);
}
}
}
\ No newline at end of file
package io.metersphere.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class TestCaseReview implements Serializable {
private String id;
private String name;
private String creator;
private String status;
private Long createTime;
private Long updateTime;
private Long endTime;
private String description;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.metersphere.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class TestCaseReviewProject implements Serializable {
private String reviewId;
private String projectId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.metersphere.base.domain;
import java.util.ArrayList;
import java.util.List;
public class TestCaseReviewProjectExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TestCaseReviewProjectExample() {
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 andReviewIdIsNull() {
addCriterion("review_id is null");
return (Criteria) this;
}
public Criteria andReviewIdIsNotNull() {
addCriterion("review_id is not null");
return (Criteria) this;
}
public Criteria andReviewIdEqualTo(String value) {
addCriterion("review_id =", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotEqualTo(String value) {
addCriterion("review_id <>", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdGreaterThan(String value) {
addCriterion("review_id >", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdGreaterThanOrEqualTo(String value) {
addCriterion("review_id >=", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdLessThan(String value) {
addCriterion("review_id <", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdLessThanOrEqualTo(String value) {
addCriterion("review_id <=", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdLike(String value) {
addCriterion("review_id like", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotLike(String value) {
addCriterion("review_id not like", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdIn(List<String> values) {
addCriterion("review_id in", values, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotIn(List<String> values) {
addCriterion("review_id not in", values, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdBetween(String value1, String value2) {
addCriterion("review_id between", value1, value2, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotBetween(String value1, String value2) {
addCriterion("review_id not between", value1, value2, "reviewId");
return (Criteria) this;
}
public Criteria andProjectIdIsNull() {
addCriterion("project_id is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("project_id is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(String value) {
addCriterion("project_id =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(String value) {
addCriterion("project_id <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(String value) {
addCriterion("project_id >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
addCriterion("project_id >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(String value) {
addCriterion("project_id <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(String value) {
addCriterion("project_id <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLike(String value) {
addCriterion("project_id like", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotLike(String value) {
addCriterion("project_id not like", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<String> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<String> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(String value1, String value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(String value1, String value2) {
addCriterion("project_id not between", value1, value2, "projectId");
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);
}
}
}
\ No newline at end of file
package io.metersphere.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class TestCaseReviewTestCase implements Serializable {
private String id;
private String reviewId;
private String caseId;
private String status;
private String result;
private String reviewer;
private Long createTime;
private Long updateTime;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.metersphere.base.domain;
import java.io.Serializable;
import lombok.Data;
@Data
public class TestCaseReviewUsers implements Serializable {
private String reviewId;
private String userId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package io.metersphere.base.domain;
import java.util.ArrayList;
import java.util.List;
public class TestCaseReviewUsersExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TestCaseReviewUsersExample() {
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 andReviewIdIsNull() {
addCriterion("review_id is null");
return (Criteria) this;
}
public Criteria andReviewIdIsNotNull() {
addCriterion("review_id is not null");
return (Criteria) this;
}
public Criteria andReviewIdEqualTo(String value) {
addCriterion("review_id =", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotEqualTo(String value) {
addCriterion("review_id <>", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdGreaterThan(String value) {
addCriterion("review_id >", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdGreaterThanOrEqualTo(String value) {
addCriterion("review_id >=", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdLessThan(String value) {
addCriterion("review_id <", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdLessThanOrEqualTo(String value) {
addCriterion("review_id <=", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdLike(String value) {
addCriterion("review_id like", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotLike(String value) {
addCriterion("review_id not like", value, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdIn(List<String> values) {
addCriterion("review_id in", values, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotIn(List<String> values) {
addCriterion("review_id not in", values, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdBetween(String value1, String value2) {
addCriterion("review_id between", value1, value2, "reviewId");
return (Criteria) this;
}
public Criteria andReviewIdNotBetween(String value1, String value2) {
addCriterion("review_id not between", value1, value2, "reviewId");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(String value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(String value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(String value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(String value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(String value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(String value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLike(String value) {
addCriterion("user_id like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotLike(String value) {
addCriterion("user_id not like", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<String> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<String> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(String value1, String value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(String value1, String value2) {
addCriterion("user_id not between", value1, value2, "userId");
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);
}
}
}
\ No newline at end of file
package io.metersphere.base.mapper;
import io.metersphere.base.domain.TestCaseComment;
import io.metersphere.base.domain.TestCaseCommentExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TestCaseCommentMapper {
long countByExample(TestCaseCommentExample example);
int deleteByExample(TestCaseCommentExample example);
int deleteByPrimaryKey(String id);
int insert(TestCaseComment record);
int insertSelective(TestCaseComment record);
List<TestCaseComment> selectByExampleWithBLOBs(TestCaseCommentExample example);
List<TestCaseComment> selectByExample(TestCaseCommentExample example);
TestCaseComment selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") TestCaseComment record, @Param("example") TestCaseCommentExample example);
int updateByExampleWithBLOBs(@Param("record") TestCaseComment record, @Param("example") TestCaseCommentExample example);
int updateByExample(@Param("record") TestCaseComment record, @Param("example") TestCaseCommentExample example);
int updateByPrimaryKeySelective(TestCaseComment record);
int updateByPrimaryKeyWithBLOBs(TestCaseComment record);
int updateByPrimaryKey(TestCaseComment record);
}
\ No newline at end of file
<?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.TestCaseCommentMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseComment">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
<result column="author" jdbcType="VARCHAR" property="author" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseComment">
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, case_id, author, create_time, update_time
</sql>
<sql id="Blob_Column_List">
description
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseCommentExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from test_case_comment
<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.TestCaseCommentExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from test_case_comment
<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 test_case_comment
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from test_case_comment
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseCommentExample">
delete from test_case_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseComment">
insert into test_case_comment (id, case_id, author,
create_time, update_time, description
)
values (#{id,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseComment">
insert into test_case_comment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="caseId != null">
case_id,
</if>
<if test="author != null">
author,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="description != null">
description,
</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="author != null">
#{author,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseCommentExample" resultType="java.lang.Long">
select count(*) from test_case_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_case_comment
<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.author != null">
author = #{record.author,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
<if test="record.description != null">
description = #{record.description,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_comment
set id = #{record.id,jdbcType=VARCHAR},
case_id = #{record.caseId,jdbcType=VARCHAR},
author = #{record.author,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
description = #{record.description,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update test_case_comment
set id = #{record.id,jdbcType=VARCHAR},
case_id = #{record.caseId,jdbcType=VARCHAR},
author = #{record.author,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.TestCaseComment">
update test_case_comment
<set>
<if test="caseId != null">
case_id = #{caseId,jdbcType=VARCHAR},
</if>
<if test="author != null">
author = #{author,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseComment">
update test_case_comment
set case_id = #{caseId,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseComment">
update test_case_comment
set case_id = #{caseId,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
package io.metersphere.base.mapper;
import io.metersphere.base.domain.TestCaseReview;
import io.metersphere.base.domain.TestCaseReviewExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TestCaseReviewMapper {
long countByExample(TestCaseReviewExample example);
int deleteByExample(TestCaseReviewExample example);
int deleteByPrimaryKey(String id);
int insert(TestCaseReview record);
int insertSelective(TestCaseReview record);
List<TestCaseReview> selectByExampleWithBLOBs(TestCaseReviewExample example);
List<TestCaseReview> selectByExample(TestCaseReviewExample example);
TestCaseReview selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") TestCaseReview record, @Param("example") TestCaseReviewExample example);
int updateByExampleWithBLOBs(@Param("record") TestCaseReview record, @Param("example") TestCaseReviewExample example);
int updateByExample(@Param("record") TestCaseReview record, @Param("example") TestCaseReviewExample example);
int updateByPrimaryKeySelective(TestCaseReview record);
int updateByPrimaryKeyWithBLOBs(TestCaseReview record);
int updateByPrimaryKey(TestCaseReview record);
}
\ No newline at end of file
<?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.TestCaseReviewMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReview">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="creator" jdbcType="VARCHAR" property="creator" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
<result column="end_time" jdbcType="BIGINT" property="endTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseReview">
<result column="description" jdbcType="LONGVARCHAR" property="description" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, `name`, creator, `status`, create_time, update_time, end_time
</sql>
<sql id="Blob_Column_List">
description
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReviewExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from test_case_review
<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.TestCaseReviewExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from test_case_review
<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 test_case_review
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from test_case_review
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReviewExample">
delete from test_case_review
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReview">
insert into test_case_review (id, `name`, creator,
`status`, create_time, update_time,
end_time, description)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{endTime,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReview">
insert into test_case_review
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
`name`,
</if>
<if test="creator != null">
creator,
</if>
<if test="status != null">
`status`,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="creator != null">
#{creator,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
<if test="endTime != null">
#{endTime,jdbcType=BIGINT},
</if>
<if test="description != null">
#{description,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReviewExample" resultType="java.lang.Long">
select count(*) from test_case_review
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_case_review
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
<if test="record.endTime != null">
end_time = #{record.endTime,jdbcType=BIGINT},
</if>
<if test="record.description != null">
description = #{record.description,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_review
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
creator = #{record.creator,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
end_time = #{record.endTime,jdbcType=BIGINT},
description = #{record.description,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update test_case_review
set id = #{record.id,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
creator = #{record.creator,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT},
end_time = #{record.endTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.TestCaseReview">
update test_case_review
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=BIGINT},
</if>
<if test="description != null">
description = #{description,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReview">
update test_case_review
set `name` = #{name,jdbcType=VARCHAR},
creator = #{creator,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
end_time = #{endTime,jdbcType=BIGINT},
description = #{description,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReview">
update test_case_review
set `name` = #{name,jdbcType=VARCHAR},
creator = #{creator,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT},
end_time = #{endTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
package io.metersphere.base.mapper;
import io.metersphere.base.domain.TestCaseReviewProject;
import io.metersphere.base.domain.TestCaseReviewProjectExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TestCaseReviewProjectMapper {
long countByExample(TestCaseReviewProjectExample example);
int deleteByExample(TestCaseReviewProjectExample example);
int insert(TestCaseReviewProject record);
int insertSelective(TestCaseReviewProject record);
List<TestCaseReviewProject> selectByExample(TestCaseReviewProjectExample example);
int updateByExampleSelective(@Param("record") TestCaseReviewProject record, @Param("example") TestCaseReviewProjectExample example);
int updateByExample(@Param("record") TestCaseReviewProject record, @Param("example") TestCaseReviewProjectExample example);
}
\ No newline at end of file
<?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.TestCaseReviewProjectMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReviewProject">
<result column="review_id" jdbcType="VARCHAR" property="reviewId" />
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
</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">
review_id, project_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseReviewProjectExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from test_case_review_project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReviewProjectExample">
delete from test_case_review_project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReviewProject">
insert into test_case_review_project (review_id, project_id)
values (#{reviewId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReviewProject">
insert into test_case_review_project
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="reviewId != null">
review_id,
</if>
<if test="projectId != null">
project_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="reviewId != null">
#{reviewId,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReviewProjectExample" resultType="java.lang.Long">
select count(*) from test_case_review_project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_case_review_project
<set>
<if test="record.reviewId != null">
review_id = #{record.reviewId,jdbcType=VARCHAR},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update test_case_review_project
set review_id = #{record.reviewId,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>
\ No newline at end of file
package io.metersphere.base.mapper;
import io.metersphere.base.domain.TestCaseReviewTestCase;
import io.metersphere.base.domain.TestCaseReviewTestCaseExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TestCaseReviewTestCaseMapper {
long countByExample(TestCaseReviewTestCaseExample example);
int deleteByExample(TestCaseReviewTestCaseExample example);
int deleteByPrimaryKey(String id);
int insert(TestCaseReviewTestCase record);
int insertSelective(TestCaseReviewTestCase record);
List<TestCaseReviewTestCase> selectByExample(TestCaseReviewTestCaseExample example);
TestCaseReviewTestCase selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") TestCaseReviewTestCase record, @Param("example") TestCaseReviewTestCaseExample example);
int updateByExample(@Param("record") TestCaseReviewTestCase record, @Param("example") TestCaseReviewTestCaseExample example);
int updateByPrimaryKeySelective(TestCaseReviewTestCase record);
int updateByPrimaryKey(TestCaseReviewTestCase record);
}
\ No newline at end of file
<?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.TestCaseReviewTestCaseMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReviewTestCase">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="review_id" jdbcType="VARCHAR" property="reviewId" />
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="result" jdbcType="VARCHAR" property="result" />
<result column="reviewer" jdbcType="VARCHAR" property="reviewer" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
</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, review_id, case_id, `status`, `result`, reviewer, create_time, update_time
</sql>
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseReviewTestCaseExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from test_case_review_test_case
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from test_case_review_test_case
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from test_case_review_test_case
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReviewTestCaseExample">
delete from test_case_review_test_case
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReviewTestCase">
insert into test_case_review_test_case (id, review_id, case_id,
`status`, `result`, reviewer,
create_time, update_time)
values (#{id,jdbcType=VARCHAR}, #{reviewId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{reviewer,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReviewTestCase">
insert into test_case_review_test_case
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="reviewId != null">
review_id,
</if>
<if test="caseId != null">
case_id,
</if>
<if test="status != null">
`status`,
</if>
<if test="result != null">
`result`,
</if>
<if test="reviewer != null">
reviewer,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="reviewId != null">
#{reviewId,jdbcType=VARCHAR},
</if>
<if test="caseId != null">
#{caseId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="result != null">
#{result,jdbcType=VARCHAR},
</if>
<if test="reviewer != null">
#{reviewer,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReviewTestCaseExample" resultType="java.lang.Long">
select count(*) from test_case_review_test_case
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_case_review_test_case
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.reviewId != null">
review_id = #{record.reviewId,jdbcType=VARCHAR},
</if>
<if test="record.caseId != null">
case_id = #{record.caseId,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
`status` = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.result != null">
`result` = #{record.result,jdbcType=VARCHAR},
</if>
<if test="record.reviewer != null">
reviewer = #{record.reviewer,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update test_case_review_test_case
set id = #{record.id,jdbcType=VARCHAR},
review_id = #{record.reviewId,jdbcType=VARCHAR},
case_id = #{record.caseId,jdbcType=VARCHAR},
`status` = #{record.status,jdbcType=VARCHAR},
`result` = #{record.result,jdbcType=VARCHAR},
reviewer = #{record.reviewer,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT},
update_time = #{record.updateTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.TestCaseReviewTestCase">
update test_case_review_test_case
<set>
<if test="reviewId != null">
review_id = #{reviewId,jdbcType=VARCHAR},
</if>
<if test="caseId != null">
case_id = #{caseId,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="result != null">
`result` = #{result,jdbcType=VARCHAR},
</if>
<if test="reviewer != null">
reviewer = #{reviewer,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReviewTestCase">
update test_case_review_test_case
set review_id = #{reviewId,jdbcType=VARCHAR},
case_id = #{caseId,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
`result` = #{result,jdbcType=VARCHAR},
reviewer = #{reviewer,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
package io.metersphere.base.mapper;
import io.metersphere.base.domain.TestCaseReviewUsers;
import io.metersphere.base.domain.TestCaseReviewUsersExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TestCaseReviewUsersMapper {
long countByExample(TestCaseReviewUsersExample example);
int deleteByExample(TestCaseReviewUsersExample example);
int insert(TestCaseReviewUsers record);
int insertSelective(TestCaseReviewUsers record);
List<TestCaseReviewUsers> selectByExample(TestCaseReviewUsersExample example);
int updateByExampleSelective(@Param("record") TestCaseReviewUsers record, @Param("example") TestCaseReviewUsersExample example);
int updateByExample(@Param("record") TestCaseReviewUsers record, @Param("example") TestCaseReviewUsersExample example);
}
\ No newline at end of file
<?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.TestCaseReviewUsersMapper">
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReviewUsers">
<result column="review_id" jdbcType="VARCHAR" property="reviewId" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
</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">
review_id, user_id
</sql>
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseReviewUsersExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from test_case_review_users
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReviewUsersExample">
delete from test_case_review_users
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReviewUsers">
insert into test_case_review_users (review_id, user_id)
values (#{reviewId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReviewUsers">
insert into test_case_review_users
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="reviewId != null">
review_id,
</if>
<if test="userId != null">
user_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="reviewId != null">
#{reviewId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReviewUsersExample" resultType="java.lang.Long">
select count(*) from test_case_review_users
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update test_case_review_users
<set>
<if test="record.reviewId != null">
review_id = #{record.reviewId,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update test_case_review_users
set review_id = #{record.reviewId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>
\ No newline at end of file
package io.metersphere.base.mapper.ext;
import io.metersphere.track.dto.TestCaseReviewDTO;
import io.metersphere.track.request.testreview.QueryCaseReviewRequest;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ExtTestCaseReviewMapper {
List<TestCaseReviewDTO> list(@Param("request") QueryCaseReviewRequest params);
List<TestCaseReviewDTO> listByWorkspaceId(@Param("workspaceId") String workspaceId);
}
<?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.ext.ExtTestCaseReviewMapper">
<select id="list" resultType="io.metersphere.track.dto.TestCaseReviewDTO" parameterType="io.metersphere.track.request.testcase.QueryTestPlanRequest">
select test_case_review.* from test_case_review
<where>
<if test="request.name != null">
and test_case_review.name like CONCAT('%', #{request.name},'%')
</if>
<if test="request.id != null">
AND test_case_review.id = #{request.id}
</if>
</where>
<if test="request.orders != null and request.orders.size() > 0">
order by
<foreach collection="request.orders" separator="," item="order">
test_case_review.${order.name} ${order.type}
</foreach>
</if>
</select>
<select id="listByWorkspaceId" resultType="io.metersphere.track.dto.TestCaseReviewDTO" parameterType="io.metersphere.track.request.testcase.QueryTestPlanRequest">
select distinct test_case_review.*
from test_case_review, project, test_case_review_project
where test_case_review.id = test_case_review_project.review_id
and test_case_review_project.project_id = project.id
and project.workspace_id = #{workspaceId}
</select>
</mapper>
\ No newline at end of file
......@@ -6,7 +6,7 @@ import java.util.stream.Collectors;
public class TestCaseConstants {
public static final int MAX_NODE_DEPTH = 5;
public static final int MAX_NODE_DEPTH = 8;
public enum Type {
Functional("functional"), Performance("performance"), Aapi("api");
......
package io.metersphere.commons.constants;
public enum TestCaseReviewStatus {
Prepare, Underway, Completed
}
package io.metersphere.track.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import io.metersphere.base.domain.Project;
import io.metersphere.base.domain.TestCaseReview;
import io.metersphere.base.domain.User;
import io.metersphere.commons.constants.RoleConstants;
import io.metersphere.commons.utils.PageUtils;
import io.metersphere.commons.utils.Pager;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.track.dto.TestCaseReviewDTO;
import io.metersphere.track.request.testreview.QueryCaseReviewRequest;
import io.metersphere.track.request.testreview.SaveTestCaseReviewRequest;
import io.metersphere.track.service.TestCaseReviewService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@RequestMapping("/test/case/review")
@RestController
public class TestCaseReviewController {
@Resource
TestCaseReviewService testCaseReviewService;
@PostMapping("/list/{goPage}/{pageSize}")
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
public Pager<List<TestCaseReviewDTO>> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryCaseReviewRequest request) {
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
return PageUtils.setPageInfo(page, testCaseReviewService.listCaseReview(request));
}
@PostMapping("/save")
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
public void saveCaseReview(@RequestBody SaveTestCaseReviewRequest reviewRequest) {
testCaseReviewService.saveTestCaseReview(reviewRequest);
}
@PostMapping("/project")
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
public List<Project> getProjectByReviewId(@RequestBody TestCaseReview request) {
return testCaseReviewService.getProjectByReviewId(request);
}
@PostMapping("/reviewer")
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
public List<User> getUserByReviewId(@RequestBody TestCaseReview request) {
return testCaseReviewService.getUserByReviewId(request);
}
@GetMapping("/recent/{count}")
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
public List<TestCaseReviewDTO> recentTestPlans(@PathVariable int count) {
String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId();
PageHelper.startPage(1, count, true);
return testCaseReviewService.recent(currentWorkspaceId);
}
@PostMapping("/edit")
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
public void editCaseReview(@RequestBody TestCaseReview testCaseReview) {
testCaseReviewService.editCaseReview(testCaseReview);
}
@GetMapping("/delete/{reviewId}")
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
public void deleteCaseReview(@PathVariable String reviewId) {
testCaseReviewService.deleteCaseReview(reviewId);
}
}
package io.metersphere.track.dto;
import io.metersphere.base.domain.TestCaseReview;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class TestCaseReviewDTO extends TestCaseReview {
private String projectName;
private String reviewerName;
}
package io.metersphere.track.request.testreview;
import io.metersphere.base.domain.TestCaseReview;
import io.metersphere.controller.request.OrderRequest;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class QueryCaseReviewRequest extends TestCaseReview {
private List<OrderRequest> orders;
}
package io.metersphere.track.request.testreview;
import io.metersphere.base.domain.TestCaseReview;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
public class SaveTestCaseReviewRequest extends TestCaseReview {
private List<String> projectIds;
private List<String> userIds;
}
package io.metersphere.track.service;
import io.metersphere.base.domain.*;
import io.metersphere.base.mapper.*;
import io.metersphere.base.mapper.ext.ExtTestCaseReviewMapper;
import io.metersphere.commons.constants.TestCaseReviewStatus;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.ServiceUtils;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.track.dto.TestCaseReviewDTO;
import io.metersphere.track.request.testreview.QueryCaseReviewRequest;
import io.metersphere.track.request.testreview.SaveTestCaseReviewRequest;
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;
import java.util.UUID;
import java.util.stream.Collectors;
@Service
@Transactional(rollbackFor = Exception.class)
public class TestCaseReviewService {
@Resource
private TestCaseReviewProjectMapper testCaseReviewProjectMapper;
@Resource
private TestCaseReviewUsersMapper testCaseReviewUsersMapper;
@Resource
private TestCaseReviewMapper testCaseReviewMapper;
@Resource
private ExtTestCaseReviewMapper extTestCaseReviewMapper;
@Resource
private ProjectMapper projectMapper;
@Resource
private UserMapper userMapper;
public void saveTestCaseReview(SaveTestCaseReviewRequest reviewRequest) {
checkCaseReviewExist(reviewRequest);
String reviewId = UUID.randomUUID().toString();
List<String> projectIds = reviewRequest.getProjectIds();
List<String> userIds = reviewRequest.getUserIds();
projectIds.forEach(projectId -> {
TestCaseReviewProject testCaseReviewProject = new TestCaseReviewProject();
testCaseReviewProject.setProjectId(projectId);
testCaseReviewProject.setReviewId(reviewId);
testCaseReviewProjectMapper.insertSelective(testCaseReviewProject);
});
userIds.forEach(userId -> {
TestCaseReviewUsers testCaseReviewUsers = new TestCaseReviewUsers();
testCaseReviewUsers.setReviewId(reviewId);
testCaseReviewUsers.setUserId(userId);
testCaseReviewUsersMapper.insert(testCaseReviewUsers);
});
reviewRequest.setId(reviewId);
reviewRequest.setCreateTime(System.currentTimeMillis());
reviewRequest.setUpdateTime(System.currentTimeMillis());
reviewRequest.setCreator(SessionUtils.getUser().getId());
reviewRequest.setStatus(TestCaseReviewStatus.Prepare.name());
testCaseReviewMapper.insert(reviewRequest);
}
public List<TestCaseReviewDTO> listCaseReview(QueryCaseReviewRequest request) {
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
return extTestCaseReviewMapper.list(request);
}
public List<Project> getProjectByReviewId(TestCaseReview request) {
String reviewId = request.getId();
TestCaseReviewProjectExample testCaseReviewProjectExample = new TestCaseReviewProjectExample();
testCaseReviewProjectExample.createCriteria().andReviewIdEqualTo(reviewId);
List<TestCaseReviewProject> testCaseReviewProject = testCaseReviewProjectMapper.selectByExample(testCaseReviewProjectExample);
List<String> projectIds = testCaseReviewProject
.stream()
.map(TestCaseReviewProject::getProjectId)
.collect(Collectors.toList());
ProjectExample projectExample = new ProjectExample();
projectExample.createCriteria().andIdIn(projectIds);
return projectMapper.selectByExample(projectExample);
}
public List<User> getUserByReviewId(TestCaseReview request) {
String reviewId = request.getId();
TestCaseReviewUsersExample testCaseReviewUsersExample = new TestCaseReviewUsersExample();
testCaseReviewUsersExample.createCriteria().andReviewIdEqualTo(reviewId);
List<TestCaseReviewUsers> testCaseReviewUsers = testCaseReviewUsersMapper.selectByExample(testCaseReviewUsersExample);
List<String> userIds = testCaseReviewUsers
.stream()
.map(TestCaseReviewUsers::getUserId)
.collect(Collectors.toList());
UserExample userExample = new UserExample();
userExample.createCriteria().andIdIn(userIds);
return userMapper.selectByExample(userExample);
}
public List<TestCaseReviewDTO> recent(String currentWorkspaceId) {
return extTestCaseReviewMapper.listByWorkspaceId(currentWorkspaceId);
}
public void editCaseReview(TestCaseReview testCaseReview) {
testCaseReview.setUpdateTime(System.currentTimeMillis());
checkCaseReviewExist(testCaseReview);
testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview);
}
private void checkCaseReviewExist(TestCaseReview testCaseReview) {
if (testCaseReview.getName() != null) {
TestCaseReviewExample example = new TestCaseReviewExample();
TestCaseReviewExample.Criteria criteria = example
.createCriteria()
.andNameEqualTo(testCaseReview.getName());
if (StringUtils.isNotBlank(testCaseReview.getId())) {
criteria.andIdNotEqualTo(testCaseReview.getId());
}
if (testCaseReviewMapper.selectByExample(example).size() > 0) {
MSException.throwException("评审名称已存在");
}
}
}
public void deleteCaseReview(String reviewId) {
deleteCaseReviewProject(reviewId);
deleteCaseReviewUsers(reviewId);
testCaseReviewMapper.deleteByPrimaryKey(reviewId);
}
private void deleteCaseReviewProject(String reviewId) {
TestCaseReviewProjectExample testCaseReviewProjectExample = new TestCaseReviewProjectExample();
testCaseReviewProjectExample.createCriteria().andReviewIdEqualTo(reviewId);
testCaseReviewProjectMapper.deleteByExample(testCaseReviewProjectExample);
}
private void deleteCaseReviewUsers(String reviewId) {
TestCaseReviewUsersExample testCaseReviewUsersExample = new TestCaseReviewUsersExample();
testCaseReviewUsersExample.createCriteria().andReviewIdEqualTo(reviewId);
testCaseReviewUsersMapper.deleteByExample(testCaseReviewUsersExample);
}
}
......@@ -328,13 +328,11 @@ public class TestCaseService {
}
}
public static void download(HttpServletResponse res) throws IOException {
public void download(HttpServletResponse res) throws IOException {
// 发送给客户端的数据
OutputStream outputStream = res.getOutputStream();
byte[] buff = new byte[1024];
// 读取filename
String filePath = ClassLoader.getSystemResource("template/testcase.xmind").getPath();
try (BufferedInputStream bis = new BufferedInputStream(new FileInputStream(new File(filePath)));) {
try (OutputStream outputStream = res.getOutputStream();
BufferedInputStream bis = new BufferedInputStream(this.getClass().getResourceAsStream("/template/testcase.xmind"));) {
int i = bis.read(buff);
while (i != -1) {
outputStream.write(buff, 0, buff.length);
......@@ -343,12 +341,13 @@ public class TestCaseService {
}
} catch (Exception ex) {
LogUtil.error(ex.getMessage());
MSException.throwException("下载思维导图模版失败");
}
}
public void testCaseXmindTemplateExport(HttpServletResponse response) {
try {
response.setContentType("application/vnd.ms-excel");
response.setContentType("application/octet-stream");
response.setCharacterEncoding("utf-8");
response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode("思维导图用例模版", "UTF-8") + ".xmind");
download(response);
......
......@@ -21,6 +21,8 @@ import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 数据转换
......@@ -51,18 +53,40 @@ public class XmindToTestCaseParser {
protected List<TestCaseExcelData> xmindDataList;
// 递归处理案例数据
private void makeXmind(StringBuffer processBuffer, String nodeId, int level, String nodePath, List<Attached> attacheds) {
private void makeXmind(StringBuffer processBuffer, Attached parent, int level, String nodePath, List<Attached> attacheds) {
for (Attached item : attacheds) {
if (!StringUtils.isEmpty(item.getTitle()) && item.getTitle().startsWith("tc")) { // 用例
this.newTestCase(item.getTitle(), nodePath, item.getChildren() != null ? item.getChildren().getAttached() : null);
if (isBlack(item.getTitle(), "(?:tc|tc)")) { // 用例
item.setParent(parent);
this.newTestCase(item.getTitle(), parent.getPath(), item.getChildren() != null ? item.getChildren().getAttached() : null);
} else {
nodePath = nodePath + "/" + item.getTitle();
if (item.getChildren() != null && !item.getChildren().getAttached().isEmpty())
makeXmind(processBuffer, nodeId, level + 1, nodePath, item.getChildren().getAttached());
nodePath = parent.getPath() + "/" + item.getTitle();
item.setPath(nodePath);
if (item.getChildren() != null && !item.getChildren().getAttached().isEmpty()) {
item.setParent(parent);
makeXmind(processBuffer, item, level + 1, nodePath, item.getChildren().getAttached());
}
}
}
}
private boolean isBlack(String str, String regex) {
// regex = "(?:tc:|tc:)"
if (StringUtils.isEmpty(str) || StringUtils.isEmpty(regex))
return false;
Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
Matcher result = pattern.matcher(str);
return result.find();
}
private String replace(String str, String regex) {
if (StringUtils.isEmpty(str) || StringUtils.isEmpty(regex))
return str;
Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
Matcher result = pattern.matcher(str);
str = result.replaceAll("");
return str;
}
// 获取步骤数据
public String getSteps(List<Attached> attacheds) {
JSONArray jsonArray = new JSONArray();
......@@ -95,7 +119,7 @@ public class XmindToTestCaseParser {
return;
}
// 用例名称
testCase.setName(tcArr[1].replace("tc:|tc:", ""));
testCase.setName(this.replace(tcArr[1], "tc:|tc:|tc"));
if (!nodePath.startsWith("/")) {
nodePath = "/" + nodePath;
......@@ -110,7 +134,7 @@ public class XmindToTestCaseParser {
String otArr[] = tcArr[0].split("-");
for (int i = 0; i < otArr.length; i++) {
if (otArr[i].startsWith("P") || otArr[i].startsWith("p")) {
testCase.setPriority(otArr[i]);
testCase.setPriority(otArr[i].toUpperCase());
} else if (otArr[i].endsWith("功能测试")) {
testCase.setType("functional");
} else if (otArr[i].endsWith("性能测试")) {
......@@ -121,20 +145,29 @@ public class XmindToTestCaseParser {
}
}
// 测试步骤处理
List<Attached> steps = new LinkedList<>();
if (attacheds != null && !attacheds.isEmpty()) {
List<Attached> steps = new LinkedList<>();
attacheds.forEach(item -> {
if (item.getTitle().startsWith("pc")) {
testCase.setPrerequisite(item.getTitle().replaceAll("(?:pc:|pc:)", ""));
} else if (item.getTitle().startsWith("rc")) {
testCase.setRemark(item.getTitle().replaceAll("(?:rc:|rc:)", ""));
if (isBlack(item.getTitle(), "(?:pc:|pc:)")) {
testCase.setPrerequisite(replace(item.getTitle(), "(?:pc:|pc:)"));
} else if (isBlack(item.getTitle(), "(?:rc:|rc:)")) {
testCase.setRemark(replace(item.getTitle(), "(?:rc:|rc:)"));
} else {
steps.add(item);
}
});
if (!steps.isEmpty()) {
testCase.setSteps(this.getSteps(steps));
}
}
if (!steps.isEmpty()) {
testCase.setSteps(this.getSteps(steps));
} else {
JSONArray jsonArray = new JSONArray();
// 保持插入顺序,判断用例是否有相同的steps
JSONObject step = new JSONObject(true);
step.put("num", 1);
step.put("desc", "");
step.put("result", "");
jsonArray.add(step);
testCase.setSteps(jsonArray.toJSONString());
}
TestCaseExcelData compartData = new TestCaseExcelData();
BeanUtils.copyBean(compartData, testCase);
......@@ -232,25 +265,27 @@ public class XmindToTestCaseParser {
// 获取思维导图内容
String content = XmindParser.parseJson(file);
if (StringUtils.isEmpty(content) || content.split("(?:tc:|tc:)").length == 1) {
if (StringUtils.isEmpty(content) || content.split("(?:tc:|tc:|TC:|TC:|tc|TC)").length == 1) {
return Translator.get("import_xmind_not_found");
}
if (!StringUtils.isEmpty(content) && content.split("(?:tc:|tc:)").length > 500) {
if (!StringUtils.isEmpty(content) && content.split("(?:tc:|tc:|TC:|TC:|tc|TC)").length > 500) {
return Translator.get("import_xmind_count_error");
}
JsonRootBean root = JSON.parseObject(content, JsonRootBean.class);
if (root != null && root.getRootTopic() != null && root.getRootTopic().getChildren() != null) {
// 判断是模块还是用例
root.getRootTopic().getChildren().getAttached().forEach(item -> {
if (!StringUtils.isEmpty(item.getTitle()) && item.getTitle().startsWith("tc")) { // 用例
this.newTestCase(item.getTitle(), "", item.getChildren() != null ? item.getChildren().getAttached() : null);
for (Attached item : root.getRootTopic().getChildren().getAttached()) {
if (isBlack(item.getTitle(), "(?:tc:|tc:|tc)")) { // 用例
return replace(item.getTitle(), "(?:tc:|tc:|tc)") + ":" + Translator.get("test_case_create_module_fail");
} else {
item.setPath(item.getTitle());
if (item.getChildren() != null && !item.getChildren().getAttached().isEmpty())
makeXmind(processBuffer, null, 1, item.getPath(), item.getChildren().getAttached());
if (item.getChildren() != null && !item.getChildren().getAttached().isEmpty()) {
item.setPath(item.getTitle());
makeXmind(processBuffer, item, 1, item.getPath(), item.getChildren().getAttached());
}
}
});
}
}
if (StringUtils.isEmpty(process.toString()) && !testCaseWithBLOBs.isEmpty()) {
testCaseService.saveImportData(testCaseWithBLOBs, projectId);
......
......@@ -12,6 +12,7 @@ public class Attached {
private String title;
private Notes notes;
private String path;
private Attached parent;
private List<Comments> comments;
private Children children;
......
Subproject commit d5b4969642fd8d10cc2f949d7377e0a0e5217a3a
Subproject commit b72b002a16d72cb3674d4d4dc4e48027693fdf7e
frontend/src/assets/xmind.jpg

81.5 KB | W: | H:

frontend/src/assets/xmind.jpg

89.4 KB | W: | H:

frontend/src/assets/xmind.jpg
frontend/src/assets/xmind.jpg
frontend/src/assets/xmind.jpg
frontend/src/assets/xmind.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -75,7 +75,7 @@ import MsApiScenarioForm from "./ApiScenarioForm";
import {Request, Scenario} from "../model/ScenarioModel";
import draggable from 'vuedraggable';
import MsApiScenarioSelect from "@/business/components/api/test/components/ApiScenarioSelect";
import {compatibleWithEnvironment, Config, parseEnvironment} from "../model/EnvironmentModel";
import {parseEnvironment} from "../model/EnvironmentModel";
export default {
name: "MsApiScenarioConfig",
......
......@@ -38,17 +38,16 @@
},
methods: {
setActiveNames(activeNames) {
setActiveNames(activeNames, item) {
activeNames = [].concat(activeNames);
let value = this.accordion ? activeNames[0] : activeNames;
this.activeNames = activeNames;
this.$emit('input', value);
this.$emit('change', value);
this.$emit('input', item.name);
this.$emit('change', item.name);
},
handleItemClick(item) {
if (this.accordion) {
this.setActiveNames(
(this.activeNames[0] || this.activeNames[0] === 0) && item.name);
(this.activeNames[0] || this.activeNames[0] === 0) && item.name, item);
} else {
let activeNames = this.activeNames.slice(0);
let index = activeNames.indexOf(item.name);
......@@ -58,7 +57,7 @@
} else {
activeNames.push(item.name);
}
this.setActiveNames(activeNames);
this.setActiveNames(activeNames, item);
}
}
},
......
......@@ -9,7 +9,6 @@
>
<div
class="el-collapse-item__header"
@click="handleHeaderClick"
role="button"
:id="`el-collapse-head-${id}`"
:tabindex="disabled ? undefined : 0"
......@@ -21,7 +20,7 @@
@focus="handleFocus"
@blur="focusing = false"
>
<i
<i @click="handleHeaderClick"
class="el-collapse-item__arrow el-icon-arrow-right"
:class="{'is-active': isActive}">
</i>
......
......@@ -194,8 +194,9 @@ export default {
return this.request.method !== "GET";
},
displayUrl() {
return this.request.environment.config.httpConfig.socket ? this.request.environment.config.httpConfig.protocol + '://'
+ this.request.environment.config.httpConfig.socket + (this.request.path ? this.request.path : '') : '';
return (this.request.environment && this.request.environment.config.httpConfig.socket) ?
this.request.environment.config.httpConfig.protocol + '://' + this.request.environment.config.httpConfig.socket + (this.request.path ? this.request.path : '')
: '';
}
}
}
......
......@@ -4,6 +4,7 @@
:disabled="isReference">
<div class="request-item" v-for="(request, index) in this.scenario.requests" :key="index" @click="select(request)"
:class="{'selected': isSelected(request), 'disable-request': !request.enable || !scenario.enable}">
<ms-condition-label :request="request"/>
<el-row type="flex" align="middle">
<div class="request-type">
{{ request.showType() }}
......@@ -32,6 +33,12 @@
:command="{type: 'enable', index: index}">
{{ $t('api_test.scenario.enable') }}
</el-dropdown-item>
<el-dropdown-item :disabled="isReadOnly" :command="{type: 'controller', index: index}">
{{ $t('api_test.request.condition') }}
</el-dropdown-item>
<el-dropdown-item :disabled="isReadOnly" :command="{type: 'wait', index: index}">
{{ $t('api_test.request.wait') }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
......@@ -47,18 +54,22 @@
<el-button slot="reference" :disabled="isReadOnly"
class="request-create" type="primary" size="mini" icon="el-icon-plus" plain/>
</el-popover>
<ms-if-controller ref="controller"/>
<ms-constant-timer ref="timer"/>
</div>
</template>
<script>
import {RequestFactory} from "../../model/ScenarioModel";
import draggable from 'vuedraggable';
import MsIfController from "@/business/components/api/test/components/request/condition/IfController";
import MsConstantTimer from "@/business/components/api/test/components/request/condition/ConstantTimer";
import MsConditionLabel from "@/business/components/api/test/components/request/condition/ConditionLabel";
export default {
name: "MsApiRequestConfig",
components: {draggable},
components: {MsConditionLabel, MsConstantTimer, MsIfController, draggable},
props: {
scenario: Object,
......@@ -89,7 +100,7 @@ export default {
},
methods: {
createRequest: function (type) {
createRequest(type) {
let request = new RequestFactory({type: type});
if (this.scenario.environmentId) {
request.useEnvironment = true;
......@@ -98,23 +109,31 @@ export default {
this.type = "";
this.visible = false;
},
copyRequest: function (index) {
copyRequest(index) {
let request = this.scenario.requests[index];
this.scenario.requests.push(new RequestFactory(request));
},
disableRequest: function (index) {
disableRequest(index) {
this.scenario.requests[index].enable = false;
},
enableRequest: function (index) {
enableRequest(index) {
this.scenario.requests[index].enable = true;
},
deleteRequest: function (index) {
deleteRequest(index) {
this.scenario.requests.splice(index, 1);
if (this.scenario.requests.length === 0) {
this.createRequest();
}
},
handleCommand: function (command) {
addController(index) {
let request = this.scenario.requests[index];
this.$refs.controller.open(request);
},
addTimer(index) {
let request = this.scenario.requests[index];
this.$refs.timer.open(request);
},
handleCommand(command) {
switch (command.type) {
case "copy":
this.copyRequest(command.index);
......@@ -128,9 +147,15 @@ export default {
case "enable":
this.enableRequest(command.index);
break;
case "controller":
this.addController(command.index);
break;
case "wait":
this.addTimer(command.index);
break;
}
},
select: function (request) {
select(request) {
request.environment = this.scenario.environment;
if (!request.useEnvironment) {
request.useEnvironment = false;
......@@ -150,7 +175,6 @@ export default {
<style scoped>
.request-item {
border-left: 5px solid #1E90FF;
max-height: 40px;
border-top: 1px solid #EBEEF5;
cursor: pointer;
}
......
<template>
<div>
<div>
<el-button size="mini" @click="openController"
class="condition"
:class="controllerClass"
v-if="request.controller.isValid()">
<el-row type="flex" align="middle">
<font-awesome-icon :icon="['fas', 'random']"/>
<div class="condition-label">{{ request.controller.label() }}</div>
</el-row>
</el-button>
</div>
<div>
<el-button size="mini" @click="openTimer"
class="condition"
:class="timerClass"
v-if="request.timer.isValid()">
<el-row type="flex" align="middle">
<font-awesome-icon :icon="['fas', 'clock']"/>
<div class="condition-label">{{ request.timer.label() }}</div>
</el-row>
</el-button>
</div>
<ms-if-controller ref="controller"/>
<ms-constant-timer ref="timer"/>
</div>
</template>
<script>
import {Request} from "@/business/components/api/test/model/ScenarioModel";
import MsIfController from "@/business/components/api/test/components/request/condition/IfController";
import MsConstantTimer from "@/business/components/api/test/components/request/condition/ConstantTimer";
export default {
name: "MsConditionLabel",
components: {MsConstantTimer, MsIfController},
props: {
request: Request
},
methods: {
openController() {
this.$refs.controller.open(this.request);
},
openTimer() {
this.$refs.timer.open(this.request);
}
},
computed: {
controllerClass() {
let disabled = this.request.controller.enable === false;
return {'is-disabled': disabled, 'click-cursor': disabled}
},
timerClass() {
let disabled = this.request.timer.enable === false;
return {'is-disabled': disabled, 'click-cursor': disabled}
},
}
}
</script>
<style scoped>
.condition {
width: 100%;
}
.condition-label {
padding-left: 5px;
}
.click-cursor {
cursor: pointer !important;
}
</style>
<template>
<el-dialog :visible.sync="visible" width="600px" @close="close">
<el-row :gutter="10" type="flex" align="middle">
<el-col :span="2">{{ $t('api_test.request.wait') }}</el-col>
<el-col :span="10">
<el-input-number class="width-100" size="small" v-model="timer.delay" :min="0" :step="1000"/>
</el-col>
<el-col :span="2">ms</el-col>
<el-col :span="8">
<el-switch v-model="timer.enable" :inactive-text="$t('api_test.scenario.enable_disable')"/>
</el-col>
<el-col :span="2">
<el-button size="mini" type="danger" icon="el-icon-delete" circle @click="remove"/>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import {ConstantTimer} from "@/business/components/api/test/model/ScenarioModel";
export default {
name: "MsConstantTimer",
data() {
return {
request: {},
timer: new ConstantTimer(),
visible: false,
}
},
methods: {
open(request) {
this.request = request;
this.timer = new ConstantTimer(request.timer);
this.visible = true;
},
close() {
this.request.timer = this.timer
this.visible = false;
},
remove() {
this.timer = new ConstantTimer();
this.visible = false;
}
}
}
</script>
<style scoped>
.width-100 {
width: 100%
}
</style>
<template>
<el-dialog :visible.sync="visible" width="800px" @close="close">
<el-row :gutter="10" type="flex" align="middle">
<el-col :span="1">If</el-col>
<el-col :span="6">
<el-input size="small" v-model="controller.variable" :placeholder="$t('api_test.request.condition_variable')"/>
</el-col>
<el-col :span="5">
<el-select v-model="controller.operator" :placeholder="$t('commons.please_select')" size="small">
<el-option v-for="o in operators" :key="o.value" :label="$t(o.label)" :value="o.value"/>
</el-select>
</el-col>
<el-col :span="6">
<el-input size="small" v-model="controller.value" :placeholder="$t('api_test.value')"/>
</el-col>
<el-col :span="4">
<el-switch v-model="controller.enable" :inactive-text="$t('api_test.scenario.enable_disable')"/>
</el-col>
<el-col :span="2">
<el-button size="mini" type="danger" icon="el-icon-delete" circle @click="remove"/>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
import {IfController} from "@/business/components/api/test/model/ScenarioModel";
export default {
name: "MsIfController",
data() {
return {
request: {},
controller: new IfController(),
visible: false,
operators: {
EQ: {
label: "commons.adv_search.operators.equals",
value: "=="
},
NE: {
label: "commons.adv_search.operators.not_equals",
value: "!="
},
LIKE: {
label: "commons.adv_search.operators.like",
value: "=~"
},
NOT_LIKE: {
label: "commons.adv_search.operators.not_like",
value: "!~"
},
GT: {
label: "commons.adv_search.operators.gt",
value: ">"
},
LT: {
label: "commons.adv_search.operators.lt",
value: "<"
}
}
}
},
methods: {
open(request) {
this.request = request;
this.controller = new IfController(request.controller);
if (!this.controller.operator) {
this.controller.operator = this.operators.EQ.value;
}
this.visible = true;
},
close() {
this.request.controller = this.controller
this.visible = false;
},
remove() {
this.controller = new IfController();
this.visible = false;
}
}
}
</script>
<style scoped>
</style>
......@@ -2,6 +2,7 @@
<el-tooltip :content="tip"
placement="bottom"
:enterable="false"
:effect="effect">
<el-button @click="exec()"
@click.stop="clickStop"
......
......@@ -107,7 +107,8 @@ export const STATUS = {
options: [
{label: "Saved", value: "Saved"}, {label: "Starting", value: "Starting"},
{label: "Running", value: "Running"}, {label: "Reporting", value: "Reporting"},
{label: "Completed", value: "Completed"}, {label: "Error", value: "Error"}
{label: "Completed", value: "Completed"}, {label: "Error", value: "Error"},
{label: "Success", value: "Success"}
],
props: { // 尾部控件的props,一般为element ui控件的props
multiple: true
......
......@@ -176,6 +176,12 @@
icon="el-icon-plus"
circle size="mini"
@click="handleAddStep(scope.$index, scope.row)"></el-button>
<el-button
icon="el-icon-document-copy"
type="success"
:disabled="readOnly"
circle size="mini"
@click="handleCopyStep(scope.$index, scope.row)"></el-button>
<el-button
type="danger"
icon="el-icon-delete"
......@@ -361,6 +367,18 @@ export default {
});
this.form.steps.splice(index + 1, 0, step);
},
handleCopyStep(index, data) {
let step = {};
step.num = data.num + 1;
step.desc = data.desc;
step.result = data.result;
this.form.steps.forEach(step => {
if (step.num > data.num) {
step.num++;
}
});
this.form.steps.splice(index + 1, 0, step);
},
handleDeleteStep(index, data) {
this.form.steps.splice(index, 1);
this.form.steps.forEach(step => {
......
Subproject commit f2d5a342c82e629f510550d5778d752bb73bf5e7
Subproject commit 2d5807501b026efc48c309daab988ee0719356d4
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册