diff --git a/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/TestCaseIssues.java b/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/TestCaseIssues.java index 82b7bc09bc..4b1c2c05c9 100644 --- a/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/TestCaseIssues.java +++ b/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/TestCaseIssues.java @@ -1,8 +1,7 @@ package io.metersphere.base.domain; -import lombok.Data; - import java.io.Serializable; +import lombok.Data; @Data public class TestCaseIssues implements Serializable { @@ -12,9 +11,11 @@ public class TestCaseIssues implements Serializable { private String issuesId; - private String refId; - private String refType; + private String refId; + + private Long relateTime; + private static final long serialVersionUID = 1L; -} +} \ No newline at end of file diff --git a/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/TestCaseIssuesExample.java b/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/TestCaseIssuesExample.java index 6a665564a3..eb79dfbae4 100644 --- a/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/TestCaseIssuesExample.java +++ b/framework/sdk-parent/domain/src/main/java/io/metersphere/base/domain/TestCaseIssuesExample.java @@ -314,6 +314,76 @@ public class TestCaseIssuesExample { return (Criteria) this; } + public Criteria andRefTypeIsNull() { + addCriterion("ref_type is null"); + return (Criteria) this; + } + + public Criteria andRefTypeIsNotNull() { + addCriterion("ref_type is not null"); + return (Criteria) this; + } + + public Criteria andRefTypeEqualTo(String value) { + addCriterion("ref_type =", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotEqualTo(String value) { + addCriterion("ref_type <>", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeGreaterThan(String value) { + addCriterion("ref_type >", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeGreaterThanOrEqualTo(String value) { + addCriterion("ref_type >=", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeLessThan(String value) { + addCriterion("ref_type <", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeLessThanOrEqualTo(String value) { + addCriterion("ref_type <=", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeLike(String value) { + addCriterion("ref_type like", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotLike(String value) { + addCriterion("ref_type not like", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeIn(List values) { + addCriterion("ref_type in", values, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotIn(List values) { + addCriterion("ref_type not in", values, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeBetween(String value1, String value2) { + addCriterion("ref_type between", value1, value2, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotBetween(String value1, String value2) { + addCriterion("ref_type not between", value1, value2, "refType"); + return (Criteria) this; + } + public Criteria andRefIdIsNull() { addCriterion("ref_id is null"); return (Criteria) this; @@ -384,73 +454,63 @@ public class TestCaseIssuesExample { return (Criteria) this; } - public Criteria andRefTypeIsNull() { - addCriterion("ref_type is null"); + public Criteria andRelateTimeIsNull() { + addCriterion("relate_time is null"); return (Criteria) this; } - public Criteria andRefTypeIsNotNull() { - addCriterion("ref_type is not null"); + public Criteria andRelateTimeIsNotNull() { + addCriterion("relate_time is not null"); return (Criteria) this; } - public Criteria andRefTypeEqualTo(String value) { - addCriterion("ref_type =", value, "refType"); + public Criteria andRelateTimeEqualTo(Long value) { + addCriterion("relate_time =", value, "relateTime"); return (Criteria) this; } - public Criteria andRefTypeNotEqualTo(String value) { - addCriterion("ref_type <>", value, "refType"); + public Criteria andRelateTimeNotEqualTo(Long value) { + addCriterion("relate_time <>", value, "relateTime"); return (Criteria) this; } - public Criteria andRefTypeGreaterThan(String value) { - addCriterion("ref_type >", value, "refType"); + public Criteria andRelateTimeGreaterThan(Long value) { + addCriterion("relate_time >", value, "relateTime"); return (Criteria) this; } - public Criteria andRefTypeGreaterThanOrEqualTo(String value) { - addCriterion("ref_type >=", value, "refType"); + public Criteria andRelateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("relate_time >=", value, "relateTime"); return (Criteria) this; } - public Criteria andRefTypeLessThan(String value) { - addCriterion("ref_type <", value, "refType"); + public Criteria andRelateTimeLessThan(Long value) { + addCriterion("relate_time <", value, "relateTime"); return (Criteria) this; } - public Criteria andRefTypeLessThanOrEqualTo(String value) { - addCriterion("ref_type <=", value, "refType"); + public Criteria andRelateTimeLessThanOrEqualTo(Long value) { + addCriterion("relate_time <=", value, "relateTime"); return (Criteria) this; } - public Criteria andRefTypeLike(String value) { - addCriterion("ref_type like", value, "refType"); + public Criteria andRelateTimeIn(List values) { + addCriterion("relate_time in", values, "relateTime"); return (Criteria) this; } - public Criteria andRefTypeNotLike(String value) { - addCriterion("ref_type not like", value, "refType"); + public Criteria andRelateTimeNotIn(List values) { + addCriterion("relate_time not in", values, "relateTime"); return (Criteria) this; } - public Criteria andRefTypeIn(List values) { - addCriterion("ref_type in", values, "refType"); + public Criteria andRelateTimeBetween(Long value1, Long value2) { + addCriterion("relate_time between", value1, value2, "relateTime"); return (Criteria) this; } - public Criteria andRefTypeNotIn(List values) { - addCriterion("ref_type not in", values, "refType"); - return (Criteria) this; - } - - public Criteria andRefTypeBetween(String value1, String value2) { - addCriterion("ref_type between", value1, value2, "refType"); - return (Criteria) this; - } - - public Criteria andRefTypeNotBetween(String value1, String value2) { - addCriterion("ref_type not between", value1, value2, "refType"); + public Criteria andRelateTimeNotBetween(Long value1, Long value2) { + addCriterion("relate_time not between", value1, value2, "relateTime"); return (Criteria) this; } } @@ -547,4 +607,4 @@ public class TestCaseIssuesExample { this(condition, value, secondValue, null); } } -} +} \ No newline at end of file diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.java b/test-track/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.java index 5e48cec56a..f389a1c3be 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.java +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.java @@ -3,7 +3,6 @@ package io.metersphere.base.mapper; import io.metersphere.base.domain.TestCaseIssues; import io.metersphere.base.domain.TestCaseIssuesExample; import java.util.List; - import org.apache.ibatis.annotations.Param; public interface TestCaseIssuesMapper { @@ -29,4 +28,4 @@ public interface TestCaseIssuesMapper { int updateByPrimaryKey(TestCaseIssues record); -} +} \ No newline at end of file diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.xml index 47c1a95b06..5dc6cbe220 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/TestCaseIssuesMapper.xml @@ -5,8 +5,9 @@ - + + @@ -67,7 +68,7 @@ - id, resource_id, issues_id, ref_id, ref_type + id, resource_id, issues_id, ref_type, ref_id, relate_time diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java index 9824c33d26..e2b38b52e0 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.java @@ -91,6 +91,8 @@ public interface ExtTestCaseMapper { List getTestPlanBug(@Param("planId") String planId); + Long getTestPlanThisWeekBugCount(@Param("planId") String planId, @Param("ids") List ids); + int getTestPlanCase(@Param("planId") String planId); int getTestPlanPassCase(@Param("planId") String planId); diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index cb811c4864..fd8e6ac592 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -894,6 +894,16 @@ join issues on tci.issues_id = issues.id where tptc.plan_id = #{planId} and tptc.is_del != 1 +