diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenario.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenario.java index 9040b490a7..980ad2d36b 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenario.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenario.java @@ -1,8 +1,9 @@ package io.metersphere.base.domain; -import java.io.Serializable; import lombok.Data; +import java.io.Serializable; + @Data public class TestCaseReviewScenario implements Serializable { private String id; @@ -13,8 +14,6 @@ public class TestCaseReviewScenario implements Serializable { private String status; - private String environment; - private Long createTime; private Long updateTime; @@ -25,5 +24,7 @@ public class TestCaseReviewScenario implements Serializable { private String reportId; + private String environment; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenarioExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenarioExample.java index d83a2b911e..4eafd6e659 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenarioExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReviewScenarioExample.java @@ -384,76 +384,6 @@ public class TestCaseReviewScenarioExample { return (Criteria) this; } - public Criteria andEnvironmentIsNull() { - addCriterion("environment is null"); - return (Criteria) this; - } - - public Criteria andEnvironmentIsNotNull() { - addCriterion("environment is not null"); - return (Criteria) this; - } - - public Criteria andEnvironmentEqualTo(String value) { - addCriterion("environment =", value, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentNotEqualTo(String value) { - addCriterion("environment <>", value, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentGreaterThan(String value) { - addCriterion("environment >", value, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentGreaterThanOrEqualTo(String value) { - addCriterion("environment >=", value, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentLessThan(String value) { - addCriterion("environment <", value, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentLessThanOrEqualTo(String value) { - addCriterion("environment <=", value, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentLike(String value) { - addCriterion("environment like", value, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentNotLike(String value) { - addCriterion("environment not like", value, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentIn(List values) { - addCriterion("environment in", values, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentNotIn(List values) { - addCriterion("environment not in", values, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentBetween(String value1, String value2) { - addCriterion("environment between", value1, value2, "environment"); - return (Criteria) this; - } - - public Criteria andEnvironmentNotBetween(String value1, String value2) { - addCriterion("environment not between", value1, value2, "environment"); - return (Criteria) this; - } - public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java index e08e5acda2..16cfa759c5 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java @@ -1,8 +1,9 @@ package io.metersphere.base.domain; -import java.io.Serializable; import lombok.Data; +import java.io.Serializable; + @Data public class TestPlan implements Serializable { private String id; @@ -41,6 +42,8 @@ public class TestPlan implements Serializable { private String projectId; + private Integer executionTimes; + private String tags; private static final long serialVersionUID = 1L; diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java index 9c32388ed3..afe2e93584 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java @@ -1303,6 +1303,66 @@ public class TestPlanExample { addCriterion("project_id not between", value1, value2, "projectId"); return (Criteria) this; } + + public Criteria andExecutionTimesIsNull() { + addCriterion("execution_times is null"); + return (Criteria) this; + } + + public Criteria andExecutionTimesIsNotNull() { + addCriterion("execution_times is not null"); + return (Criteria) this; + } + + public Criteria andExecutionTimesEqualTo(Integer value) { + addCriterion("execution_times =", value, "executionTimes"); + return (Criteria) this; + } + + public Criteria andExecutionTimesNotEqualTo(Integer value) { + addCriterion("execution_times <>", value, "executionTimes"); + return (Criteria) this; + } + + public Criteria andExecutionTimesGreaterThan(Integer value) { + addCriterion("execution_times >", value, "executionTimes"); + return (Criteria) this; + } + + public Criteria andExecutionTimesGreaterThanOrEqualTo(Integer value) { + addCriterion("execution_times >=", value, "executionTimes"); + return (Criteria) this; + } + + public Criteria andExecutionTimesLessThan(Integer value) { + addCriterion("execution_times <", value, "executionTimes"); + return (Criteria) this; + } + + public Criteria andExecutionTimesLessThanOrEqualTo(Integer value) { + addCriterion("execution_times <=", value, "executionTimes"); + return (Criteria) this; + } + + public Criteria andExecutionTimesIn(List values) { + addCriterion("execution_times in", values, "executionTimes"); + return (Criteria) this; + } + + public Criteria andExecutionTimesNotIn(List values) { + addCriterion("execution_times not in", values, "executionTimes"); + return (Criteria) this; + } + + public Criteria andExecutionTimesBetween(Integer value1, Integer value2) { + addCriterion("execution_times between", value1, value2, "executionTimes"); + return (Criteria) this; + } + + public Criteria andExecutionTimesNotBetween(Integer value1, Integer value2) { + addCriterion("execution_times not between", value1, value2, "executionTimes"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.java index 3e458cef66..c33a8b714e 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.java @@ -2,9 +2,10 @@ package io.metersphere.base.mapper; import io.metersphere.base.domain.TestCaseReviewScenario; import io.metersphere.base.domain.TestCaseReviewScenarioExample; -import java.util.List; import org.apache.ibatis.annotations.Param; +import java.util.List; + public interface TestCaseReviewScenarioMapper { long countByExample(TestCaseReviewScenarioExample example); @@ -16,15 +17,21 @@ public interface TestCaseReviewScenarioMapper { int insertSelective(TestCaseReviewScenario record); + List selectByExampleWithBLOBs(TestCaseReviewScenarioExample example); + List selectByExample(TestCaseReviewScenarioExample example); TestCaseReviewScenario selectByPrimaryKey(String id); int updateByExampleSelective(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example); + int updateByExampleWithBLOBs(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example); + int updateByExample(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example); int updateByPrimaryKeySelective(TestCaseReviewScenario record); + int updateByPrimaryKeyWithBLOBs(TestCaseReviewScenario record); + int updateByPrimaryKey(TestCaseReviewScenario record); } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.xml index 07929624e8..2059c38ce8 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReviewScenarioMapper.xml @@ -2,16 +2,18 @@ - - - - - - - - - - + + + + + + + + + + + + @@ -72,26 +74,49 @@ - id, test_case_review_id, api_scenario_id, `status`, environment, create_time, update_time, - pass_rate, last_result, report_id + id, test_case_review_id, api_scenario_id, `status`, create_time, update_time, pass_rate, + last_result, report_id - select distinct - + + , + from test_case_review_scenario - + order by ${orderByClause} - + select + + distinct + + + from test_case_review_scenario + + + + + order by ${orderByClause} + + + @@ -106,14 +131,14 @@ - insert into test_case_review_scenario (id, test_case_review_id, api_scenario_id, - `status`, environment, create_time, - update_time, pass_rate, last_result, - report_id) - values (#{id,jdbcType=VARCHAR}, #{testCaseReviewId,jdbcType=VARCHAR}, #{apiScenarioId,jdbcType=VARCHAR}, - #{status,jdbcType=VARCHAR}, #{environment,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, - #{updateTime,jdbcType=BIGINT}, #{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR}, - #{reportId,jdbcType=VARCHAR}) + insert into test_case_review_scenario (id, test_case_review_id, api_scenario_id, + `status`, create_time, update_time, + pass_rate, last_result, report_id, + environment) + values (#{id,jdbcType=VARCHAR}, #{testCaseReviewId,jdbcType=VARCHAR}, #{apiScenarioId,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, + #{environment,jdbcType=LONGVARCHAR}) insert into test_case_review_scenario @@ -130,9 +155,6 @@ `status`, - - environment, - create_time, @@ -148,6 +170,9 @@ report_id, + + environment, + @@ -162,9 +187,6 @@ #{status,jdbcType=VARCHAR}, - - #{environment,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, @@ -180,6 +202,9 @@ #{reportId,jdbcType=VARCHAR}, + + #{environment,jdbcType=LONGVARCHAR}, +