From 1b6938e013c55bf062b71fcb6256ece2efe3232f Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 17 Jun 2024 11:31:38 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E7=A7=BB=E9=99=A4=E5=A4=B1=E8=B4=A5=E9=87=8D=E8=AF=95?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE&&=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plan/domain/TestPlanCollection.java | 12 +--- .../domain/TestPlanCollectionExample.java | 70 ------------------- .../plan/mapper/TestPlanCollectionMapper.xml | 44 ++++-------- .../migration/3.0.1/ddl/V3.0.1_2__ga_ddl.sql | 5 +- .../mapper/ExtTestPlanCollectionMapper.xml | 2 +- .../ExtTestPlanReportFunctionalCaseMapper.xml | 2 +- .../plan/service/TestPlanReportService.java | 12 ++-- .../plan/service/TestPlanService.java | 4 -- 8 files changed, 24 insertions(+), 127 deletions(-) diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollection.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollection.java index 42fb7f1691..2fa3a97310 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollection.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollection.java @@ -66,17 +66,10 @@ public class TestPlanCollection implements Serializable { @NotNull(message = "{test_plan_collection.retry_on_fail.not_blank}", groups = {Created.class}) private Boolean retryOnFail; - @Schema(description = "失败重试类型(步骤/场景)", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{test_plan_collection.retry_type.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{test_plan_collection.retry_type.length_range}", groups = {Created.class, Updated.class}) - private String retryType; - - @Schema(description = "失败重试次数", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "{test_plan_collection.retry_times.not_blank}", groups = {Created.class}) + @Schema(description = "失败重试次数") private Integer retryTimes; - @Schema(description = "失败重试间隔(单位: ms)", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "{test_plan_collection.retry_interval.not_blank}", groups = {Created.class}) + @Schema(description = "失败重试间隔(单位: ms)") private Integer retryInterval; @Schema(description = "是否失败停止", requiredMode = Schema.RequiredMode.REQUIRED) @@ -107,7 +100,6 @@ public class TestPlanCollection implements Serializable { environmentId("environment_id", "environmentId", "VARCHAR", false), testResourcePoolId("test_resource_pool_id", "testResourcePoolId", "VARCHAR", false), retryOnFail("retry_on_fail", "retryOnFail", "BIT", false), - retryType("retry_type", "retryType", "VARCHAR", false), retryTimes("retry_times", "retryTimes", "INTEGER", false), retryInterval("retry_interval", "retryInterval", "INTEGER", false), stopOnFail("stop_on_fail", "stopOnFail", "BIT", false), diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollectionExample.java b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollectionExample.java index 98abe4ad41..cc1b58fee1 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollectionExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/domain/TestPlanCollectionExample.java @@ -844,76 +844,6 @@ public class TestPlanCollectionExample { return (Criteria) this; } - public Criteria andRetryTypeIsNull() { - addCriterion("retry_type is null"); - return (Criteria) this; - } - - public Criteria andRetryTypeIsNotNull() { - addCriterion("retry_type is not null"); - return (Criteria) this; - } - - public Criteria andRetryTypeEqualTo(String value) { - addCriterion("retry_type =", value, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeNotEqualTo(String value) { - addCriterion("retry_type <>", value, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeGreaterThan(String value) { - addCriterion("retry_type >", value, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeGreaterThanOrEqualTo(String value) { - addCriterion("retry_type >=", value, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeLessThan(String value) { - addCriterion("retry_type <", value, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeLessThanOrEqualTo(String value) { - addCriterion("retry_type <=", value, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeLike(String value) { - addCriterion("retry_type like", value, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeNotLike(String value) { - addCriterion("retry_type not like", value, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeIn(List values) { - addCriterion("retry_type in", values, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeNotIn(List values) { - addCriterion("retry_type not in", values, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeBetween(String value1, String value2) { - addCriterion("retry_type between", value1, value2, "retryType"); - return (Criteria) this; - } - - public Criteria andRetryTypeNotBetween(String value1, String value2) { - addCriterion("retry_type not between", value1, value2, "retryType"); - return (Criteria) this; - } - public Criteria andRetryTimesIsNull() { addCriterion("retry_times is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.xml index cbdd35206b..fe8cc3afba 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/plan/mapper/TestPlanCollectionMapper.xml @@ -13,7 +13,6 @@ - @@ -81,7 +80,7 @@ id, test_plan_id, parent_id, `name`, `type`, execute_method, extended, grouped, environment_id, - test_resource_pool_id, retry_on_fail, retry_type, retry_times, retry_interval, stop_on_fail, + test_resource_pool_id, retry_on_fail, retry_times, retry_interval, stop_on_fail, create_user, create_time, pos