uuid
This commit is contained in:
parent
d0ebd18be5
commit
c5fb011819
|
@ -1,14 +1,13 @@
|
||||||
package io.metersphere.base.domain;
|
package io.metersphere.base.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class TestCase implements Serializable {
|
public class TestCase implements Serializable {
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
private Integer nodeId;
|
private String nodeId;
|
||||||
|
|
||||||
private String nodePath;
|
private String nodePath;
|
||||||
|
|
||||||
|
|
|
@ -184,52 +184,62 @@ public class TestCaseExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdEqualTo(Integer value) {
|
public Criteria andNodeIdEqualTo(String value) {
|
||||||
addCriterion("node_id =", value, "nodeId");
|
addCriterion("node_id =", value, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdNotEqualTo(Integer value) {
|
public Criteria andNodeIdNotEqualTo(String value) {
|
||||||
addCriterion("node_id <>", value, "nodeId");
|
addCriterion("node_id <>", value, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdGreaterThan(Integer value) {
|
public Criteria andNodeIdGreaterThan(String value) {
|
||||||
addCriterion("node_id >", value, "nodeId");
|
addCriterion("node_id >", value, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdGreaterThanOrEqualTo(Integer value) {
|
public Criteria andNodeIdGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("node_id >=", value, "nodeId");
|
addCriterion("node_id >=", value, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdLessThan(Integer value) {
|
public Criteria andNodeIdLessThan(String value) {
|
||||||
addCriterion("node_id <", value, "nodeId");
|
addCriterion("node_id <", value, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdLessThanOrEqualTo(Integer value) {
|
public Criteria andNodeIdLessThanOrEqualTo(String value) {
|
||||||
addCriterion("node_id <=", value, "nodeId");
|
addCriterion("node_id <=", value, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdIn(List<Integer> values) {
|
public Criteria andNodeIdLike(String value) {
|
||||||
|
addCriterion("node_id like", value, "nodeId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNodeIdNotLike(String value) {
|
||||||
|
addCriterion("node_id not like", value, "nodeId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNodeIdIn(List<String> values) {
|
||||||
addCriterion("node_id in", values, "nodeId");
|
addCriterion("node_id in", values, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdNotIn(List<Integer> values) {
|
public Criteria andNodeIdNotIn(List<String> values) {
|
||||||
addCriterion("node_id not in", values, "nodeId");
|
addCriterion("node_id not in", values, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdBetween(Integer value1, Integer value2) {
|
public Criteria andNodeIdBetween(String value1, String value2) {
|
||||||
addCriterion("node_id between", value1, value2, "nodeId");
|
addCriterion("node_id between", value1, value2, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andNodeIdNotBetween(Integer value1, Integer value2) {
|
public Criteria andNodeIdNotBetween(String value1, String value2) {
|
||||||
addCriterion("node_id not between", value1, value2, "nodeId");
|
addCriterion("node_id not between", value1, value2, "nodeId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
package io.metersphere.base.domain;
|
package io.metersphere.base.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class TestCaseNode implements Serializable {
|
public class TestCaseNode implements Serializable {
|
||||||
private Integer id;
|
private String id;
|
||||||
|
|
||||||
private String projectId;
|
private String projectId;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private Integer pId;
|
private String parentId;
|
||||||
|
|
||||||
private Integer level;
|
private Integer level;
|
||||||
|
|
||||||
|
|
|
@ -114,52 +114,62 @@ public class TestCaseNodeExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdEqualTo(Integer value) {
|
public Criteria andIdEqualTo(String value) {
|
||||||
addCriterion("id =", value, "id");
|
addCriterion("id =", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotEqualTo(Integer value) {
|
public Criteria andIdNotEqualTo(String value) {
|
||||||
addCriterion("id <>", value, "id");
|
addCriterion("id <>", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThan(Integer value) {
|
public Criteria andIdGreaterThan(String value) {
|
||||||
addCriterion("id >", value, "id");
|
addCriterion("id >", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("id >=", value, "id");
|
addCriterion("id >=", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThan(Integer value) {
|
public Criteria andIdLessThan(String value) {
|
||||||
addCriterion("id <", value, "id");
|
addCriterion("id <", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||||
addCriterion("id <=", value, "id");
|
addCriterion("id <=", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdIn(List<Integer> values) {
|
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");
|
addCriterion("id in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotIn(List<Integer> values) {
|
public Criteria andIdNotIn(List<String> values) {
|
||||||
addCriterion("id not in", values, "id");
|
addCriterion("id not in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
public Criteria andIdBetween(String value1, String value2) {
|
||||||
addCriterion("id between", value1, value2, "id");
|
addCriterion("id between", value1, value2, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
public Criteria andIdNotBetween(String value1, String value2) {
|
||||||
addCriterion("id not between", value1, value2, "id");
|
addCriterion("id not between", value1, value2, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
@ -304,63 +314,73 @@ public class TestCaseNodeExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdIsNull() {
|
public Criteria andParentIdIsNull() {
|
||||||
addCriterion("p_id is null");
|
addCriterion("parent_id is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdIsNotNull() {
|
public Criteria andParentIdIsNotNull() {
|
||||||
addCriterion("p_id is not null");
|
addCriterion("parent_id is not null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdEqualTo(Integer value) {
|
public Criteria andParentIdEqualTo(String value) {
|
||||||
addCriterion("p_id =", value, "pId");
|
addCriterion("parent_id =", value, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdNotEqualTo(Integer value) {
|
public Criteria andParentIdNotEqualTo(String value) {
|
||||||
addCriterion("p_id <>", value, "pId");
|
addCriterion("parent_id <>", value, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdGreaterThan(Integer value) {
|
public Criteria andParentIdGreaterThan(String value) {
|
||||||
addCriterion("p_id >", value, "pId");
|
addCriterion("parent_id >", value, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdGreaterThanOrEqualTo(Integer value) {
|
public Criteria andParentIdGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("p_id >=", value, "pId");
|
addCriterion("parent_id >=", value, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdLessThan(Integer value) {
|
public Criteria andParentIdLessThan(String value) {
|
||||||
addCriterion("p_id <", value, "pId");
|
addCriterion("parent_id <", value, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdLessThanOrEqualTo(Integer value) {
|
public Criteria andParentIdLessThanOrEqualTo(String value) {
|
||||||
addCriterion("p_id <=", value, "pId");
|
addCriterion("parent_id <=", value, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdIn(List<Integer> values) {
|
public Criteria andParentIdLike(String value) {
|
||||||
addCriterion("p_id in", values, "pId");
|
addCriterion("parent_id like", value, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdNotIn(List<Integer> values) {
|
public Criteria andParentIdNotLike(String value) {
|
||||||
addCriterion("p_id not in", values, "pId");
|
addCriterion("parent_id not like", value, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdBetween(Integer value1, Integer value2) {
|
public Criteria andParentIdIn(List<String> values) {
|
||||||
addCriterion("p_id between", value1, value2, "pId");
|
addCriterion("parent_id in", values, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andPIdNotBetween(Integer value1, Integer value2) {
|
public Criteria andParentIdNotIn(List<String> values) {
|
||||||
addCriterion("p_id not between", value1, value2, "pId");
|
addCriterion("parent_id not in", values, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdBetween(String value1, String value2) {
|
||||||
|
addCriterion("parent_id between", value1, value2, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("parent_id not between", value1, value2, "parentId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class TestCaseReport implements Serializable {
|
public class TestCaseReport implements Serializable {
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
|
@ -114,52 +114,62 @@ public class TestCaseReportExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdEqualTo(Long value) {
|
public Criteria andIdEqualTo(String value) {
|
||||||
addCriterion("id =", value, "id");
|
addCriterion("id =", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotEqualTo(Long value) {
|
public Criteria andIdNotEqualTo(String value) {
|
||||||
addCriterion("id <>", value, "id");
|
addCriterion("id <>", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThan(Long value) {
|
public Criteria andIdGreaterThan(String value) {
|
||||||
addCriterion("id >", value, "id");
|
addCriterion("id >", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("id >=", value, "id");
|
addCriterion("id >=", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThan(Long value) {
|
public Criteria andIdLessThan(String value) {
|
||||||
addCriterion("id <", value, "id");
|
addCriterion("id <", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||||
addCriterion("id <=", value, "id");
|
addCriterion("id <=", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdIn(List<Long> values) {
|
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");
|
addCriterion("id in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotIn(List<Long> values) {
|
public Criteria andIdNotIn(List<String> values) {
|
||||||
addCriterion("id not in", values, "id");
|
addCriterion("id not in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdBetween(Long value1, Long value2) {
|
public Criteria andIdBetween(String value1, String value2) {
|
||||||
addCriterion("id between", value1, value2, "id");
|
addCriterion("id between", value1, value2, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
public Criteria andIdNotBetween(String value1, String value2) {
|
||||||
addCriterion("id not between", value1, value2, "id");
|
addCriterion("id not between", value1, value2, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class TestCaseReportTemplate implements Serializable {
|
public class TestCaseReportTemplate implements Serializable {
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
|
@ -114,52 +114,62 @@ public class TestCaseReportTemplateExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdEqualTo(Long value) {
|
public Criteria andIdEqualTo(String value) {
|
||||||
addCriterion("id =", value, "id");
|
addCriterion("id =", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotEqualTo(Long value) {
|
public Criteria andIdNotEqualTo(String value) {
|
||||||
addCriterion("id <>", value, "id");
|
addCriterion("id <>", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThan(Long value) {
|
public Criteria andIdGreaterThan(String value) {
|
||||||
addCriterion("id >", value, "id");
|
addCriterion("id >", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("id >=", value, "id");
|
addCriterion("id >=", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThan(Long value) {
|
public Criteria andIdLessThan(String value) {
|
||||||
addCriterion("id <", value, "id");
|
addCriterion("id <", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThanOrEqualTo(Long value) {
|
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||||
addCriterion("id <=", value, "id");
|
addCriterion("id <=", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdIn(List<Long> values) {
|
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");
|
addCriterion("id in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotIn(List<Long> values) {
|
public Criteria andIdNotIn(List<String> values) {
|
||||||
addCriterion("id not in", values, "id");
|
addCriterion("id not in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdBetween(Long value1, Long value2) {
|
public Criteria andIdBetween(String value1, String value2) {
|
||||||
addCriterion("id between", value1, value2, "id");
|
addCriterion("id between", value1, value2, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotBetween(Long value1, Long value2) {
|
public Criteria andIdNotBetween(String value1, String value2) {
|
||||||
addCriterion("id not between", value1, value2, "id");
|
addCriterion("id not between", value1, value2, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package io.metersphere.base.domain;
|
package io.metersphere.base.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
|
|
|
@ -11,7 +11,7 @@ public class TestPlan implements Serializable {
|
||||||
|
|
||||||
private String workspaceId;
|
private String workspaceId;
|
||||||
|
|
||||||
private Long reportId;
|
private String reportId;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
|
@ -324,52 +324,62 @@ public class TestPlanExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdEqualTo(Long value) {
|
public Criteria andReportIdEqualTo(String value) {
|
||||||
addCriterion("report_id =", value, "reportId");
|
addCriterion("report_id =", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdNotEqualTo(Long value) {
|
public Criteria andReportIdNotEqualTo(String value) {
|
||||||
addCriterion("report_id <>", value, "reportId");
|
addCriterion("report_id <>", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdGreaterThan(Long value) {
|
public Criteria andReportIdGreaterThan(String value) {
|
||||||
addCriterion("report_id >", value, "reportId");
|
addCriterion("report_id >", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdGreaterThanOrEqualTo(Long value) {
|
public Criteria andReportIdGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("report_id >=", value, "reportId");
|
addCriterion("report_id >=", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdLessThan(Long value) {
|
public Criteria andReportIdLessThan(String value) {
|
||||||
addCriterion("report_id <", value, "reportId");
|
addCriterion("report_id <", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdLessThanOrEqualTo(Long value) {
|
public Criteria andReportIdLessThanOrEqualTo(String value) {
|
||||||
addCriterion("report_id <=", value, "reportId");
|
addCriterion("report_id <=", value, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdIn(List<Long> values) {
|
public Criteria andReportIdLike(String value) {
|
||||||
|
addCriterion("report_id like", value, "reportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andReportIdNotLike(String value) {
|
||||||
|
addCriterion("report_id not like", value, "reportId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andReportIdIn(List<String> values) {
|
||||||
addCriterion("report_id in", values, "reportId");
|
addCriterion("report_id in", values, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdNotIn(List<Long> values) {
|
public Criteria andReportIdNotIn(List<String> values) {
|
||||||
addCriterion("report_id not in", values, "reportId");
|
addCriterion("report_id not in", values, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdBetween(Long value1, Long value2) {
|
public Criteria andReportIdBetween(String value1, String value2) {
|
||||||
addCriterion("report_id between", value1, value2, "reportId");
|
addCriterion("report_id between", value1, value2, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andReportIdNotBetween(Long value1, Long value2) {
|
public Criteria andReportIdNotBetween(String value1, String value2) {
|
||||||
addCriterion("report_id not between", value1, value2, "reportId");
|
addCriterion("report_id not between", value1, value2, "reportId");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package io.metersphere.base.domain;
|
package io.metersphere.base.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class TestPlanTestCase implements Serializable {
|
public class TestPlanTestCase implements Serializable {
|
||||||
private Integer id;
|
private String id;
|
||||||
|
|
||||||
private String planId;
|
private String planId;
|
||||||
|
|
||||||
|
|
|
@ -114,52 +114,62 @@ public class TestPlanTestCaseExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdEqualTo(Integer value) {
|
public Criteria andIdEqualTo(String value) {
|
||||||
addCriterion("id =", value, "id");
|
addCriterion("id =", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotEqualTo(Integer value) {
|
public Criteria andIdNotEqualTo(String value) {
|
||||||
addCriterion("id <>", value, "id");
|
addCriterion("id <>", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThan(Integer value) {
|
public Criteria andIdGreaterThan(String value) {
|
||||||
addCriterion("id >", value, "id");
|
addCriterion("id >", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
|
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||||
addCriterion("id >=", value, "id");
|
addCriterion("id >=", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThan(Integer value) {
|
public Criteria andIdLessThan(String value) {
|
||||||
addCriterion("id <", value, "id");
|
addCriterion("id <", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdLessThanOrEqualTo(Integer value) {
|
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||||
addCriterion("id <=", value, "id");
|
addCriterion("id <=", value, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdIn(List<Integer> values) {
|
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");
|
addCriterion("id in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotIn(List<Integer> values) {
|
public Criteria andIdNotIn(List<String> values) {
|
||||||
addCriterion("id not in", values, "id");
|
addCriterion("id not in", values, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdBetween(Integer value1, Integer value2) {
|
public Criteria andIdBetween(String value1, String value2) {
|
||||||
addCriterion("id between", value1, value2, "id");
|
addCriterion("id between", value1, value2, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andIdNotBetween(Integer value1, Integer value2) {
|
public Criteria andIdNotBetween(String value1, String value2) {
|
||||||
addCriterion("id not between", value1, value2, "id");
|
addCriterion("id not between", value1, value2, "id");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<mapper namespace="io.metersphere.base.mapper.TestCaseMapper">
|
<mapper namespace="io.metersphere.base.mapper.TestCaseMapper">
|
||||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCase">
|
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCase">
|
||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="node_id" jdbcType="INTEGER" property="nodeId" />
|
<result column="node_id" jdbcType="VARCHAR" property="nodeId" />
|
||||||
<result column="node_path" jdbcType="VARCHAR" property="nodePath" />
|
<result column="node_path" jdbcType="VARCHAR" property="nodePath" />
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
maintainer, priority, method,
|
maintainer, priority, method,
|
||||||
prerequisite, create_time, update_time,
|
prerequisite, create_time, update_time,
|
||||||
remark, steps)
|
remark, steps)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{nodeId,jdbcType=INTEGER}, #{nodePath,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{nodeId,jdbcType=VARCHAR}, #{nodePath,jdbcType=VARCHAR},
|
||||||
#{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
#{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||||
#{maintainer,jdbcType=VARCHAR}, #{priority,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR},
|
#{maintainer,jdbcType=VARCHAR}, #{priority,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR},
|
||||||
#{prerequisite,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
#{prerequisite,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||||
|
@ -195,7 +195,7 @@
|
||||||
#{id,jdbcType=VARCHAR},
|
#{id,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="nodeId != null">
|
<if test="nodeId != null">
|
||||||
#{nodeId,jdbcType=INTEGER},
|
#{nodeId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="nodePath != null">
|
<if test="nodePath != null">
|
||||||
#{nodePath,jdbcType=VARCHAR},
|
#{nodePath,jdbcType=VARCHAR},
|
||||||
|
@ -248,7 +248,7 @@
|
||||||
id = #{record.id,jdbcType=VARCHAR},
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.nodeId != null">
|
<if test="record.nodeId != null">
|
||||||
node_id = #{record.nodeId,jdbcType=INTEGER},
|
node_id = #{record.nodeId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.nodePath != null">
|
<if test="record.nodePath != null">
|
||||||
node_path = #{record.nodePath,jdbcType=VARCHAR},
|
node_path = #{record.nodePath,jdbcType=VARCHAR},
|
||||||
|
@ -294,7 +294,7 @@
|
||||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
update test_case
|
update test_case
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
node_id = #{record.nodeId,jdbcType=INTEGER},
|
node_id = #{record.nodeId,jdbcType=VARCHAR},
|
||||||
node_path = #{record.nodePath,jdbcType=VARCHAR},
|
node_path = #{record.nodePath,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
|
@ -314,7 +314,7 @@
|
||||||
<update id="updateByExample" parameterType="map">
|
<update id="updateByExample" parameterType="map">
|
||||||
update test_case
|
update test_case
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
node_id = #{record.nodeId,jdbcType=INTEGER},
|
node_id = #{record.nodeId,jdbcType=VARCHAR},
|
||||||
node_path = #{record.nodePath,jdbcType=VARCHAR},
|
node_path = #{record.nodePath,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
|
@ -333,7 +333,7 @@
|
||||||
update test_case
|
update test_case
|
||||||
<set>
|
<set>
|
||||||
<if test="nodeId != null">
|
<if test="nodeId != null">
|
||||||
node_id = #{nodeId,jdbcType=INTEGER},
|
node_id = #{nodeId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="nodePath != null">
|
<if test="nodePath != null">
|
||||||
node_path = #{nodePath,jdbcType=VARCHAR},
|
node_path = #{nodePath,jdbcType=VARCHAR},
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseWithBLOBs">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseWithBLOBs">
|
||||||
update test_case
|
update test_case
|
||||||
set node_id = #{nodeId,jdbcType=INTEGER},
|
set node_id = #{nodeId,jdbcType=VARCHAR},
|
||||||
node_path = #{nodePath,jdbcType=VARCHAR},
|
node_path = #{nodePath,jdbcType=VARCHAR},
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
|
@ -393,7 +393,7 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCase">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCase">
|
||||||
update test_case
|
update test_case
|
||||||
set node_id = #{nodeId,jdbcType=INTEGER},
|
set node_id = #{nodeId,jdbcType=VARCHAR},
|
||||||
node_path = #{nodePath,jdbcType=VARCHAR},
|
node_path = #{nodePath,jdbcType=VARCHAR},
|
||||||
project_id = #{projectId,jdbcType=VARCHAR},
|
project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
|
|
|
@ -10,7 +10,7 @@ public interface TestCaseNodeMapper {
|
||||||
|
|
||||||
int deleteByExample(TestCaseNodeExample example);
|
int deleteByExample(TestCaseNodeExample example);
|
||||||
|
|
||||||
int deleteByPrimaryKey(Integer id);
|
int deleteByPrimaryKey(String id);
|
||||||
|
|
||||||
int insert(TestCaseNode record);
|
int insert(TestCaseNode record);
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ public interface TestCaseNodeMapper {
|
||||||
|
|
||||||
List<TestCaseNode> selectByExample(TestCaseNodeExample example);
|
List<TestCaseNode> selectByExample(TestCaseNodeExample example);
|
||||||
|
|
||||||
TestCaseNode selectByPrimaryKey(Integer id);
|
TestCaseNode selectByPrimaryKey(String id);
|
||||||
|
|
||||||
int updateByExampleSelective(@Param("record") TestCaseNode record, @Param("example") TestCaseNodeExample example);
|
int updateByExampleSelective(@Param("record") TestCaseNode record, @Param("example") TestCaseNodeExample example);
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="io.metersphere.base.mapper.TestCaseNodeMapper">
|
<mapper namespace="io.metersphere.base.mapper.TestCaseNodeMapper">
|
||||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseNode">
|
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseNode">
|
||||||
<id column="id" jdbcType="INTEGER" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
<result column="p_id" jdbcType="INTEGER" property="pId" />
|
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
|
||||||
<result column="level" jdbcType="INTEGER" property="level" />
|
<result column="level" jdbcType="INTEGER" property="level" />
|
||||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, project_id, name, p_id, level, create_time, update_time
|
id, project_id, name, parent_id, level, create_time, update_time
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseNodeExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseNodeExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
|
@ -85,15 +85,15 @@
|
||||||
order by ${orderByClause}
|
order by ${orderByClause}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
from test_case_node
|
from test_case_node
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
delete from test_case_node
|
delete from test_case_node
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseNodeExample">
|
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseNodeExample">
|
||||||
delete from test_case_node
|
delete from test_case_node
|
||||||
|
@ -103,10 +103,10 @@
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseNode">
|
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseNode">
|
||||||
insert into test_case_node (id, project_id, name,
|
insert into test_case_node (id, project_id, name,
|
||||||
p_id, level, create_time,
|
parent_id, level, create_time,
|
||||||
update_time)
|
update_time)
|
||||||
values (#{id,jdbcType=INTEGER}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||||
#{pId,jdbcType=INTEGER}, #{level,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT},
|
#{parentId,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT},
|
||||||
#{updateTime,jdbcType=BIGINT})
|
#{updateTime,jdbcType=BIGINT})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseNode">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseNode">
|
||||||
|
@ -121,8 +121,8 @@
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
name,
|
name,
|
||||||
</if>
|
</if>
|
||||||
<if test="pId != null">
|
<if test="parentId != null">
|
||||||
p_id,
|
parent_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="level != null">
|
<if test="level != null">
|
||||||
level,
|
level,
|
||||||
|
@ -136,7 +136,7 @@
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
#{id,jdbcType=INTEGER},
|
#{id,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
#{projectId,jdbcType=VARCHAR},
|
#{projectId,jdbcType=VARCHAR},
|
||||||
|
@ -144,8 +144,8 @@
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
#{name,jdbcType=VARCHAR},
|
#{name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="pId != null">
|
<if test="parentId != null">
|
||||||
#{pId,jdbcType=INTEGER},
|
#{parentId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="level != null">
|
<if test="level != null">
|
||||||
#{level,jdbcType=INTEGER},
|
#{level,jdbcType=INTEGER},
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
update test_case_node
|
update test_case_node
|
||||||
<set>
|
<set>
|
||||||
<if test="record.id != null">
|
<if test="record.id != null">
|
||||||
id = #{record.id,jdbcType=INTEGER},
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.projectId != null">
|
<if test="record.projectId != null">
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
|
@ -176,8 +176,8 @@
|
||||||
<if test="record.name != null">
|
<if test="record.name != null">
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.pId != null">
|
<if test="record.parentId != null">
|
||||||
p_id = #{record.pId,jdbcType=INTEGER},
|
parent_id = #{record.parentId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.level != null">
|
<if test="record.level != null">
|
||||||
level = #{record.level,jdbcType=INTEGER},
|
level = #{record.level,jdbcType=INTEGER},
|
||||||
|
@ -195,10 +195,10 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExample" parameterType="map">
|
<update id="updateByExample" parameterType="map">
|
||||||
update test_case_node
|
update test_case_node
|
||||||
set id = #{record.id,jdbcType=INTEGER},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
p_id = #{record.pId,jdbcType=INTEGER},
|
parent_id = #{record.parentId,jdbcType=VARCHAR},
|
||||||
level = #{record.level,jdbcType=INTEGER},
|
level = #{record.level,jdbcType=INTEGER},
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||||
|
@ -215,8 +215,8 @@
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="pId != null">
|
<if test="parentId != null">
|
||||||
p_id = #{pId,jdbcType=INTEGER},
|
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="level != null">
|
<if test="level != null">
|
||||||
level = #{level,jdbcType=INTEGER},
|
level = #{level,jdbcType=INTEGER},
|
||||||
|
@ -228,16 +228,16 @@
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseNode">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseNode">
|
||||||
update test_case_node
|
update test_case_node
|
||||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
p_id = #{pId,jdbcType=INTEGER},
|
parent_id = #{parentId,jdbcType=VARCHAR},
|
||||||
level = #{level,jdbcType=INTEGER},
|
level = #{level,jdbcType=INTEGER},
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT}
|
update_time = #{updateTime,jdbcType=BIGINT}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
|
@ -10,7 +10,7 @@ public interface TestCaseReportMapper {
|
||||||
|
|
||||||
int deleteByExample(TestCaseReportExample example);
|
int deleteByExample(TestCaseReportExample example);
|
||||||
|
|
||||||
int deleteByPrimaryKey(Long id);
|
int deleteByPrimaryKey(String id);
|
||||||
|
|
||||||
int insert(TestCaseReport record);
|
int insert(TestCaseReport record);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public interface TestCaseReportMapper {
|
||||||
|
|
||||||
List<TestCaseReport> selectByExample(TestCaseReportExample example);
|
List<TestCaseReport> selectByExample(TestCaseReportExample example);
|
||||||
|
|
||||||
TestCaseReport selectByPrimaryKey(Long id);
|
TestCaseReport selectByPrimaryKey(String id);
|
||||||
|
|
||||||
int updateByExampleSelective(@Param("record") TestCaseReport record, @Param("example") TestCaseReportExample example);
|
int updateByExampleSelective(@Param("record") TestCaseReport record, @Param("example") TestCaseReportExample example);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="io.metersphere.base.mapper.TestCaseReportMapper">
|
<mapper namespace="io.metersphere.base.mapper.TestCaseReportMapper">
|
||||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReport">
|
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReport">
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
<result column="start_time" jdbcType="BIGINT" property="startTime" />
|
<result column="start_time" jdbcType="BIGINT" property="startTime" />
|
||||||
<result column="end_time" jdbcType="BIGINT" property="endTime" />
|
<result column="end_time" jdbcType="BIGINT" property="endTime" />
|
||||||
|
@ -104,17 +104,17 @@
|
||||||
order by ${orderByClause}
|
order by ${orderByClause}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
,
|
,
|
||||||
<include refid="Blob_Column_List" />
|
<include refid="Blob_Column_List" />
|
||||||
from test_case_report
|
from test_case_report
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
delete from test_case_report
|
delete from test_case_report
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReportExample">
|
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReportExample">
|
||||||
delete from test_case_report
|
delete from test_case_report
|
||||||
|
@ -123,20 +123,17 @@
|
||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReport">
|
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReport">
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
insert into test_case_report (id, name, start_time,
|
||||||
SELECT LAST_INSERT_ID()
|
end_time, content)
|
||||||
</selectKey>
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT},
|
||||||
insert into test_case_report (name, start_time, end_time,
|
#{endTime,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR})
|
||||||
content)
|
|
||||||
values (#{name,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT},
|
|
||||||
#{content,jdbcType=LONGVARCHAR})
|
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReport">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReport">
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
|
||||||
SELECT LAST_INSERT_ID()
|
|
||||||
</selectKey>
|
|
||||||
insert into test_case_report
|
insert into test_case_report
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
name,
|
name,
|
||||||
</if>
|
</if>
|
||||||
|
@ -151,6 +148,9 @@
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
#{name,jdbcType=VARCHAR},
|
#{name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
update test_case_report
|
update test_case_report
|
||||||
<set>
|
<set>
|
||||||
<if test="record.id != null">
|
<if test="record.id != null">
|
||||||
id = #{record.id,jdbcType=BIGINT},
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.name != null">
|
<if test="record.name != null">
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
|
@ -196,7 +196,7 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
update test_case_report
|
update test_case_report
|
||||||
set id = #{record.id,jdbcType=BIGINT},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
start_time = #{record.startTime,jdbcType=BIGINT},
|
start_time = #{record.startTime,jdbcType=BIGINT},
|
||||||
end_time = #{record.endTime,jdbcType=BIGINT},
|
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||||
|
@ -207,7 +207,7 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExample" parameterType="map">
|
<update id="updateByExample" parameterType="map">
|
||||||
update test_case_report
|
update test_case_report
|
||||||
set id = #{record.id,jdbcType=BIGINT},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
start_time = #{record.startTime,jdbcType=BIGINT},
|
start_time = #{record.startTime,jdbcType=BIGINT},
|
||||||
end_time = #{record.endTime,jdbcType=BIGINT}
|
end_time = #{record.endTime,jdbcType=BIGINT}
|
||||||
|
@ -231,7 +231,7 @@
|
||||||
content = #{content,jdbcType=LONGVARCHAR},
|
content = #{content,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReport">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReport">
|
||||||
update test_case_report
|
update test_case_report
|
||||||
|
@ -239,13 +239,13 @@
|
||||||
start_time = #{startTime,jdbcType=BIGINT},
|
start_time = #{startTime,jdbcType=BIGINT},
|
||||||
end_time = #{endTime,jdbcType=BIGINT},
|
end_time = #{endTime,jdbcType=BIGINT},
|
||||||
content = #{content,jdbcType=LONGVARCHAR}
|
content = #{content,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReport">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReport">
|
||||||
update test_case_report
|
update test_case_report
|
||||||
set name = #{name,jdbcType=VARCHAR},
|
set name = #{name,jdbcType=VARCHAR},
|
||||||
start_time = #{startTime,jdbcType=BIGINT},
|
start_time = #{startTime,jdbcType=BIGINT},
|
||||||
end_time = #{endTime,jdbcType=BIGINT}
|
end_time = #{endTime,jdbcType=BIGINT}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
|
@ -10,7 +10,7 @@ public interface TestCaseReportTemplateMapper {
|
||||||
|
|
||||||
int deleteByExample(TestCaseReportTemplateExample example);
|
int deleteByExample(TestCaseReportTemplateExample example);
|
||||||
|
|
||||||
int deleteByPrimaryKey(Long id);
|
int deleteByPrimaryKey(String id);
|
||||||
|
|
||||||
int insert(TestCaseReportTemplate record);
|
int insert(TestCaseReportTemplate record);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public interface TestCaseReportTemplateMapper {
|
||||||
|
|
||||||
List<TestCaseReportTemplate> selectByExample(TestCaseReportTemplateExample example);
|
List<TestCaseReportTemplate> selectByExample(TestCaseReportTemplateExample example);
|
||||||
|
|
||||||
TestCaseReportTemplate selectByPrimaryKey(Long id);
|
TestCaseReportTemplate selectByPrimaryKey(String id);
|
||||||
|
|
||||||
int updateByExampleSelective(@Param("record") TestCaseReportTemplate record, @Param("example") TestCaseReportTemplateExample example);
|
int updateByExampleSelective(@Param("record") TestCaseReportTemplate record, @Param("example") TestCaseReportTemplateExample example);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="io.metersphere.base.mapper.TestCaseReportTemplateMapper">
|
<mapper namespace="io.metersphere.base.mapper.TestCaseReportTemplateMapper">
|
||||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReportTemplate">
|
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
@ -103,17 +103,17 @@
|
||||||
order by ${orderByClause}
|
order by ${orderByClause}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
,
|
,
|
||||||
<include refid="Blob_Column_List" />
|
<include refid="Blob_Column_List" />
|
||||||
from test_case_report_template
|
from test_case_report_template
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
delete from test_case_report_template
|
delete from test_case_report_template
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReportTemplateExample">
|
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestCaseReportTemplateExample">
|
||||||
delete from test_case_report_template
|
delete from test_case_report_template
|
||||||
|
@ -122,20 +122,17 @@
|
||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
insert into test_case_report_template (id, name, workspace_id,
|
||||||
SELECT LAST_INSERT_ID()
|
content)
|
||||||
</selectKey>
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR},
|
||||||
insert into test_case_report_template (name, workspace_id, content
|
#{content,jdbcType=LONGVARCHAR})
|
||||||
)
|
|
||||||
values (#{name,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
|
|
||||||
)
|
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
|
||||||
SELECT LAST_INSERT_ID()
|
|
||||||
</selectKey>
|
|
||||||
insert into test_case_report_template
|
insert into test_case_report_template
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
name,
|
name,
|
||||||
</if>
|
</if>
|
||||||
|
@ -147,6 +144,9 @@
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
#{name,jdbcType=VARCHAR},
|
#{name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
update test_case_report_template
|
update test_case_report_template
|
||||||
<set>
|
<set>
|
||||||
<if test="record.id != null">
|
<if test="record.id != null">
|
||||||
id = #{record.id,jdbcType=BIGINT},
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.name != null">
|
<if test="record.name != null">
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
|
@ -186,7 +186,7 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
update test_case_report_template
|
update test_case_report_template
|
||||||
set id = #{record.id,jdbcType=BIGINT},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||||
content = #{record.content,jdbcType=LONGVARCHAR}
|
content = #{record.content,jdbcType=LONGVARCHAR}
|
||||||
|
@ -196,7 +196,7 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExample" parameterType="map">
|
<update id="updateByExample" parameterType="map">
|
||||||
update test_case_report_template
|
update test_case_report_template
|
||||||
set id = #{record.id,jdbcType=BIGINT},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR}
|
workspace_id = #{record.workspaceId,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
|
@ -216,19 +216,19 @@
|
||||||
content = #{content,jdbcType=LONGVARCHAR},
|
content = #{content,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||||
update test_case_report_template
|
update test_case_report_template
|
||||||
set name = #{name,jdbcType=VARCHAR},
|
set name = #{name,jdbcType=VARCHAR},
|
||||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||||
content = #{content,jdbcType=LONGVARCHAR}
|
content = #{content,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReportTemplate">
|
||||||
update test_case_report_template
|
update test_case_report_template
|
||||||
set name = #{name,jdbcType=VARCHAR},
|
set name = #{name,jdbcType=VARCHAR},
|
||||||
workspace_id = #{workspaceId,jdbcType=VARCHAR}
|
workspace_id = #{workspaceId,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
|
@ -5,7 +5,7 @@
|
||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
<result column="workspace_id" jdbcType="VARCHAR" property="workspaceId" />
|
||||||
<result column="report_id" jdbcType="BIGINT" property="reportId" />
|
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
test_case_match_rule, executor_match_rule, create_time,
|
test_case_match_rule, executor_match_rule, create_time,
|
||||||
update_time, tags)
|
update_time, tags)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR},
|
||||||
#{reportId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
#{reportId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||||
#{status,jdbcType=VARCHAR}, #{stage,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR},
|
#{status,jdbcType=VARCHAR}, #{stage,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR},
|
||||||
#{testCaseMatchRule,jdbcType=VARCHAR}, #{executorMatchRule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
#{testCaseMatchRule,jdbcType=VARCHAR}, #{executorMatchRule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||||
#{updateTime,jdbcType=BIGINT}, #{tags,jdbcType=LONGVARCHAR})
|
#{updateTime,jdbcType=BIGINT}, #{tags,jdbcType=LONGVARCHAR})
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
#{workspaceId,jdbcType=VARCHAR},
|
#{workspaceId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="reportId != null">
|
<if test="reportId != null">
|
||||||
#{reportId,jdbcType=BIGINT},
|
#{reportId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
#{name,jdbcType=VARCHAR},
|
#{name,jdbcType=VARCHAR},
|
||||||
|
@ -254,7 +254,7 @@
|
||||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.reportId != null">
|
<if test="record.reportId != null">
|
||||||
report_id = #{record.reportId,jdbcType=BIGINT},
|
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.name != null">
|
<if test="record.name != null">
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
|
@ -296,7 +296,7 @@
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||||
report_id = #{record.reportId,jdbcType=BIGINT},
|
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
description = #{record.description,jdbcType=VARCHAR},
|
||||||
status = #{record.status,jdbcType=VARCHAR},
|
status = #{record.status,jdbcType=VARCHAR},
|
||||||
|
@ -316,7 +316,7 @@
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
workspace_id = #{record.workspaceId,jdbcType=VARCHAR},
|
||||||
report_id = #{record.reportId,jdbcType=BIGINT},
|
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
name = #{record.name,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
description = #{record.description,jdbcType=VARCHAR},
|
||||||
status = #{record.status,jdbcType=VARCHAR},
|
status = #{record.status,jdbcType=VARCHAR},
|
||||||
|
@ -340,7 +340,7 @@
|
||||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="reportId != null">
|
<if test="reportId != null">
|
||||||
report_id = #{reportId,jdbcType=BIGINT},
|
report_id = #{reportId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
|
@ -379,7 +379,7 @@
|
||||||
update test_plan
|
update test_plan
|
||||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||||
report_id = #{reportId,jdbcType=BIGINT},
|
report_id = #{reportId,jdbcType=VARCHAR},
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
description = #{description,jdbcType=VARCHAR},
|
||||||
status = #{status,jdbcType=VARCHAR},
|
status = #{status,jdbcType=VARCHAR},
|
||||||
|
@ -396,7 +396,7 @@
|
||||||
update test_plan
|
update test_plan
|
||||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
workspace_id = #{workspaceId,jdbcType=VARCHAR},
|
||||||
report_id = #{reportId,jdbcType=BIGINT},
|
report_id = #{reportId,jdbcType=VARCHAR},
|
||||||
name = #{name,jdbcType=VARCHAR},
|
name = #{name,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
description = #{description,jdbcType=VARCHAR},
|
||||||
status = #{status,jdbcType=VARCHAR},
|
status = #{status,jdbcType=VARCHAR},
|
||||||
|
|
|
@ -10,7 +10,7 @@ public interface TestPlanTestCaseMapper {
|
||||||
|
|
||||||
int deleteByExample(TestPlanTestCaseExample example);
|
int deleteByExample(TestPlanTestCaseExample example);
|
||||||
|
|
||||||
int deleteByPrimaryKey(Integer id);
|
int deleteByPrimaryKey(String id);
|
||||||
|
|
||||||
int insert(TestPlanTestCase record);
|
int insert(TestPlanTestCase record);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ public interface TestPlanTestCaseMapper {
|
||||||
|
|
||||||
List<TestPlanTestCase> selectByExample(TestPlanTestCaseExample example);
|
List<TestPlanTestCase> selectByExample(TestPlanTestCaseExample example);
|
||||||
|
|
||||||
TestPlanTestCase selectByPrimaryKey(Integer id);
|
TestPlanTestCase selectByPrimaryKey(String id);
|
||||||
|
|
||||||
int updateByExampleSelective(@Param("record") TestPlanTestCase record, @Param("example") TestPlanTestCaseExample example);
|
int updateByExampleSelective(@Param("record") TestPlanTestCase record, @Param("example") TestPlanTestCaseExample example);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="io.metersphere.base.mapper.TestPlanTestCaseMapper">
|
<mapper namespace="io.metersphere.base.mapper.TestPlanTestCaseMapper">
|
||||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestPlanTestCase">
|
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestPlanTestCase">
|
||||||
<id column="id" jdbcType="INTEGER" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="plan_id" jdbcType="VARCHAR" property="planId" />
|
<result column="plan_id" jdbcType="VARCHAR" property="planId" />
|
||||||
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
|
<result column="case_id" jdbcType="VARCHAR" property="caseId" />
|
||||||
<result column="executor" jdbcType="VARCHAR" property="executor" />
|
<result column="executor" jdbcType="VARCHAR" property="executor" />
|
||||||
|
@ -108,17 +108,17 @@
|
||||||
order by ${orderByClause}
|
order by ${orderByClause}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
,
|
,
|
||||||
<include refid="Blob_Column_List" />
|
<include refid="Blob_Column_List" />
|
||||||
from test_plan_test_case
|
from test_plan_test_case
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||||
delete from test_plan_test_case
|
delete from test_plan_test_case
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestPlanTestCaseExample">
|
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestPlanTestCaseExample">
|
||||||
delete from test_plan_test_case
|
delete from test_plan_test_case
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
executor, status, remark,
|
executor, status, remark,
|
||||||
create_time, update_time, results
|
create_time, update_time, results
|
||||||
)
|
)
|
||||||
values (#{id,jdbcType=INTEGER}, #{planId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR},
|
||||||
#{executor,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
#{executor,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
||||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{results,jdbcType=LONGVARCHAR}
|
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{results,jdbcType=LONGVARCHAR}
|
||||||
)
|
)
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
#{id,jdbcType=INTEGER},
|
#{id,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="planId != null">
|
<if test="planId != null">
|
||||||
#{planId,jdbcType=VARCHAR},
|
#{planId,jdbcType=VARCHAR},
|
||||||
|
@ -207,7 +207,7 @@
|
||||||
update test_plan_test_case
|
update test_plan_test_case
|
||||||
<set>
|
<set>
|
||||||
<if test="record.id != null">
|
<if test="record.id != null">
|
||||||
id = #{record.id,jdbcType=INTEGER},
|
id = #{record.id,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.planId != null">
|
<if test="record.planId != null">
|
||||||
plan_id = #{record.planId,jdbcType=VARCHAR},
|
plan_id = #{record.planId,jdbcType=VARCHAR},
|
||||||
|
@ -240,7 +240,7 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
update test_plan_test_case
|
update test_plan_test_case
|
||||||
set id = #{record.id,jdbcType=INTEGER},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
plan_id = #{record.planId,jdbcType=VARCHAR},
|
plan_id = #{record.planId,jdbcType=VARCHAR},
|
||||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||||
executor = #{record.executor,jdbcType=VARCHAR},
|
executor = #{record.executor,jdbcType=VARCHAR},
|
||||||
|
@ -255,7 +255,7 @@
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByExample" parameterType="map">
|
<update id="updateByExample" parameterType="map">
|
||||||
update test_plan_test_case
|
update test_plan_test_case
|
||||||
set id = #{record.id,jdbcType=INTEGER},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
plan_id = #{record.planId,jdbcType=VARCHAR},
|
plan_id = #{record.planId,jdbcType=VARCHAR},
|
||||||
case_id = #{record.caseId,jdbcType=VARCHAR},
|
case_id = #{record.caseId,jdbcType=VARCHAR},
|
||||||
executor = #{record.executor,jdbcType=VARCHAR},
|
executor = #{record.executor,jdbcType=VARCHAR},
|
||||||
|
@ -295,7 +295,7 @@
|
||||||
results = #{results,jdbcType=LONGVARCHAR},
|
results = #{results,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestPlanTestCase">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestPlanTestCase">
|
||||||
update test_plan_test_case
|
update test_plan_test_case
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
results = #{results,jdbcType=LONGVARCHAR}
|
results = #{results,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestPlanTestCase">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestPlanTestCase">
|
||||||
update test_plan_test_case
|
update test_plan_test_case
|
||||||
|
@ -318,6 +318,6 @@
|
||||||
remark = #{remark,jdbcType=VARCHAR},
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT}
|
update_time = #{updateTime,jdbcType=BIGINT}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
|
@ -0,0 +1,18 @@
|
||||||
|
package io.metersphere.base.mapper.ext;
|
||||||
|
|
||||||
|
import io.metersphere.base.domain.TestCase;
|
||||||
|
import io.metersphere.controller.request.testcase.QueryTestCaseRequest;
|
||||||
|
import io.metersphere.controller.request.testplancase.QueryTestPlanCaseRequest;
|
||||||
|
import io.metersphere.dto.TestCaseReportMetricDTO;
|
||||||
|
import io.metersphere.dto.TestCaseReportResultDTO;
|
||||||
|
import io.metersphere.dto.TestPlanCaseDTO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ExtTestPlanTestCaseMapper {
|
||||||
|
|
||||||
|
List<TestCaseReportResultDTO> getReportMetric(@Param("planId") String planId);
|
||||||
|
|
||||||
|
List<String> getExecutors(@Param("planId") String planId);
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?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.ExtTestPlanTestCaseMapper">
|
||||||
|
|
||||||
|
<select id="getReportMetric" parameterType="java.lang.String" resultType="io.metersphere.dto.TestCaseReportResultDTO">
|
||||||
|
select count(t1.id) as `count`, t1.status
|
||||||
|
from test_plan_test_case t1
|
||||||
|
inner join test_case t2
|
||||||
|
where t1.case_id = t2.id
|
||||||
|
and plan_id = #{planId}
|
||||||
|
group by t1.status;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getExecutors" resultType="java.lang.String" parameterType="java.lang.String">
|
||||||
|
select distinct t1.executor
|
||||||
|
from test_plan_test_case t1
|
||||||
|
inner join test_case t2
|
||||||
|
where t1.case_id = t2.id
|
||||||
|
and plan_id = #{planId};
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -40,7 +40,7 @@ public class TestCaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
public List<TestCase> getTestCaseByNodeId(@RequestBody List<Integer> nodeIds){
|
public List<TestCase> getTestCaseByNodeId(@RequestBody List<String> nodeIds){
|
||||||
return testCaseService.getTestCaseByNodeId(nodeIds);
|
return testCaseService.getTestCaseByNodeId(nodeIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class TestCaseNodeController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public int addNode(@RequestBody TestCaseNode node){
|
public String addNode(@RequestBody TestCaseNode node){
|
||||||
return testCaseNodeService.addNode(node);
|
return testCaseNodeService.addNode(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public class TestCaseNodeController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public int deleteNode(@RequestBody List<Integer> nodeIds){
|
public int deleteNode(@RequestBody List<String> nodeIds){
|
||||||
//nodeIds 包含删除节点ID及其所有子节点ID
|
//nodeIds 包含删除节点ID及其所有子节点ID
|
||||||
return testCaseNodeService.deleteNode(nodeIds);
|
return testCaseNodeService.deleteNode(nodeIds);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,12 +21,12 @@ public class TestCaseReportController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get/{id}")
|
@GetMapping("/get/{id}")
|
||||||
public TestCaseReport get(@PathVariable Long id){
|
public TestCaseReport get(@PathVariable String id){
|
||||||
return testCaseReportService.getTestCaseReport(id);
|
return testCaseReportService.getTestCaseReport(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
public Long addByTemplateId(@RequestBody CreateReportRequest request){
|
public String addByTemplateId(@RequestBody CreateReportRequest request){
|
||||||
return testCaseReportService.addTestCaseReportByTemplateId(request);
|
return testCaseReportService.addTestCaseReportByTemplateId(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,8 +36,12 @@ public class TestCaseReportController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/delete/{id}")
|
@PostMapping("/delete/{id}")
|
||||||
public int delete(@PathVariable Long id){
|
public int delete(@PathVariable String id){
|
||||||
return testCaseReportService.deleteTestCaseReport(id);
|
return testCaseReportService.deleteTestCaseReport(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get/metric/{planId}")
|
||||||
|
public TestCaseReport getMetric(@PathVariable String planId){
|
||||||
|
return testCaseReportService.getMetric(planId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class TestCaseReportTemplateController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get/{id}")
|
@GetMapping("/get/{id}")
|
||||||
public TestCaseReportTemplate get(@PathVariable Long id){
|
public TestCaseReportTemplate get(@PathVariable String id){
|
||||||
return testCaseReportTemplateService.getTestCaseReportTemplate(id);
|
return testCaseReportTemplateService.getTestCaseReportTemplate(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public class TestCaseReportTemplateController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/delete/{id}")
|
@PostMapping("/delete/{id}")
|
||||||
public int delete(@PathVariable Long id){
|
public int delete(@PathVariable String id){
|
||||||
return testCaseReportTemplateService.deleteTestCaseReportTemplate(id);
|
return testCaseReportTemplateService.deleteTestCaseReportTemplate(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class TestPlanTestCaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/delete/{id}")
|
@PostMapping("/delete/{id}")
|
||||||
public int deleteTestCase(@PathVariable Integer id){
|
public int deleteTestCase(@PathVariable String id){
|
||||||
return testPlanTestCaseService.deleteTestCase(id);
|
return testPlanTestCaseService.deleteTestCase(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,5 @@ import lombok.Data;
|
||||||
@Data
|
@Data
|
||||||
public class CreateReportRequest {
|
public class CreateReportRequest {
|
||||||
String planId;
|
String planId;
|
||||||
Long templateId;
|
String templateId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +1,16 @@
|
||||||
package io.metersphere.controller.request.testcase;
|
package io.metersphere.controller.request.testcase;
|
||||||
|
|
||||||
import io.metersphere.base.domain.TestCase;
|
import io.metersphere.base.domain.TestCase;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class QueryTestCaseRequest extends TestCase {
|
public class QueryTestCaseRequest extends TestCase {
|
||||||
|
|
||||||
private List<Integer> nodeIds;
|
private List<String> nodeIds;
|
||||||
|
|
||||||
private String planId;
|
private String planId;
|
||||||
|
|
||||||
private String workspaceId;
|
private String workspaceId;
|
||||||
|
|
||||||
public String getPlanId() {
|
|
||||||
return planId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPlanId(String planId) {
|
|
||||||
this.planId = planId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Integer> getNodeIds() {
|
|
||||||
return nodeIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNodeIds(List<Integer> nodeIds) {
|
|
||||||
this.nodeIds = nodeIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWorkspaceId() {
|
|
||||||
return workspaceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWorkspaceId(String workspaceId) {
|
|
||||||
this.workspaceId = workspaceId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,18 +2,13 @@ package io.metersphere.controller.request.testcase;
|
||||||
|
|
||||||
import io.metersphere.base.domain.TestCase;
|
import io.metersphere.base.domain.TestCase;
|
||||||
import io.metersphere.base.domain.TestPlanTestCase;
|
import io.metersphere.base.domain.TestPlanTestCase;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class TestPlanCaseBatchRequest extends TestPlanTestCase {
|
public class TestPlanCaseBatchRequest extends TestPlanTestCase {
|
||||||
|
|
||||||
private List<Integer> ids;
|
private List<String> ids;
|
||||||
|
|
||||||
public List<Integer> getIds() {
|
|
||||||
return ids;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIds(List<Integer> ids) {
|
|
||||||
this.ids = ids;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,33 +1,9 @@
|
||||||
package io.metersphere.controller.request.testplan;
|
package io.metersphere.controller.request.testplan;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class QueryTestPlanRequest extends TestPlanRequest {
|
public class QueryTestPlanRequest extends TestPlanRequest {
|
||||||
private String name;
|
|
||||||
private String workspaceId;
|
private String workspaceId;
|
||||||
private boolean recent = false; // 表示查询最近的测试
|
private boolean recent = false; // 表示查询最近的测试
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWorkspaceId() {
|
|
||||||
return workspaceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWorkspaceId(String workspaceId) {
|
|
||||||
this.workspaceId = workspaceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isRecent() {
|
|
||||||
return recent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRecent(boolean recent) {
|
|
||||||
this.recent = recent;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package io.metersphere.controller.request.testplan;
|
package io.metersphere.controller.request.testplan;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class TestPlanRequest {
|
public class TestPlanRequest {
|
||||||
|
|
||||||
private String id;
|
private String id;
|
||||||
|
@ -28,100 +31,4 @@ public class TestPlanRequest {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(String id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getProjectId() {
|
|
||||||
return projectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProjectId(String projectId) {
|
|
||||||
this.projectId = projectId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getScenarioDefinition() {
|
|
||||||
return scenarioDefinition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setScenarioDefinition(String scenarioDefinition) {
|
|
||||||
this.scenarioDefinition = scenarioDefinition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getCreateTime() {
|
|
||||||
return createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTime(Long createTime) {
|
|
||||||
this.createTime = createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUpdateTime() {
|
|
||||||
return updateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUpdateTime(Long updateTime) {
|
|
||||||
this.updateTime = updateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRuntimeConfiguration() {
|
|
||||||
return runtimeConfiguration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRuntimeConfiguration(String runtimeConfiguration) {
|
|
||||||
this.runtimeConfiguration = runtimeConfiguration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLoadConfiguration() {
|
|
||||||
return loadConfiguration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoadConfiguration(String loadConfiguration) {
|
|
||||||
this.loadConfiguration = loadConfiguration == null ? null : loadConfiguration.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAdvancedConfiguration() {
|
|
||||||
return advancedConfiguration;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setAdvancedConfiguration(String advancedConfiguration) {
|
|
||||||
this.advancedConfiguration = advancedConfiguration == null ? null : advancedConfiguration.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSchedule() {
|
|
||||||
return schedule;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSchedule(String schedule) {
|
|
||||||
this.schedule = schedule == null ? null : schedule.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTestResourcePoolId() {
|
|
||||||
return testResourcePoolId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTestResourcePoolId(String testResourcePoolId) {
|
|
||||||
this.testResourcePoolId = testResourcePoolId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,38 +2,17 @@ package io.metersphere.controller.request.testplancase;
|
||||||
|
|
||||||
import io.metersphere.base.domain.TestCase;
|
import io.metersphere.base.domain.TestCase;
|
||||||
import io.metersphere.base.domain.TestPlanTestCase;
|
import io.metersphere.base.domain.TestPlanTestCase;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
public class QueryTestPlanCaseRequest extends TestPlanTestCase {
|
public class QueryTestPlanCaseRequest extends TestPlanTestCase {
|
||||||
|
|
||||||
private List<Integer> nodeIds;
|
private List<String> nodeIds;
|
||||||
|
|
||||||
private String workspaceId;
|
private String workspaceId;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<Integer> getNodeIds() {
|
|
||||||
return nodeIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNodeIds(List<Integer> nodeIds) {
|
|
||||||
this.nodeIds = nodeIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWorkspaceId() {
|
|
||||||
return workspaceId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWorkspaceId(String workspaceId) {
|
|
||||||
this.workspaceId = workspaceId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package io.metersphere.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TestCaseReportMetricDTO {
|
||||||
|
|
||||||
|
private List<TestCaseReportResultDTO> executeResult;
|
||||||
|
private List<TestCaseReportModuleResultDTO> moduleExecuteResult;
|
||||||
|
private List<String> executors;
|
||||||
|
private String principal;
|
||||||
|
private Long startTime;
|
||||||
|
private Long endTime;
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
package io.metersphere.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TestCaseReportModuleResultDTO {
|
||||||
|
private String module;
|
||||||
|
private Integer caseCount;
|
||||||
|
private Integer passRate;
|
||||||
|
private Integer flawCount;
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package io.metersphere.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TestCaseReportResultDTO {
|
||||||
|
private String status;
|
||||||
|
private String count;
|
||||||
|
}
|
|
@ -31,13 +31,14 @@ public class TestCaseNodeService {
|
||||||
@Resource
|
@Resource
|
||||||
TestPlanTestCaseMapper testPlanTestCaseMapper;
|
TestPlanTestCaseMapper testPlanTestCaseMapper;
|
||||||
|
|
||||||
public int addNode(TestCaseNode node) {
|
public String addNode(TestCaseNode node) {
|
||||||
|
|
||||||
if(node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH){
|
if(node.getLevel() > TestCaseConstants.MAX_NODE_DEPTH){
|
||||||
throw new RuntimeException("模块树最大深度为" + TestCaseConstants.MAX_NODE_DEPTH + "层!");
|
throw new RuntimeException("模块树最大深度为" + TestCaseConstants.MAX_NODE_DEPTH + "层!");
|
||||||
}
|
}
|
||||||
node.setCreateTime(System.currentTimeMillis());
|
node.setCreateTime(System.currentTimeMillis());
|
||||||
node.setUpdateTime(System.currentTimeMillis());
|
node.setUpdateTime(System.currentTimeMillis());
|
||||||
|
node.setId(UUID.randomUUID().toString());
|
||||||
testCaseNodeMapper.insertSelective(node);
|
testCaseNodeMapper.insertSelective(node);
|
||||||
return node.getId();
|
return node.getId();
|
||||||
}
|
}
|
||||||
|
@ -45,6 +46,7 @@ public class TestCaseNodeService {
|
||||||
public List<TestCaseNodeDTO> getNodeTreeByProjectId(String projectId) {
|
public List<TestCaseNodeDTO> getNodeTreeByProjectId(String projectId) {
|
||||||
TestCaseNodeExample testCaseNodeExample = new TestCaseNodeExample();
|
TestCaseNodeExample testCaseNodeExample = new TestCaseNodeExample();
|
||||||
testCaseNodeExample.createCriteria().andProjectIdEqualTo(projectId);
|
testCaseNodeExample.createCriteria().andProjectIdEqualTo(projectId);
|
||||||
|
testCaseNodeExample.setOrderByClause("create_time asc");
|
||||||
List<TestCaseNode> nodes = testCaseNodeMapper.selectByExample(testCaseNodeExample);
|
List<TestCaseNode> nodes = testCaseNodeMapper.selectByExample(testCaseNodeExample);
|
||||||
return getNodeTrees(nodes);
|
return getNodeTrees(nodes);
|
||||||
}
|
}
|
||||||
|
@ -92,7 +94,7 @@ public class TestCaseNodeService {
|
||||||
List<TestCaseNodeDTO> childrens = Optional.ofNullable(nodeTree.getChildren()).orElse(new ArrayList<>());
|
List<TestCaseNodeDTO> childrens = Optional.ofNullable(nodeTree.getChildren()).orElse(new ArrayList<>());
|
||||||
|
|
||||||
lowerNodes.forEach(node -> {
|
lowerNodes.forEach(node -> {
|
||||||
if (node.getPId().equals(rootNode.getId())){
|
if (node.getParentId() != null && node.getParentId().equals(rootNode.getId())){
|
||||||
childrens.add(buildNodeTree(nodeLevelMap, node));
|
childrens.add(buildNodeTree(nodeLevelMap, node));
|
||||||
nodeTree.setChildren(childrens);
|
nodeTree.setChildren(childrens);
|
||||||
}
|
}
|
||||||
|
@ -106,7 +108,7 @@ public class TestCaseNodeService {
|
||||||
return testCaseNodeMapper.updateByPrimaryKeySelective(node);
|
return testCaseNodeMapper.updateByPrimaryKeySelective(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int deleteNode(List<Integer> nodeIds) {
|
public int deleteNode(List<String> nodeIds) {
|
||||||
TestCaseExample testCaseExample = new TestCaseExample();
|
TestCaseExample testCaseExample = new TestCaseExample();
|
||||||
testCaseExample.createCriteria().andNodeIdIn(nodeIds);
|
testCaseExample.createCriteria().andNodeIdIn(nodeIds);
|
||||||
testCaseMapper.deleteByExample(testCaseExample);
|
testCaseMapper.deleteByExample(testCaseExample);
|
||||||
|
@ -144,7 +146,7 @@ public class TestCaseNodeService {
|
||||||
|
|
||||||
TestCaseExample testCaseExample = new TestCaseExample();
|
TestCaseExample testCaseExample = new TestCaseExample();
|
||||||
testCaseExample.createCriteria().andIdIn(caseIds);
|
testCaseExample.createCriteria().andIdIn(caseIds);
|
||||||
List<Integer> dataNodeIds = testCaseMapper.selectByExample(testCaseExample).stream()
|
List<String> dataNodeIds = testCaseMapper.selectByExample(testCaseExample).stream()
|
||||||
.map(TestCase::getNodeId)
|
.map(TestCase::getNodeId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
@ -167,7 +169,7 @@ public class TestCaseNodeService {
|
||||||
* @param nodeIds
|
* @param nodeIds
|
||||||
* @return 是否剪枝
|
* @return 是否剪枝
|
||||||
* */
|
* */
|
||||||
public boolean pruningTree(TestCaseNodeDTO rootNode, List<Integer> nodeIds) {
|
public boolean pruningTree(TestCaseNodeDTO rootNode, List<String> nodeIds) {
|
||||||
|
|
||||||
List<TestCaseNodeDTO> children = rootNode.getChildren();
|
List<TestCaseNodeDTO> children = rootNode.getChildren();
|
||||||
|
|
||||||
|
@ -200,11 +202,11 @@ public class TestCaseNodeService {
|
||||||
return getNodeTreeByProjectId(testPlan.getProjectId());
|
return getNodeTreeByProjectId(testPlan.getProjectId());
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Integer> createNodeByTestCases(List<TestCaseWithBLOBs> testCases, String projectId) {
|
public Map<String, String> createNodeByTestCases(List<TestCaseWithBLOBs> testCases, String projectId) {
|
||||||
|
|
||||||
List<TestCaseNodeDTO> nodeTrees = getNodeTreeByProjectId(projectId);
|
List<TestCaseNodeDTO> nodeTrees = getNodeTreeByProjectId(projectId);
|
||||||
|
|
||||||
Map<String, Integer> pathMap = new HashMap<>();
|
Map<String, String> pathMap = new HashMap<>();
|
||||||
|
|
||||||
List<String> nodePaths = testCases.stream()
|
List<String> nodePaths = testCases.stream()
|
||||||
.map(TestCase::getNodePath)
|
.map(TestCase::getNodePath)
|
||||||
|
@ -256,7 +258,7 @@ public class TestCaseNodeService {
|
||||||
* @param pathMap 记录节点路径对应的nodeId
|
* @param pathMap 记录节点路径对应的nodeId
|
||||||
*/
|
*/
|
||||||
private void createNodeByPathIterator(Iterator<String> pathIterator, String path, TestCaseNodeDTO treeNode,
|
private void createNodeByPathIterator(Iterator<String> pathIterator, String path, TestCaseNodeDTO treeNode,
|
||||||
Map<String, Integer> pathMap, String projectId, Integer level) {
|
Map<String, String> pathMap, String projectId, Integer level) {
|
||||||
|
|
||||||
List<TestCaseNodeDTO> children = treeNode.getChildren();
|
List<TestCaseNodeDTO> children = treeNode.getChildren();
|
||||||
|
|
||||||
|
@ -295,13 +297,13 @@ public class TestCaseNodeService {
|
||||||
*/
|
*/
|
||||||
private void createNodeByPath(Iterator<String> pathIterator, String nodeName,
|
private void createNodeByPath(Iterator<String> pathIterator, String nodeName,
|
||||||
TestCaseNodeDTO pNode, String projectId, Integer level,
|
TestCaseNodeDTO pNode, String projectId, Integer level,
|
||||||
String rootPath, Map<String, Integer> pathMap) {
|
String rootPath, Map<String, String> pathMap) {
|
||||||
|
|
||||||
StringBuilder path = new StringBuilder(rootPath);
|
StringBuilder path = new StringBuilder(rootPath);
|
||||||
|
|
||||||
path.append("/" + nodeName);
|
path.append("/" + nodeName);
|
||||||
|
|
||||||
Integer pid = null;
|
String pid = null;
|
||||||
//创建过不创建
|
//创建过不创建
|
||||||
if (pathMap.get(path.toString()) != null) {
|
if (pathMap.get(path.toString()) != null) {
|
||||||
pid = pathMap.get(path.toString());
|
pid = pathMap.get(path.toString());
|
||||||
|
@ -324,14 +326,15 @@ public class TestCaseNodeService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Integer insertTestCaseNode(String nodeName, Integer pId, String projectId, Integer level) {
|
private String insertTestCaseNode(String nodeName, String pId, String projectId, Integer level) {
|
||||||
TestCaseNode testCaseNode = new TestCaseNode();
|
TestCaseNode testCaseNode = new TestCaseNode();
|
||||||
testCaseNode.setName(nodeName.trim());
|
testCaseNode.setName(nodeName.trim());
|
||||||
testCaseNode.setPId(pId);
|
testCaseNode.setParentId(pId);
|
||||||
testCaseNode.setProjectId(projectId);
|
testCaseNode.setProjectId(projectId);
|
||||||
testCaseNode.setCreateTime(System.currentTimeMillis());
|
testCaseNode.setCreateTime(System.currentTimeMillis());
|
||||||
testCaseNode.setUpdateTime(System.currentTimeMillis());
|
testCaseNode.setUpdateTime(System.currentTimeMillis());
|
||||||
testCaseNode.setLevel(level);
|
testCaseNode.setLevel(level);
|
||||||
|
testCaseNode.setId(UUID.randomUUID().toString());
|
||||||
testCaseNodeMapper.insert(testCaseNode);
|
testCaseNodeMapper.insert(testCaseNode);
|
||||||
return testCaseNode.getId();
|
return testCaseNode.getId();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,22 @@
|
||||||
package io.metersphere.service;
|
package io.metersphere.service;
|
||||||
|
|
||||||
import io.metersphere.base.domain.TestCaseReport;
|
import io.metersphere.base.domain.*;
|
||||||
import io.metersphere.base.domain.TestCaseReportExample;
|
import io.metersphere.base.mapper.*;
|
||||||
import io.metersphere.base.domain.TestCaseReportTemplate;
|
import io.metersphere.base.mapper.ext.ExtTestPlanMapper;
|
||||||
import io.metersphere.base.domain.TestPlan;
|
import io.metersphere.base.mapper.ext.ExtTestPlanTestCaseMapper;
|
||||||
import io.metersphere.base.mapper.TestCaseReportMapper;
|
|
||||||
import io.metersphere.base.mapper.TestCaseReportTemplateMapper;
|
|
||||||
import io.metersphere.base.mapper.TestPlanMapper;
|
|
||||||
import io.metersphere.commons.utils.BeanUtils;
|
import io.metersphere.commons.utils.BeanUtils;
|
||||||
import io.metersphere.controller.request.testCaseReport.CreateReportRequest;
|
import io.metersphere.controller.request.testCaseReport.CreateReportRequest;
|
||||||
|
import io.metersphere.controller.request.testcase.QueryTestPlanRequest;
|
||||||
|
import io.metersphere.dto.TestCaseNodeDTO;
|
||||||
|
import io.metersphere.dto.TestCaseReportMetricDTO;
|
||||||
|
import io.metersphere.dto.TestCaseReportResultDTO;
|
||||||
|
import io.metersphere.dto.TestPlanDTO;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@ -26,9 +28,24 @@ public class TestCaseReportService {
|
||||||
@Resource
|
@Resource
|
||||||
TestPlanMapper testPlanMapper;
|
TestPlanMapper testPlanMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ExtTestPlanMapper extTestPlanMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
TestCaseReportTemplateMapper testCaseReportTemplateMapper;
|
TestCaseReportTemplateMapper testCaseReportTemplateMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
TestCaseNodeService testCaseNodeService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
TestCaseNodeMapper testCaseNodeMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
ExtTestPlanTestCaseMapper extTestPlanTestCaseMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
TestPlanTestCaseMapper testPlanTestCaseMapper;
|
||||||
|
|
||||||
public List<TestCaseReport> listTestCaseReport(TestCaseReport request) {
|
public List<TestCaseReport> listTestCaseReport(TestCaseReport request) {
|
||||||
TestCaseReportExample example = new TestCaseReportExample();
|
TestCaseReportExample example = new TestCaseReportExample();
|
||||||
if ( StringUtils.isNotBlank(request.getName()) ) {
|
if ( StringUtils.isNotBlank(request.getName()) ) {
|
||||||
|
@ -37,33 +54,71 @@ public class TestCaseReportService {
|
||||||
return testCaseReportMapper.selectByExample(example);
|
return testCaseReportMapper.selectByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TestCaseReport getTestCaseReport(Long id) {
|
public TestCaseReport getTestCaseReport(String id) {
|
||||||
return testCaseReportMapper.selectByPrimaryKey(id);
|
return testCaseReportMapper.selectByPrimaryKey(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addTestCaseReport(TestCaseReport TestCaseReport) {
|
public void addTestCaseReport(TestCaseReport testCaseReport) {
|
||||||
testCaseReportMapper.insert(TestCaseReport);
|
testCaseReport.setId(UUID.randomUUID().toString());
|
||||||
|
testCaseReportMapper.insert(testCaseReport);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void editTestCaseReport(TestCaseReport TestCaseReport) {
|
public void editTestCaseReport(TestCaseReport TestCaseReport) {
|
||||||
testCaseReportMapper.updateByPrimaryKeyWithBLOBs(TestCaseReport);
|
testCaseReportMapper.updateByPrimaryKeyWithBLOBs(TestCaseReport);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int deleteTestCaseReport(Long id) {
|
public int deleteTestCaseReport(String id) {
|
||||||
return testCaseReportMapper.deleteByPrimaryKey(id);
|
return testCaseReportMapper.deleteByPrimaryKey(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long addTestCaseReportByTemplateId(CreateReportRequest request) {
|
public String addTestCaseReportByTemplateId(CreateReportRequest request) {
|
||||||
TestCaseReportTemplate template = testCaseReportTemplateMapper.selectByPrimaryKey(request.getTemplateId());
|
TestCaseReportTemplate template = testCaseReportTemplateMapper.selectByPrimaryKey(request.getTemplateId());
|
||||||
TestCaseReport report = new TestCaseReport();
|
TestCaseReport report = new TestCaseReport();
|
||||||
BeanUtils.copyBean(report, template);
|
BeanUtils.copyBean(report, template);
|
||||||
TestPlan testPlan = testPlanMapper.selectByPrimaryKey(request.getPlanId());
|
TestPlan testPlan = testPlanMapper.selectByPrimaryKey(request.getPlanId());
|
||||||
report.setName(testPlan.getName());
|
report.setName(testPlan.getName());
|
||||||
report.setId(null);
|
report.setId(UUID.randomUUID().toString());
|
||||||
testCaseReportMapper.insert(report);
|
testCaseReportMapper.insert(report);
|
||||||
testPlan.setReportId(report.getId());
|
testPlan.setReportId(report.getId());
|
||||||
testPlanMapper.updateByPrimaryKeySelective(testPlan);
|
testPlanMapper.updateByPrimaryKeySelective(testPlan);
|
||||||
return report.getId();
|
return report.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TestCaseReport getMetric(String planId) {
|
||||||
|
TestCaseReportMetricDTO testCaseReportMetricDTO = new TestCaseReportMetricDTO();
|
||||||
|
testCaseReportMetricDTO.setExecutors(extTestPlanTestCaseMapper.getExecutors(planId));
|
||||||
|
testCaseReportMetricDTO.setExecuteResult(extTestPlanTestCaseMapper.getReportMetric(planId));
|
||||||
|
|
||||||
|
QueryTestPlanRequest queryTestPlanRequest = new QueryTestPlanRequest();
|
||||||
|
queryTestPlanRequest.setId(planId);
|
||||||
|
TestPlanDTO testPlan = extTestPlanMapper.list(queryTestPlanRequest).get(0);
|
||||||
|
testCaseReportMetricDTO.setProjectName(testPlan.getProjectName());
|
||||||
|
testCaseReportMetricDTO.setPrincipal(testPlan.getPrincipal());
|
||||||
|
|
||||||
|
TestPlanTestCaseExample example = new TestPlanTestCaseExample();
|
||||||
|
example.createCriteria().andPlanIdEqualTo(planId);
|
||||||
|
List<TestPlanTestCase> testPlanTestCases = testPlanTestCaseMapper.selectByExample(example);
|
||||||
|
|
||||||
|
TestCaseNodeExample testCaseNodeExample = new TestCaseNodeExample();
|
||||||
|
testCaseNodeExample.createCriteria().andProjectIdEqualTo(testPlan.getProjectId());
|
||||||
|
List<TestCaseNode> nodes = testCaseNodeMapper.selectByExample(testCaseNodeExample);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private TestCaseReport get(List<TestCaseNode> nodes) {
|
||||||
|
|
||||||
|
// List<TestCaseNode> rootNode = new ArrayList<>();
|
||||||
|
// Map<String, List<String>> nodeMap = new HashMap<>();
|
||||||
|
// nodes.forEach(node -> {
|
||||||
|
// Integer level = node.getLevel();
|
||||||
|
// if (level == 1) {
|
||||||
|
// rootNode.add(node);
|
||||||
|
// ArrayList<Object> objects = new ArrayList<>();
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@ -37,11 +38,12 @@ public class TestCaseReportTemplateService {
|
||||||
return testCaseReportTemplateMapper.selectByExample(example);
|
return testCaseReportTemplateMapper.selectByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TestCaseReportTemplate getTestCaseReportTemplate(Long id) {
|
public TestCaseReportTemplate getTestCaseReportTemplate(String id) {
|
||||||
return testCaseReportTemplateMapper.selectByPrimaryKey(id);
|
return testCaseReportTemplateMapper.selectByPrimaryKey(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addTestCaseReportTemplate(TestCaseReportTemplate testCaseReportTemplate) {
|
public void addTestCaseReportTemplate(TestCaseReportTemplate testCaseReportTemplate) {
|
||||||
|
testCaseReportTemplate.setId(UUID.randomUUID().toString());
|
||||||
testCaseReportTemplateMapper.insert(testCaseReportTemplate);
|
testCaseReportTemplateMapper.insert(testCaseReportTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +51,7 @@ public class TestCaseReportTemplateService {
|
||||||
testCaseReportTemplateMapper.updateByPrimaryKeyWithBLOBs(testCaseReportTemplate);
|
testCaseReportTemplateMapper.updateByPrimaryKeyWithBLOBs(testCaseReportTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int deleteTestCaseReportTemplate(Long id) {
|
public int deleteTestCaseReportTemplate(String id) {
|
||||||
return testCaseReportTemplateMapper.deleteByPrimaryKey(id);
|
return testCaseReportTemplateMapper.deleteByPrimaryKey(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class TestCaseService {
|
||||||
testCaseMapper.insert(testCase);
|
testCaseMapper.insert(testCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TestCase> getTestCaseByNodeId(List<Integer> nodeIds) {
|
public List<TestCase> getTestCaseByNodeId(List<String> nodeIds) {
|
||||||
TestCaseExample testCaseExample = new TestCaseExample();
|
TestCaseExample testCaseExample = new TestCaseExample();
|
||||||
testCaseExample.createCriteria().andNodeIdIn(nodeIds);
|
testCaseExample.createCriteria().andNodeIdIn(nodeIds);
|
||||||
return testCaseMapper.selectByExample(testCaseExample);
|
return testCaseMapper.selectByExample(testCaseExample);
|
||||||
|
@ -95,6 +95,9 @@ public class TestCaseService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int deleteTestCase(String testCaseId) {
|
public int deleteTestCase(String testCaseId) {
|
||||||
|
TestPlanTestCaseExample example = new TestPlanTestCaseExample();
|
||||||
|
example.createCriteria().andCaseIdEqualTo(testCaseId);
|
||||||
|
testPlanTestCaseMapper.deleteByExample(example);
|
||||||
return testCaseMapper.deleteByPrimaryKey(testCaseId);
|
return testCaseMapper.deleteByPrimaryKey(testCaseId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,7 +222,7 @@ public class TestCaseService {
|
||||||
|
|
||||||
public void saveImportData(List<TestCaseWithBLOBs> testCases, String projectId) {
|
public void saveImportData(List<TestCaseWithBLOBs> testCases, String projectId) {
|
||||||
|
|
||||||
Map<String, Integer> nodePathMap = testCaseNodeService.createNodeByTestCases(testCases, projectId);
|
Map<String, String> nodePathMap = testCaseNodeService.createNodeByTestCases(testCases, projectId);
|
||||||
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
||||||
TestCaseMapper mapper = sqlSession.getMapper(TestCaseMapper.class);
|
TestCaseMapper mapper = sqlSession.getMapper(TestCaseMapper.class);
|
||||||
if (!testCases.isEmpty()) {
|
if (!testCases.isEmpty()) {
|
||||||
|
|
|
@ -52,7 +52,6 @@ public class TestPlanService {
|
||||||
testPlanMapper.insert(testPlan);
|
testPlanMapper.insert(testPlan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public TestPlan getTestPlan(String testPlanId) {
|
public TestPlan getTestPlan(String testPlanId) {
|
||||||
return testPlanMapper.selectByPrimaryKey(testPlanId);
|
return testPlanMapper.selectByPrimaryKey(testPlanId);
|
||||||
}
|
}
|
||||||
|
@ -99,6 +98,7 @@ public class TestPlanService {
|
||||||
testCaseIds.forEach(caseId -> {
|
testCaseIds.forEach(caseId -> {
|
||||||
TestCaseWithBLOBs testCase = testCaseMap.get(caseId);
|
TestCaseWithBLOBs testCase = testCaseMap.get(caseId);
|
||||||
TestPlanTestCase testPlanTestCase = new TestPlanTestCase();
|
TestPlanTestCase testPlanTestCase = new TestPlanTestCase();
|
||||||
|
testPlanTestCase.setId(UUID.randomUUID().toString());
|
||||||
testPlanTestCase.setExecutor(testCase.getMaintainer());
|
testPlanTestCase.setExecutor(testCase.getMaintainer());
|
||||||
testPlanTestCase.setCaseId(caseId);
|
testPlanTestCase.setCaseId(caseId);
|
||||||
testPlanTestCase.setCreateTime(System.currentTimeMillis());
|
testPlanTestCase.setCreateTime(System.currentTimeMillis());
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class TestPlanTestCaseService {
|
||||||
testPlanTestCaseMapper.updateByPrimaryKeySelective(testPlanTestCase);
|
testPlanTestCaseMapper.updateByPrimaryKeySelective(testPlanTestCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int deleteTestCase(Integer id) {
|
public int deleteTestCase(String id) {
|
||||||
return testPlanTestCaseMapper.deleteByPrimaryKey(id);
|
return testPlanTestCaseMapper.deleteByPrimaryKey(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -260,7 +260,7 @@ CREATE TABLE IF NOT EXISTS `test_plan` (
|
||||||
`id` varchar(50) NOT NULL COMMENT 'Test Plan ID',
|
`id` varchar(50) NOT NULL COMMENT 'Test Plan ID',
|
||||||
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this plan belongs to',
|
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this plan belongs to',
|
||||||
`workspace_id` varchar(50) NOT NULL COMMENT 'Workspace ID this plan belongs to',
|
`workspace_id` varchar(50) NOT NULL COMMENT 'Workspace ID this plan belongs to',
|
||||||
`report_id` bigint(20) COMMENT 'Test plan report',
|
`report_id` varchar(50) COMMENT 'Test plan report',
|
||||||
`name` varchar(64) NOT NULL COMMENT 'Plan name',
|
`name` varchar(64) NOT NULL COMMENT 'Plan name',
|
||||||
`description` varchar(255) DEFAULT NULL COMMENT 'Plan description',
|
`description` varchar(255) DEFAULT NULL COMMENT 'Plan description',
|
||||||
`status` varchar(20) NOT NULL COMMENT 'Plan status',
|
`status` varchar(20) NOT NULL COMMENT 'Plan status',
|
||||||
|
@ -279,15 +279,15 @@ CREATE TABLE IF NOT EXISTS `test_plan` (
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `test_case_node` (
|
CREATE TABLE IF NOT EXISTS `test_case_node` (
|
||||||
`id` int(13) PRIMARY KEY AUTO_INCREMENT COMMENT 'Test case node ID',
|
`id` varchar(50) NOT NULL COMMENT 'Test case node ID',
|
||||||
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this node belongs to',
|
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this node belongs to',
|
||||||
`name` varchar(64) NOT NULL COMMENT 'Node name',
|
`name` varchar(64) NOT NULL COMMENT 'Node name',
|
||||||
`p_id` int(13) DEFAULT NULL COMMENT 'Parent node ID',
|
`parent_id` varchar(50) DEFAULT NULL COMMENT 'Parent node ID',
|
||||||
`level` int(10) DEFAULT 1 COMMENT 'Node level',
|
`level` int(10) DEFAULT 1 COMMENT 'Node level',
|
||||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp'
|
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
)
|
)
|
||||||
AUTO_INCREMENT = 1
|
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
DEFAULT CHARSET = utf8mb4
|
DEFAULT CHARSET = utf8mb4
|
||||||
COLLATE = utf8mb4_bin;
|
COLLATE = utf8mb4_bin;
|
||||||
|
@ -295,7 +295,7 @@ CREATE TABLE IF NOT EXISTS `test_case_node` (
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `test_case` (
|
CREATE TABLE IF NOT EXISTS `test_case` (
|
||||||
`id` varchar(50) NOT NULL COMMENT 'Test case ID',
|
`id` varchar(50) NOT NULL COMMENT 'Test case ID',
|
||||||
`node_id` int(13) NOT NULL COMMENT 'Node ID this case belongs to',
|
`node_id` varchar(50) NOT NULL COMMENT 'Node ID this case belongs to',
|
||||||
`node_path` varchar(50) NOT NULL COMMENT 'Node path this case belongs to',
|
`node_path` varchar(50) NOT NULL COMMENT 'Node path this case belongs to',
|
||||||
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this test belongs to',
|
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this test belongs to',
|
||||||
`name` varchar(64) NOT NULL COMMENT 'Case name',
|
`name` varchar(64) NOT NULL COMMENT 'Case name',
|
||||||
|
@ -316,7 +316,7 @@ CREATE TABLE IF NOT EXISTS `test_case` (
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `test_plan_test_case` (
|
CREATE TABLE IF NOT EXISTS `test_plan_test_case` (
|
||||||
`id` int(13) PRIMARY KEY AUTO_INCREMENT COMMENT 'ID',
|
`id` varchar(50) NOT NULL COMMENT 'ID',
|
||||||
`plan_id` varchar(50) NOT NULL COMMENT 'Plan ID relation to',
|
`plan_id` varchar(50) NOT NULL COMMENT 'Plan ID relation to',
|
||||||
`case_id` varchar(50) NOT NULL COMMENT 'Case ID relation to',
|
`case_id` varchar(50) NOT NULL COMMENT 'Case ID relation to',
|
||||||
`executor` varchar(64) NOT NULL COMMENT 'Test case executor',
|
`executor` varchar(64) NOT NULL COMMENT 'Test case executor',
|
||||||
|
@ -324,15 +324,15 @@ CREATE TABLE IF NOT EXISTS `test_plan_test_case` (
|
||||||
`results` longtext COMMENT 'Test case result',
|
`results` longtext COMMENT 'Test case result',
|
||||||
`remark` varchar(255) DEFAULT NULL COMMENT 'Test case remark',
|
`remark` varchar(255) DEFAULT NULL COMMENT 'Test case remark',
|
||||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp'
|
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
)
|
)
|
||||||
AUTO_INCREMENT = 1
|
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
DEFAULT CHARSET = utf8mb4
|
DEFAULT CHARSET = utf8mb4
|
||||||
COLLATE = utf8mb4_bin;
|
COLLATE = utf8mb4_bin;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `test_case_report_template` (
|
CREATE TABLE IF NOT EXISTS `test_case_report_template` (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
`id` varchar(50) NOT NULL,
|
||||||
`name` varchar(64) NOT NULL COMMENT 'Test case report template name',
|
`name` varchar(64) NOT NULL COMMENT 'Test case report template name',
|
||||||
`workspace_id` varchar(50) DEFAULT NULL COMMENT 'Workspace ID this project belongs to',
|
`workspace_id` varchar(50) DEFAULT NULL COMMENT 'Workspace ID this project belongs to',
|
||||||
`content` longtext COMMENT 'Template content (JSON format)',
|
`content` longtext COMMENT 'Template content (JSON format)',
|
||||||
|
@ -343,7 +343,7 @@ CREATE TABLE IF NOT EXISTS `test_case_report_template` (
|
||||||
COLLATE=utf8mb4_bin;
|
COLLATE=utf8mb4_bin;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `test_case_report` (
|
CREATE TABLE IF NOT EXISTS `test_case_report` (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
`id` varchar(50) NOT NULL,
|
||||||
`name` varchar(64) NOT NULL COMMENT 'Test case report name',
|
`name` varchar(64) NOT NULL COMMENT 'Test case report name',
|
||||||
`content` longtext COMMENT 'Report content (JSON format)',
|
`content` longtext COMMENT 'Report content (JSON format)',
|
||||||
`start_time` bigint(13) COMMENT 'Test start time',
|
`start_time` bigint(13) COMMENT 'Test start time',
|
||||||
|
|
|
@ -10,4 +10,4 @@ INSERT INTO role (id, name, description, type, create_time, update_time) VALUES
|
||||||
INSERT INTO role (id, name, description, type, create_time, update_time) VALUES ('test_user', '测试人员', null, null, 1581576575948, 1581576575948);
|
INSERT INTO role (id, name, description, type, create_time, update_time) VALUES ('test_user', '测试人员', null, null, 1581576575948, 1581576575948);
|
||||||
INSERT INTO role (id, name, description, type, create_time, update_time) VALUES ('test_viewer', 'Viewer', null, null, 1581576575948, 1581576575948);
|
INSERT INTO role (id, name, description, type, create_time, update_time) VALUES ('test_viewer', 'Viewer', null, null, 1581576575948, 1581576575948);
|
||||||
|
|
||||||
INSERT INTO test_case_report_template (name,content) VALUES ("默认模版","{\"components\": [1,2,3,4,5]}");
|
INSERT INTO test_case_report_template (id,name,content) VALUES (uuid(), 'default','{\"components\": [1,2,3,4,5]}');
|
||||||
|
|
|
@ -60,14 +60,20 @@
|
||||||
<!--要生成的数据库表 -->
|
<!--要生成的数据库表 -->
|
||||||
|
|
||||||
<table tableName="test_plan"/>
|
<table tableName="test_plan"/>
|
||||||
|
<table tableName="test_case_node"/>
|
||||||
|
<table tableName="test_case"/>
|
||||||
|
<table tableName="test_plan_test_case"/>
|
||||||
|
<table tableName="test_case_report_template"/>
|
||||||
|
<table tableName="test_case_report"/>
|
||||||
|
|
||||||
<table tableName="test_case_report">
|
|
||||||
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<table tableName="test_case_report_template">
|
<!--<table tableName="test_case_node">-->
|
||||||
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
|
<!--<generatedKey column="id" sqlStatement="MySql" identity="true"/>-->
|
||||||
</table>
|
<!--</table>-->
|
||||||
|
|
||||||
|
<!--<table tableName="test_case_report_template">-->
|
||||||
|
<!--<generatedKey column="id" sqlStatement="MySql" identity="true"/>-->
|
||||||
|
<!--</table>-->
|
||||||
|
|
||||||
</context>
|
</context>
|
||||||
</generatorConfiguration>
|
</generatorConfiguration>
|
|
@ -266,8 +266,10 @@
|
||||||
if (this.selectNode.data) {
|
if (this.selectNode.data) {
|
||||||
this.form.module = this.selectNode.data.id;
|
this.form.module = this.selectNode.data.id;
|
||||||
} else {
|
} else {
|
||||||
|
if (this.moduleOptions.length > 0) {
|
||||||
this.form.module = this.moduleOptions[0].id;
|
this.form.module = this.moduleOptions[0].id;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
let user = JSON.parse(localStorage.getItem(TokenKey));
|
let user = JSON.parse(localStorage.getItem(TokenKey));
|
||||||
this.form.priority = 'P3';
|
this.form.priority = 'P3';
|
||||||
this.form.type = 'functional';
|
this.form.type = 'functional';
|
||||||
|
|
|
@ -53,6 +53,11 @@
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
treeNodes: {
|
||||||
|
type: Array
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open(type, data) {
|
open(type, data) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
@ -64,6 +69,7 @@
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = {};
|
let param = {};
|
||||||
let url = this.buildParam(param);
|
let url = this.buildParam(param);
|
||||||
|
|
||||||
this.$post(url, param, () => {
|
this.$post(url, param, () => {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
|
@ -74,19 +80,20 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
buildParam(param, ) {
|
buildParam(param) {
|
||||||
let url = '';
|
let url = '';
|
||||||
if (this.type === 'add') {
|
if (this.type === 'add') {
|
||||||
url = '/case/node/add';
|
url = '/case/node/add';
|
||||||
param.level = 1;
|
param.level = 1;
|
||||||
if (this.node) {
|
if (this.node) {
|
||||||
//非根节点
|
//非根节点
|
||||||
param.pId = this.node.id;
|
param.parentId = this.node.id;
|
||||||
param.level = this.node.level + 1;
|
param.level = this.node.level + 1;
|
||||||
}
|
}
|
||||||
} else if (this.type === 'edit') {
|
} else if (this.type === 'edit') {
|
||||||
url = '/case/node/edit';
|
url = '/case/node/edit';
|
||||||
param.id = this.node.id
|
param.id = this.node.id;
|
||||||
|
param.level = this.node.level;
|
||||||
}
|
}
|
||||||
param.name = this.form.name;
|
param.name = this.form.name;
|
||||||
param.label = this.form.name;
|
param.label = this.form.name;
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
|
||||||
<node-edit ref="nodeEdit" @refresh="refreshNode"/>
|
<node-edit ref="nodeEdit" :tree-nodes="treeNodes" @refresh="refreshNode"/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -92,14 +92,14 @@
|
||||||
let param = {};
|
let param = {};
|
||||||
param.id = draggingNode.data.id;
|
param.id = draggingNode.data.id;
|
||||||
if (dropType === 'inner') {
|
if (dropType === 'inner') {
|
||||||
param.pId = dropNode.data.id;
|
param.parentId = dropNode.data.id;
|
||||||
param.level = dropNode.data.level + 1;
|
param.level = dropNode.data.level + 1;
|
||||||
} else {
|
} else {
|
||||||
if (dropNode.parent.id === 0) {
|
if (dropNode.parent.id === 0) {
|
||||||
param.pId = 0;
|
param.parentId = 0;
|
||||||
param.level = 1;
|
param.level = 1;
|
||||||
} else {
|
} else {
|
||||||
param.pId = dropNode.parent.data.id;
|
param.parentId = dropNode.parent.data.id;
|
||||||
param.level = dropNode.parent.data.level + 1;
|
param.level = dropNode.parent.data.level + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
|
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:before-close="handleClose"
|
:before-close="handleClose"
|
||||||
:visible.sync="showDialog"
|
:visible.sync="showDialog"
|
||||||
|
|
|
@ -302,6 +302,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openReport(id) {
|
openReport(id) {
|
||||||
|
this.getTestPlanById();
|
||||||
if (!id) {
|
if (!id) {
|
||||||
id = this.testPlan.reportId;
|
id = this.testPlan.reportId;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue