From cfd1bb7791a99d62424e735aaa25c33ecdab55ac Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Thu, 10 Oct 2024 15:49:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E8=A1=A8=E7=BB=93=E6=9E=84&=E4=BB=BB=E5=8A=A1=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=9E=9A=E4=B8=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/system/domain/ExecTask.java | 4 ++ .../system/domain/ExecTaskExample.java | 70 +++++++++++++++++++ .../system/mapper/ExecTaskMapper.xml | 47 +++++++++---- .../migration/3.4.0/ddl/V3.4.0_2__ga_ddl.sql | 6 +- .../sdk/constants/ExecTaskType.java | 44 ++++++++++++ 5 files changed, 153 insertions(+), 18 deletions(-) create mode 100644 backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/ExecTaskType.java diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTask.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTask.java index 232b461456..d07c7a27f2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTask.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTask.java @@ -41,6 +41,9 @@ public class ExecTask implements Serializable { @Size(min = 1, max = 50, message = "{exec_task.task_type.length_range}", groups = {Created.class, Updated.class}) private String taskType; + @Schema(description = "测试计划id") + private String testPlanId; + @Schema(description = "执行模式", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{exec_task.trigger_mode.not_blank}", groups = {Created.class}) @Size(min = 1, max = 20, message = "{exec_task.trigger_mode.length_range}", groups = {Created.class, Updated.class}) @@ -78,6 +81,7 @@ public class ExecTask implements Serializable { caseCount("case_count", "caseCount", "BIGINT", false), result("result", "result", "VARCHAR", true), taskType("task_type", "taskType", "VARCHAR", false), + testPlanId("test_plan_id", "testPlanId", "VARCHAR", false), triggerMode("trigger_mode", "triggerMode", "VARCHAR", false), projectId("project_id", "projectId", "VARCHAR", false), organizationId("organization_id", "organizationId", "VARCHAR", false), diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskExample.java index 1636340504..fc2a8574f2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskExample.java @@ -574,6 +574,76 @@ public class ExecTaskExample { return (Criteria) this; } + public Criteria andTestPlanIdIsNull() { + addCriterion("test_plan_id is null"); + return (Criteria) this; + } + + public Criteria andTestPlanIdIsNotNull() { + addCriterion("test_plan_id is not null"); + return (Criteria) this; + } + + public Criteria andTestPlanIdEqualTo(String value) { + addCriterion("test_plan_id =", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotEqualTo(String value) { + addCriterion("test_plan_id <>", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdGreaterThan(String value) { + addCriterion("test_plan_id >", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdGreaterThanOrEqualTo(String value) { + addCriterion("test_plan_id >=", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdLessThan(String value) { + addCriterion("test_plan_id <", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdLessThanOrEqualTo(String value) { + addCriterion("test_plan_id <=", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdLike(String value) { + addCriterion("test_plan_id like", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotLike(String value) { + addCriterion("test_plan_id not like", value, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdIn(List values) { + addCriterion("test_plan_id in", values, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotIn(List values) { + addCriterion("test_plan_id not in", values, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdBetween(String value1, String value2) { + addCriterion("test_plan_id between", value1, value2, "testPlanId"); + return (Criteria) this; + } + + public Criteria andTestPlanIdNotBetween(String value1, String value2) { + addCriterion("test_plan_id not between", value1, value2, "testPlanId"); + return (Criteria) this; + } + public Criteria andTriggerModeIsNull() { addCriterion("trigger_mode is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.xml index e7b255684d..3cdb02987a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.xml @@ -9,6 +9,7 @@ + @@ -76,8 +77,8 @@ - id, num, task_name, `status`, case_count, `result`, task_type, trigger_mode, project_id, - organization_id, create_time, create_user, start_time, end_time + id, num, task_name, `status`, case_count, `result`, task_type, test_plan_id, trigger_mode, + project_id, organization_id, create_time, create_user, start_time, end_time