From 77ebb2312703eeebb958c06c2ef9688a326c9975 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 16 Sep 2020 15:52:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/domain/TestCaseComment.java | 21 + .../base/domain/TestCaseCommentExample.java | 530 +++++++++++++ .../base/domain/TestCaseReview.java | 25 + .../base/domain/TestCaseReviewExample.java | 660 ++++++++++++++++ .../base/domain/TestCaseReviewProject.java | 13 + .../domain/TestCaseReviewProjectExample.java | 340 ++++++++ .../base/domain/TestCaseReviewTestCase.java | 25 + .../domain/TestCaseReviewTestCaseExample.java | 740 ++++++++++++++++++ .../base/domain/TestCaseReviewUsers.java | 13 + .../domain/TestCaseReviewUsersExample.java | 340 ++++++++ .../base/mapper/TestCaseCommentMapper.java | 36 + .../base/mapper/TestCaseCommentMapper.xml | 270 +++++++ .../base/mapper/TestCaseReviewMapper.java | 36 + .../base/mapper/TestCaseReviewMapper.xml | 304 +++++++ .../mapper/TestCaseReviewProjectMapper.java | 22 + .../mapper/TestCaseReviewProjectMapper.xml | 140 ++++ .../mapper/TestCaseReviewTestCaseMapper.java | 30 + .../mapper/TestCaseReviewTestCaseMapper.xml | 258 ++++++ .../mapper/TestCaseReviewUsersMapper.java | 22 + .../base/mapper/TestCaseReviewUsersMapper.xml | 140 ++++ 20 files changed, 3965 insertions(+) create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseComment.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseCommentExample.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReview.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReviewExample.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReviewProject.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReviewProjectExample.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReviewTestCase.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReviewTestCaseExample.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReviewUsers.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReviewUsersExample.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseCommentMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseCommentMapper.xml create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewMapper.xml create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewProjectMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewProjectMapper.xml create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewTestCaseMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewTestCaseMapper.xml create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewUsersMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewUsersMapper.xml diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseComment.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseComment.java new file mode 100644 index 0000000000..16bd29e7dd --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseComment.java @@ -0,0 +1,21 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class TestCaseComment implements Serializable { + private String id; + + private String caseId; + + private String author; + + private Long createTime; + + private Long updateTime; + + private String description; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseCommentExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseCommentExample.java new file mode 100644 index 0000000000..2164371f36 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseCommentExample.java @@ -0,0 +1,530 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseCommentExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseCommentExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNull() { + addCriterion("case_id is null"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNotNull() { + addCriterion("case_id is not null"); + return (Criteria) this; + } + + public Criteria andCaseIdEqualTo(String value) { + addCriterion("case_id =", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotEqualTo(String value) { + addCriterion("case_id <>", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThan(String value) { + addCriterion("case_id >", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThanOrEqualTo(String value) { + addCriterion("case_id >=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThan(String value) { + addCriterion("case_id <", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThanOrEqualTo(String value) { + addCriterion("case_id <=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLike(String value) { + addCriterion("case_id like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotLike(String value) { + addCriterion("case_id not like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdIn(List values) { + addCriterion("case_id in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotIn(List values) { + addCriterion("case_id not in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdBetween(String value1, String value2) { + addCriterion("case_id between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotBetween(String value1, String value2) { + addCriterion("case_id not between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andAuthorIsNull() { + addCriterion("author is null"); + return (Criteria) this; + } + + public Criteria andAuthorIsNotNull() { + addCriterion("author is not null"); + return (Criteria) this; + } + + public Criteria andAuthorEqualTo(String value) { + addCriterion("author =", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorNotEqualTo(String value) { + addCriterion("author <>", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorGreaterThan(String value) { + addCriterion("author >", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorGreaterThanOrEqualTo(String value) { + addCriterion("author >=", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorLessThan(String value) { + addCriterion("author <", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorLessThanOrEqualTo(String value) { + addCriterion("author <=", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorLike(String value) { + addCriterion("author like", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorNotLike(String value) { + addCriterion("author not like", value, "author"); + return (Criteria) this; + } + + public Criteria andAuthorIn(List values) { + addCriterion("author in", values, "author"); + return (Criteria) this; + } + + public Criteria andAuthorNotIn(List values) { + addCriterion("author not in", values, "author"); + return (Criteria) this; + } + + public Criteria andAuthorBetween(String value1, String value2) { + addCriterion("author between", value1, value2, "author"); + return (Criteria) this; + } + + public Criteria andAuthorNotBetween(String value1, String value2) { + addCriterion("author not between", value1, value2, "author"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReview.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReview.java new file mode 100644 index 0000000000..145cb42127 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReview.java @@ -0,0 +1,25 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class TestCaseReview implements Serializable { + private String id; + + private String name; + + private String creator; + + private String status; + + private Long createTime; + + private Long updateTime; + + private Long endTime; + + private String description; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewExample.java new file mode 100644 index 0000000000..551c4b23ae --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewExample.java @@ -0,0 +1,660 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseReviewExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseReviewExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCreatorIsNull() { + addCriterion("creator is null"); + return (Criteria) this; + } + + public Criteria andCreatorIsNotNull() { + addCriterion("creator is not null"); + return (Criteria) this; + } + + public Criteria andCreatorEqualTo(String value) { + addCriterion("creator =", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotEqualTo(String value) { + addCriterion("creator <>", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThan(String value) { + addCriterion("creator >", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThanOrEqualTo(String value) { + addCriterion("creator >=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThan(String value) { + addCriterion("creator <", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThanOrEqualTo(String value) { + addCriterion("creator <=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLike(String value) { + addCriterion("creator like", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotLike(String value) { + addCriterion("creator not like", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorIn(List values) { + addCriterion("creator in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotIn(List values) { + addCriterion("creator not in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorBetween(String value1, String value2) { + addCriterion("creator between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotBetween(String value1, String value2) { + addCriterion("creator not between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(Long value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(Long value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(Long value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(Long value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(Long value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(Long value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(Long value1, Long value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(Long value1, Long value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewProject.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewProject.java new file mode 100644 index 0000000000..413f253925 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewProject.java @@ -0,0 +1,13 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class TestCaseReviewProject implements Serializable { + private String reviewId; + + private String projectId; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewProjectExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewProjectExample.java new file mode 100644 index 0000000000..b3c6c998ed --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewProjectExample.java @@ -0,0 +1,340 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseReviewProjectExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseReviewProjectExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andReviewIdIsNull() { + addCriterion("review_id is null"); + return (Criteria) this; + } + + public Criteria andReviewIdIsNotNull() { + addCriterion("review_id is not null"); + return (Criteria) this; + } + + public Criteria andReviewIdEqualTo(String value) { + addCriterion("review_id =", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotEqualTo(String value) { + addCriterion("review_id <>", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdGreaterThan(String value) { + addCriterion("review_id >", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdGreaterThanOrEqualTo(String value) { + addCriterion("review_id >=", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLessThan(String value) { + addCriterion("review_id <", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLessThanOrEqualTo(String value) { + addCriterion("review_id <=", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLike(String value) { + addCriterion("review_id like", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotLike(String value) { + addCriterion("review_id not like", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdIn(List values) { + addCriterion("review_id in", values, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotIn(List values) { + addCriterion("review_id not in", values, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdBetween(String value1, String value2) { + addCriterion("review_id between", value1, value2, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotBetween(String value1, String value2) { + addCriterion("review_id not between", value1, value2, "reviewId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewTestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewTestCase.java new file mode 100644 index 0000000000..15644070e0 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewTestCase.java @@ -0,0 +1,25 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class TestCaseReviewTestCase implements Serializable { + private String id; + + private String reviewId; + + private String caseId; + + private String status; + + private String result; + + private String reviewer; + + private Long createTime; + + private Long updateTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewTestCaseExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewTestCaseExample.java new file mode 100644 index 0000000000..ac0827ab7e --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewTestCaseExample.java @@ -0,0 +1,740 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseReviewTestCaseExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseReviewTestCaseExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andReviewIdIsNull() { + addCriterion("review_id is null"); + return (Criteria) this; + } + + public Criteria andReviewIdIsNotNull() { + addCriterion("review_id is not null"); + return (Criteria) this; + } + + public Criteria andReviewIdEqualTo(String value) { + addCriterion("review_id =", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotEqualTo(String value) { + addCriterion("review_id <>", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdGreaterThan(String value) { + addCriterion("review_id >", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdGreaterThanOrEqualTo(String value) { + addCriterion("review_id >=", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLessThan(String value) { + addCriterion("review_id <", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLessThanOrEqualTo(String value) { + addCriterion("review_id <=", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLike(String value) { + addCriterion("review_id like", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotLike(String value) { + addCriterion("review_id not like", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdIn(List values) { + addCriterion("review_id in", values, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotIn(List values) { + addCriterion("review_id not in", values, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdBetween(String value1, String value2) { + addCriterion("review_id between", value1, value2, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotBetween(String value1, String value2) { + addCriterion("review_id not between", value1, value2, "reviewId"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNull() { + addCriterion("case_id is null"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNotNull() { + addCriterion("case_id is not null"); + return (Criteria) this; + } + + public Criteria andCaseIdEqualTo(String value) { + addCriterion("case_id =", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotEqualTo(String value) { + addCriterion("case_id <>", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThan(String value) { + addCriterion("case_id >", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThanOrEqualTo(String value) { + addCriterion("case_id >=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThan(String value) { + addCriterion("case_id <", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThanOrEqualTo(String value) { + addCriterion("case_id <=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLike(String value) { + addCriterion("case_id like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotLike(String value) { + addCriterion("case_id not like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdIn(List values) { + addCriterion("case_id in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotIn(List values) { + addCriterion("case_id not in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdBetween(String value1, String value2) { + addCriterion("case_id between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotBetween(String value1, String value2) { + addCriterion("case_id not between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andResultIsNull() { + addCriterion("`result` is null"); + return (Criteria) this; + } + + public Criteria andResultIsNotNull() { + addCriterion("`result` is not null"); + return (Criteria) this; + } + + public Criteria andResultEqualTo(String value) { + addCriterion("`result` =", value, "result"); + return (Criteria) this; + } + + public Criteria andResultNotEqualTo(String value) { + addCriterion("`result` <>", value, "result"); + return (Criteria) this; + } + + public Criteria andResultGreaterThan(String value) { + addCriterion("`result` >", value, "result"); + return (Criteria) this; + } + + public Criteria andResultGreaterThanOrEqualTo(String value) { + addCriterion("`result` >=", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLessThan(String value) { + addCriterion("`result` <", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLessThanOrEqualTo(String value) { + addCriterion("`result` <=", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLike(String value) { + addCriterion("`result` like", value, "result"); + return (Criteria) this; + } + + public Criteria andResultNotLike(String value) { + addCriterion("`result` not like", value, "result"); + return (Criteria) this; + } + + public Criteria andResultIn(List values) { + addCriterion("`result` in", values, "result"); + return (Criteria) this; + } + + public Criteria andResultNotIn(List values) { + addCriterion("`result` not in", values, "result"); + return (Criteria) this; + } + + public Criteria andResultBetween(String value1, String value2) { + addCriterion("`result` between", value1, value2, "result"); + return (Criteria) this; + } + + public Criteria andResultNotBetween(String value1, String value2) { + addCriterion("`result` not between", value1, value2, "result"); + return (Criteria) this; + } + + public Criteria andReviewerIsNull() { + addCriterion("reviewer is null"); + return (Criteria) this; + } + + public Criteria andReviewerIsNotNull() { + addCriterion("reviewer is not null"); + return (Criteria) this; + } + + public Criteria andReviewerEqualTo(String value) { + addCriterion("reviewer =", value, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerNotEqualTo(String value) { + addCriterion("reviewer <>", value, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerGreaterThan(String value) { + addCriterion("reviewer >", value, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerGreaterThanOrEqualTo(String value) { + addCriterion("reviewer >=", value, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerLessThan(String value) { + addCriterion("reviewer <", value, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerLessThanOrEqualTo(String value) { + addCriterion("reviewer <=", value, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerLike(String value) { + addCriterion("reviewer like", value, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerNotLike(String value) { + addCriterion("reviewer not like", value, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerIn(List values) { + addCriterion("reviewer in", values, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerNotIn(List values) { + addCriterion("reviewer not in", values, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerBetween(String value1, String value2) { + addCriterion("reviewer between", value1, value2, "reviewer"); + return (Criteria) this; + } + + public Criteria andReviewerNotBetween(String value1, String value2) { + addCriterion("reviewer not between", value1, value2, "reviewer"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewUsers.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewUsers.java new file mode 100644 index 0000000000..7c2f69a425 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewUsers.java @@ -0,0 +1,13 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class TestCaseReviewUsers implements Serializable { + private String reviewId; + + private String userId; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewUsersExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewUsersExample.java new file mode 100644 index 0000000000..dd2faedec8 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewUsersExample.java @@ -0,0 +1,340 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseReviewUsersExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseReviewUsersExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andReviewIdIsNull() { + addCriterion("review_id is null"); + return (Criteria) this; + } + + public Criteria andReviewIdIsNotNull() { + addCriterion("review_id is not null"); + return (Criteria) this; + } + + public Criteria andReviewIdEqualTo(String value) { + addCriterion("review_id =", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotEqualTo(String value) { + addCriterion("review_id <>", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdGreaterThan(String value) { + addCriterion("review_id >", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdGreaterThanOrEqualTo(String value) { + addCriterion("review_id >=", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLessThan(String value) { + addCriterion("review_id <", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLessThanOrEqualTo(String value) { + addCriterion("review_id <=", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdLike(String value) { + addCriterion("review_id like", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotLike(String value) { + addCriterion("review_id not like", value, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdIn(List values) { + addCriterion("review_id in", values, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotIn(List values) { + addCriterion("review_id not in", values, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdBetween(String value1, String value2) { + addCriterion("review_id between", value1, value2, "reviewId"); + return (Criteria) this; + } + + public Criteria andReviewIdNotBetween(String value1, String value2) { + addCriterion("review_id not between", value1, value2, "reviewId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(String value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(String value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(String value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(String value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(String value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(String value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLike(String value) { + addCriterion("user_id like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotLike(String value) { + addCriterion("user_id not like", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(String value1, String value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(String value1, String value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseCommentMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseCommentMapper.java new file mode 100644 index 0000000000..aa39a64b34 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseCommentMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseComment; +import io.metersphere.base.domain.TestCaseCommentExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseCommentMapper { + long countByExample(TestCaseCommentExample example); + + int deleteByExample(TestCaseCommentExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestCaseComment record); + + int insertSelective(TestCaseComment record); + + List selectByExampleWithBLOBs(TestCaseCommentExample example); + + List selectByExample(TestCaseCommentExample example); + + TestCaseComment selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestCaseComment record, @Param("example") TestCaseCommentExample example); + + int updateByExampleWithBLOBs(@Param("record") TestCaseComment record, @Param("example") TestCaseCommentExample example); + + int updateByExample(@Param("record") TestCaseComment record, @Param("example") TestCaseCommentExample example); + + int updateByPrimaryKeySelective(TestCaseComment record); + + int updateByPrimaryKeyWithBLOBs(TestCaseComment record); + + int updateByPrimaryKey(TestCaseComment record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseCommentMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseCommentMapper.xml new file mode 100644 index 0000000000..78217a13a7 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseCommentMapper.xml @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, case_id, author, create_time, update_time + + + description + + + + + + delete from test_case_comment + where id = #{id,jdbcType=VARCHAR} + + + delete from test_case_comment + + + + + + insert into test_case_comment (id, case_id, author, + create_time, update_time, description + ) + values (#{id,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR} + ) + + + insert into test_case_comment + + + id, + + + case_id, + + + author, + + + create_time, + + + update_time, + + + description, + + + + + #{id,jdbcType=VARCHAR}, + + + #{caseId,jdbcType=VARCHAR}, + + + #{author,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{description,jdbcType=LONGVARCHAR}, + + + + + + update test_case_comment + + + id = #{record.id,jdbcType=VARCHAR}, + + + case_id = #{record.caseId,jdbcType=VARCHAR}, + + + author = #{record.author,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=LONGVARCHAR}, + + + + + + + + update test_case_comment + set id = #{record.id,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + author = #{record.author,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + description = #{record.description,jdbcType=LONGVARCHAR} + + + + + + update test_case_comment + set id = #{record.id,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + author = #{record.author,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update test_case_comment + + + case_id = #{caseId,jdbcType=VARCHAR}, + + + author = #{author,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + description = #{description,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_case_comment + set case_id = #{caseId,jdbcType=VARCHAR}, + author = #{author,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + description = #{description,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update test_case_comment + set case_id = #{caseId,jdbcType=VARCHAR}, + author = #{author,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewMapper.java new file mode 100644 index 0000000000..294924e964 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseReview; +import io.metersphere.base.domain.TestCaseReviewExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseReviewMapper { + long countByExample(TestCaseReviewExample example); + + int deleteByExample(TestCaseReviewExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestCaseReview record); + + int insertSelective(TestCaseReview record); + + List selectByExampleWithBLOBs(TestCaseReviewExample example); + + List selectByExample(TestCaseReviewExample example); + + TestCaseReview selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestCaseReview record, @Param("example") TestCaseReviewExample example); + + int updateByExampleWithBLOBs(@Param("record") TestCaseReview record, @Param("example") TestCaseReviewExample example); + + int updateByExample(@Param("record") TestCaseReview record, @Param("example") TestCaseReviewExample example); + + int updateByPrimaryKeySelective(TestCaseReview record); + + int updateByPrimaryKeyWithBLOBs(TestCaseReview record); + + int updateByPrimaryKey(TestCaseReview record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewMapper.xml new file mode 100644 index 0000000000..54c5352f42 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewMapper.xml @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, creator, `status`, create_time, update_time, end_time + + + description + + + + + + delete from test_case_review + where id = #{id,jdbcType=VARCHAR} + + + delete from test_case_review + + + + + + insert into test_case_review (id, `name`, creator, + `status`, create_time, update_time, + end_time, description) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{endTime,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR}) + + + insert into test_case_review + + + id, + + + `name`, + + + creator, + + + `status`, + + + create_time, + + + update_time, + + + end_time, + + + description, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{creator,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + #{description,jdbcType=LONGVARCHAR}, + + + + + + update test_case_review + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + creator = #{record.creator,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + description = #{record.description,jdbcType=LONGVARCHAR}, + + + + + + + + update test_case_review + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + creator = #{record.creator,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, + description = #{record.description,jdbcType=LONGVARCHAR} + + + + + + update test_case_review + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + creator = #{record.creator,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT} + + + + + + update test_case_review + + + `name` = #{name,jdbcType=VARCHAR}, + + + creator = #{creator,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + description = #{description,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_case_review + set `name` = #{name,jdbcType=VARCHAR}, + creator = #{creator,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, + description = #{description,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update test_case_review + set `name` = #{name,jdbcType=VARCHAR}, + creator = #{creator,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewProjectMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewProjectMapper.java new file mode 100644 index 0000000000..840b7287c2 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewProjectMapper.java @@ -0,0 +1,22 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseReviewProject; +import io.metersphere.base.domain.TestCaseReviewProjectExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseReviewProjectMapper { + long countByExample(TestCaseReviewProjectExample example); + + int deleteByExample(TestCaseReviewProjectExample example); + + int insert(TestCaseReviewProject record); + + int insertSelective(TestCaseReviewProject record); + + List selectByExample(TestCaseReviewProjectExample example); + + int updateByExampleSelective(@Param("record") TestCaseReviewProject record, @Param("example") TestCaseReviewProjectExample example); + + int updateByExample(@Param("record") TestCaseReviewProject record, @Param("example") TestCaseReviewProjectExample example); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewProjectMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewProjectMapper.xml new file mode 100644 index 0000000000..8c8bb30db8 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewProjectMapper.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + review_id, project_id + + + + delete from test_case_review_project + + + + + + insert into test_case_review_project (review_id, project_id) + values (#{reviewId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}) + + + insert into test_case_review_project + + + review_id, + + + project_id, + + + + + #{reviewId,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + + + + update test_case_review_project + + + review_id = #{record.reviewId,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + + + + + + update test_case_review_project + set review_id = #{record.reviewId,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewTestCaseMapper.java new file mode 100644 index 0000000000..1edffb5ea7 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewTestCaseMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseReviewTestCase; +import io.metersphere.base.domain.TestCaseReviewTestCaseExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseReviewTestCaseMapper { + long countByExample(TestCaseReviewTestCaseExample example); + + int deleteByExample(TestCaseReviewTestCaseExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestCaseReviewTestCase record); + + int insertSelective(TestCaseReviewTestCase record); + + List selectByExample(TestCaseReviewTestCaseExample example); + + TestCaseReviewTestCase selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestCaseReviewTestCase record, @Param("example") TestCaseReviewTestCaseExample example); + + int updateByExample(@Param("record") TestCaseReviewTestCase record, @Param("example") TestCaseReviewTestCaseExample example); + + int updateByPrimaryKeySelective(TestCaseReviewTestCase record); + + int updateByPrimaryKey(TestCaseReviewTestCase record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewTestCaseMapper.xml new file mode 100644 index 0000000000..e04fd76189 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewTestCaseMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, review_id, case_id, `status`, `result`, reviewer, create_time, update_time + + + + + delete from test_case_review_test_case + where id = #{id,jdbcType=VARCHAR} + + + delete from test_case_review_test_case + + + + + + insert into test_case_review_test_case (id, review_id, case_id, + `status`, `result`, reviewer, + create_time, update_time) + values (#{id,jdbcType=VARCHAR}, #{reviewId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{reviewer,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}) + + + insert into test_case_review_test_case + + + id, + + + review_id, + + + case_id, + + + `status`, + + + `result`, + + + reviewer, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{reviewId,jdbcType=VARCHAR}, + + + #{caseId,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{result,jdbcType=VARCHAR}, + + + #{reviewer,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update test_case_review_test_case + + + id = #{record.id,jdbcType=VARCHAR}, + + + review_id = #{record.reviewId,jdbcType=VARCHAR}, + + + case_id = #{record.caseId,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + `result` = #{record.result,jdbcType=VARCHAR}, + + + reviewer = #{record.reviewer,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update test_case_review_test_case + set id = #{record.id,jdbcType=VARCHAR}, + review_id = #{record.reviewId,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + `result` = #{record.result,jdbcType=VARCHAR}, + reviewer = #{record.reviewer,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update test_case_review_test_case + + + review_id = #{reviewId,jdbcType=VARCHAR}, + + + case_id = #{caseId,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + `result` = #{result,jdbcType=VARCHAR}, + + + reviewer = #{reviewer,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_case_review_test_case + set review_id = #{reviewId,jdbcType=VARCHAR}, + case_id = #{caseId,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + `result` = #{result,jdbcType=VARCHAR}, + reviewer = #{reviewer,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewUsersMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewUsersMapper.java new file mode 100644 index 0000000000..42920bf3ff --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewUsersMapper.java @@ -0,0 +1,22 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseReviewUsers; +import io.metersphere.base.domain.TestCaseReviewUsersExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseReviewUsersMapper { + long countByExample(TestCaseReviewUsersExample example); + + int deleteByExample(TestCaseReviewUsersExample example); + + int insert(TestCaseReviewUsers record); + + int insertSelective(TestCaseReviewUsers record); + + List selectByExample(TestCaseReviewUsersExample example); + + int updateByExampleSelective(@Param("record") TestCaseReviewUsers record, @Param("example") TestCaseReviewUsersExample example); + + int updateByExample(@Param("record") TestCaseReviewUsers record, @Param("example") TestCaseReviewUsersExample example); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewUsersMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewUsersMapper.xml new file mode 100644 index 0000000000..ca035d005d --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewUsersMapper.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + review_id, user_id + + + + delete from test_case_review_users + + + + + + insert into test_case_review_users (review_id, user_id) + values (#{reviewId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}) + + + insert into test_case_review_users + + + review_id, + + + user_id, + + + + + #{reviewId,jdbcType=VARCHAR}, + + + #{userId,jdbcType=VARCHAR}, + + + + + + update test_case_review_users + + + review_id = #{record.reviewId,jdbcType=VARCHAR}, + + + user_id = #{record.userId,jdbcType=VARCHAR}, + + + + + + + + update test_case_review_users + set review_id = #{record.reviewId,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=VARCHAR} + + + + + \ No newline at end of file From 92f91fcb48a586f9a03e41fdaa2bbedd90185b84 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 17 Sep 2020 18:03:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):?= =?UTF-8?q?=20=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1CURD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/ext/ExtTestCaseReviewMapper.java | 14 + .../mapper/ext/ExtTestCaseReviewMapper.xml | 30 +++ .../constants/TestCaseReviewStatus.java | 5 + .../controller/TestCaseReviewController.java | 73 ++++++ .../track/dto/TestCaseReviewDTO.java | 13 + .../testreview/QueryCaseReviewRequest.java | 14 + .../testreview/SaveTestCaseReviewRequest.java | 14 + .../track/service/TestCaseReviewService.java | 150 +++++++++++ .../common/components/MsTipButton.vue | 1 + .../track/head/TrackHeaderMenus.vue | 24 +- .../track/review/TestCaseReview.vue | 63 +++++ .../review/components/TestCaseReviewEdit.vue | 245 ++++++++++++++++++ .../review/components/TestCaseReviewList.vue | 227 ++++++++++++++++ .../src/business/components/track/router.js | 8 +- 14 files changed, 878 insertions(+), 3 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.xml create mode 100644 backend/src/main/java/io/metersphere/commons/constants/TestCaseReviewStatus.java create mode 100644 backend/src/main/java/io/metersphere/track/controller/TestCaseReviewController.java create mode 100644 backend/src/main/java/io/metersphere/track/dto/TestCaseReviewDTO.java create mode 100644 backend/src/main/java/io/metersphere/track/request/testreview/QueryCaseReviewRequest.java create mode 100644 backend/src/main/java/io/metersphere/track/request/testreview/SaveTestCaseReviewRequest.java create mode 100644 backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java create mode 100644 frontend/src/business/components/track/review/TestCaseReview.vue create mode 100644 frontend/src/business/components/track/review/components/TestCaseReviewEdit.vue create mode 100644 frontend/src/business/components/track/review/components/TestCaseReviewList.vue diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.java new file mode 100644 index 0000000000..071827642b --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.java @@ -0,0 +1,14 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.track.dto.TestCaseReviewDTO; +import io.metersphere.track.request.testreview.QueryCaseReviewRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ExtTestCaseReviewMapper { + + List list(@Param("request") QueryCaseReviewRequest params); + + List listByWorkspaceId(@Param("workspaceId") String workspaceId); +} diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.xml new file mode 100644 index 0000000000..7c1d2986ce --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseReviewMapper.xml @@ -0,0 +1,30 @@ + + + + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/commons/constants/TestCaseReviewStatus.java b/backend/src/main/java/io/metersphere/commons/constants/TestCaseReviewStatus.java new file mode 100644 index 0000000000..2903628417 --- /dev/null +++ b/backend/src/main/java/io/metersphere/commons/constants/TestCaseReviewStatus.java @@ -0,0 +1,5 @@ +package io.metersphere.commons.constants; + +public enum TestCaseReviewStatus { + Prepare, Underway, Completed +} diff --git a/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewController.java b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewController.java new file mode 100644 index 0000000000..211c63a4f9 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/controller/TestCaseReviewController.java @@ -0,0 +1,73 @@ +package io.metersphere.track.controller; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import io.metersphere.base.domain.Project; +import io.metersphere.base.domain.TestCaseReview; +import io.metersphere.base.domain.User; +import io.metersphere.commons.constants.RoleConstants; +import io.metersphere.commons.utils.PageUtils; +import io.metersphere.commons.utils.Pager; +import io.metersphere.commons.utils.SessionUtils; +import io.metersphere.track.dto.TestCaseReviewDTO; +import io.metersphere.track.request.testreview.QueryCaseReviewRequest; +import io.metersphere.track.request.testreview.SaveTestCaseReviewRequest; +import io.metersphere.track.service.TestCaseReviewService; +import org.apache.shiro.authz.annotation.Logical; +import org.apache.shiro.authz.annotation.RequiresRoles; +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import java.util.List; + +@RequestMapping("/test/case/review") +@RestController +public class TestCaseReviewController { + + @Resource + TestCaseReviewService testCaseReviewService; + + @PostMapping("/list/{goPage}/{pageSize}") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryCaseReviewRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + return PageUtils.setPageInfo(page, testCaseReviewService.listCaseReview(request)); + } + + @PostMapping("/save") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public void saveCaseReview(@RequestBody SaveTestCaseReviewRequest reviewRequest) { + testCaseReviewService.saveTestCaseReview(reviewRequest); + } + + @PostMapping("/project") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public List getProjectByReviewId(@RequestBody TestCaseReview request) { + return testCaseReviewService.getProjectByReviewId(request); + } + + @PostMapping("/reviewer") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public List getUserByReviewId(@RequestBody TestCaseReview request) { + return testCaseReviewService.getUserByReviewId(request); + } + + @GetMapping("/recent/{count}") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public List recentTestPlans(@PathVariable int count) { + String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId(); + PageHelper.startPage(1, count, true); + return testCaseReviewService.recent(currentWorkspaceId); + } + + @PostMapping("/edit") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public void editCaseReview(@RequestBody TestCaseReview testCaseReview) { + testCaseReviewService.editCaseReview(testCaseReview); + } + + @GetMapping("/delete/{reviewId}") + @RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR) + public void deleteCaseReview(@PathVariable String reviewId) { + testCaseReviewService.deleteCaseReview(reviewId); + } +} diff --git a/backend/src/main/java/io/metersphere/track/dto/TestCaseReviewDTO.java b/backend/src/main/java/io/metersphere/track/dto/TestCaseReviewDTO.java new file mode 100644 index 0000000000..5e85f82850 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/dto/TestCaseReviewDTO.java @@ -0,0 +1,13 @@ +package io.metersphere.track.dto; + +import io.metersphere.base.domain.TestCaseReview; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class TestCaseReviewDTO extends TestCaseReview { + + private String projectName; + private String reviewerName; +} diff --git a/backend/src/main/java/io/metersphere/track/request/testreview/QueryCaseReviewRequest.java b/backend/src/main/java/io/metersphere/track/request/testreview/QueryCaseReviewRequest.java new file mode 100644 index 0000000000..d93f0c54c7 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/request/testreview/QueryCaseReviewRequest.java @@ -0,0 +1,14 @@ +package io.metersphere.track.request.testreview; + +import io.metersphere.base.domain.TestCaseReview; +import io.metersphere.controller.request.OrderRequest; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class QueryCaseReviewRequest extends TestCaseReview { + private List orders; +} diff --git a/backend/src/main/java/io/metersphere/track/request/testreview/SaveTestCaseReviewRequest.java b/backend/src/main/java/io/metersphere/track/request/testreview/SaveTestCaseReviewRequest.java new file mode 100644 index 0000000000..32efe54542 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/request/testreview/SaveTestCaseReviewRequest.java @@ -0,0 +1,14 @@ +package io.metersphere.track.request.testreview; + +import io.metersphere.base.domain.TestCaseReview; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class SaveTestCaseReviewRequest extends TestCaseReview { + private List projectIds; + private List userIds; +} diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java new file mode 100644 index 0000000000..acf0e76f53 --- /dev/null +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java @@ -0,0 +1,150 @@ +package io.metersphere.track.service; + +import io.metersphere.base.domain.*; +import io.metersphere.base.mapper.*; +import io.metersphere.base.mapper.ext.ExtTestCaseReviewMapper; +import io.metersphere.commons.constants.TestCaseReviewStatus; +import io.metersphere.commons.exception.MSException; +import io.metersphere.commons.utils.ServiceUtils; +import io.metersphere.commons.utils.SessionUtils; +import io.metersphere.track.dto.TestCaseReviewDTO; +import io.metersphere.track.request.testreview.QueryCaseReviewRequest; +import io.metersphere.track.request.testreview.SaveTestCaseReviewRequest; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import javax.annotation.Resource; +import java.util.List; +import java.util.UUID; +import java.util.stream.Collectors; + +@Service +@Transactional(rollbackFor = Exception.class) +public class TestCaseReviewService { + + @Resource + private TestCaseReviewProjectMapper testCaseReviewProjectMapper; + @Resource + private TestCaseReviewUsersMapper testCaseReviewUsersMapper; + @Resource + private TestCaseReviewMapper testCaseReviewMapper; + @Resource + private ExtTestCaseReviewMapper extTestCaseReviewMapper; + @Resource + private ProjectMapper projectMapper; + @Resource + private UserMapper userMapper; + + public void saveTestCaseReview(SaveTestCaseReviewRequest reviewRequest) { + checkCaseReviewExist(reviewRequest); + + String reviewId = UUID.randomUUID().toString(); + List projectIds = reviewRequest.getProjectIds(); + List userIds = reviewRequest.getUserIds(); + + projectIds.forEach(projectId -> { + TestCaseReviewProject testCaseReviewProject = new TestCaseReviewProject(); + testCaseReviewProject.setProjectId(projectId); + testCaseReviewProject.setReviewId(reviewId); + testCaseReviewProjectMapper.insertSelective(testCaseReviewProject); + }); + + userIds.forEach(userId -> { + TestCaseReviewUsers testCaseReviewUsers = new TestCaseReviewUsers(); + testCaseReviewUsers.setReviewId(reviewId); + testCaseReviewUsers.setUserId(userId); + testCaseReviewUsersMapper.insert(testCaseReviewUsers); + }); + + reviewRequest.setId(reviewId); + reviewRequest.setCreateTime(System.currentTimeMillis()); + reviewRequest.setUpdateTime(System.currentTimeMillis()); + reviewRequest.setCreator(SessionUtils.getUser().getId()); + reviewRequest.setStatus(TestCaseReviewStatus.Prepare.name()); + testCaseReviewMapper.insert(reviewRequest); + } + + public List listCaseReview(QueryCaseReviewRequest request) { + request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders())); + return extTestCaseReviewMapper.list(request); + } + + public List getProjectByReviewId(TestCaseReview request) { + String reviewId = request.getId(); + + TestCaseReviewProjectExample testCaseReviewProjectExample = new TestCaseReviewProjectExample(); + testCaseReviewProjectExample.createCriteria().andReviewIdEqualTo(reviewId); + List testCaseReviewProject = testCaseReviewProjectMapper.selectByExample(testCaseReviewProjectExample); + + List projectIds = testCaseReviewProject + .stream() + .map(TestCaseReviewProject::getProjectId) + .collect(Collectors.toList()); + + ProjectExample projectExample = new ProjectExample(); + projectExample.createCriteria().andIdIn(projectIds); + return projectMapper.selectByExample(projectExample); + } + + public List getUserByReviewId(TestCaseReview request) { + String reviewId = request.getId(); + + TestCaseReviewUsersExample testCaseReviewUsersExample = new TestCaseReviewUsersExample(); + testCaseReviewUsersExample.createCriteria().andReviewIdEqualTo(reviewId); + List testCaseReviewUsers = testCaseReviewUsersMapper.selectByExample(testCaseReviewUsersExample); + + List userIds = testCaseReviewUsers + .stream() + .map(TestCaseReviewUsers::getUserId) + .collect(Collectors.toList()); + + UserExample userExample = new UserExample(); + userExample.createCriteria().andIdIn(userIds); + return userMapper.selectByExample(userExample); + } + + public List recent(String currentWorkspaceId) { + return extTestCaseReviewMapper.listByWorkspaceId(currentWorkspaceId); + } + + public void editCaseReview(TestCaseReview testCaseReview) { + testCaseReview.setUpdateTime(System.currentTimeMillis()); + checkCaseReviewExist(testCaseReview); + testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview); + } + + private void checkCaseReviewExist(TestCaseReview testCaseReview) { + if (testCaseReview.getName() != null) { + TestCaseReviewExample example = new TestCaseReviewExample(); + TestCaseReviewExample.Criteria criteria = example + .createCriteria() + .andNameEqualTo(testCaseReview.getName()); + + if (StringUtils.isNotBlank(testCaseReview.getId())) { + criteria.andIdNotEqualTo(testCaseReview.getId()); + } + + if (testCaseReviewMapper.selectByExample(example).size() > 0) { + MSException.throwException("评审名称已存在"); + } + } + } + + public void deleteCaseReview(String reviewId) { + deleteCaseReviewProject(reviewId); + deleteCaseReviewUsers(reviewId); + testCaseReviewMapper.deleteByPrimaryKey(reviewId); + } + + private void deleteCaseReviewProject(String reviewId) { + TestCaseReviewProjectExample testCaseReviewProjectExample = new TestCaseReviewProjectExample(); + testCaseReviewProjectExample.createCriteria().andReviewIdEqualTo(reviewId); + testCaseReviewProjectMapper.deleteByExample(testCaseReviewProjectExample); + } + + private void deleteCaseReviewUsers(String reviewId) { + TestCaseReviewUsersExample testCaseReviewUsersExample = new TestCaseReviewUsersExample(); + testCaseReviewUsersExample.createCriteria().andReviewIdEqualTo(reviewId); + testCaseReviewUsersMapper.deleteByExample(testCaseReviewUsersExample); + } +} diff --git a/frontend/src/business/components/common/components/MsTipButton.vue b/frontend/src/business/components/common/components/MsTipButton.vue index dfcc4003dc..d5b6030155 100644 --- a/frontend/src/business/components/common/components/MsTipButton.vue +++ b/frontend/src/business/components/common/components/MsTipButton.vue @@ -2,6 +2,7 @@ - + @@ -30,6 +30,16 @@ :title="$t('test_track.case.create_case')"/> + + + + + + + + + @@ -41,7 +51,7 @@ - + @@ -61,6 +71,7 @@ export default { testPlanViewPath: '', isRouterAlive: true, testCaseEditPath: '', + testCaseReviewEditPath: '', testCaseProjectPath: '', isProjectActivation: true, projectRecent: { @@ -82,6 +93,15 @@ export default { router: function (item) { } }, + reviewRecent: { + title: "最近的评审", + url: "/test/case/review/recent/5", + index: function (item) { + return '/test/case/review/' + item.id; + }, + router: function (item) { + } + }, planRecent: { title: this.$t('test_track.recent_plan'), url: "/test/plan/recent/5", diff --git a/frontend/src/business/components/track/review/TestCaseReview.vue b/frontend/src/business/components/track/review/TestCaseReview.vue new file mode 100644 index 0000000000..80f9c5df92 --- /dev/null +++ b/frontend/src/business/components/track/review/TestCaseReview.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/frontend/src/business/components/track/review/components/TestCaseReviewEdit.vue b/frontend/src/business/components/track/review/components/TestCaseReviewEdit.vue new file mode 100644 index 0000000000..7dfc0298b8 --- /dev/null +++ b/frontend/src/business/components/track/review/components/TestCaseReviewEdit.vue @@ -0,0 +1,245 @@ + + + + + + diff --git a/frontend/src/business/components/track/review/components/TestCaseReviewList.vue b/frontend/src/business/components/track/review/components/TestCaseReviewList.vue new file mode 100644 index 0000000000..cf0afb8cc1 --- /dev/null +++ b/frontend/src/business/components/track/review/components/TestCaseReviewList.vue @@ -0,0 +1,227 @@ + + + + + diff --git a/frontend/src/business/components/track/router.js b/frontend/src/business/components/track/router.js index 759af75bd8..336a3fc76a 100644 --- a/frontend/src/business/components/track/router.js +++ b/frontend/src/business/components/track/router.js @@ -4,6 +4,7 @@ const TestTrack = () => import(/* webpackChunkName: "track" */ '@/business/compo const TrackHome = () => import(/* webpackChunkName: "track" */ '@/business/components/track/home/TrackHome') const TestCase = () => import(/* webpackChunkName: "track" */ '@/business/components/track/case/TestCase') const TestPlan = () => import(/* webpackChunkName: "track" */ '@/business/components/track/plan/TestPlan') +const TestCaseReview = () => import(/* webpackChunkName: "track" */ '@/business/components/track/review/TestCaseReview') const TestPlanView = () => import(/* webpackChunkName: "track" */ '@/business/components/track/plan/view/TestPlanView') export default { @@ -53,6 +54,11 @@ export default { path: "project/:type", name: "trackProject", component: MsProject - } + }, + { + path: "review/:type", + name: "testCaseReview", + component: TestCaseReview + }, ] }