From b0f24ef72e5644bc6fbaef3906dc16ad37d32ba7 Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Sun, 29 Sep 2024 10:19:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83):=20?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83=E8=A1=A8=E7=BB=93=E6=9E=84?= =?UTF-8?q?&domain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/system/domain/ExecTask.java | 158 +++ .../system/domain/ExecTaskExample.java | 1130 +++++++++++++++ .../system/domain/ExecTaskItem.java | 164 +++ .../system/domain/ExecTaskItemExample.java | 1230 +++++++++++++++++ .../system/mapper/ExecTaskItemMapper.java | 34 + .../system/mapper/ExecTaskItemMapper.xml | 444 ++++++ .../system/mapper/ExecTaskMapper.java | 34 + .../system/mapper/ExecTaskMapper.xml | 422 ++++++ .../migration/3.4.0/ddl/V3.4.0_1__init.sql | 1 + .../migration/3.4.0/ddl/V3.4.0_2__ga_ddl.sql | 74 + .../migration/3.4.0/dml/V3.4.0_2_1__data.sql | 2 + 11 files changed, 3693 insertions(+) create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTask.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskItem.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskItemExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskItemMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskItemMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.xml create mode 100644 backend/framework/domain/src/main/resources/migration/3.4.0/ddl/V3.4.0_1__init.sql create mode 100644 backend/framework/domain/src/main/resources/migration/3.4.0/ddl/V3.4.0_2__ga_ddl.sql create mode 100644 backend/framework/domain/src/main/resources/migration/3.4.0/dml/V3.4.0_2_1__data.sql 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 new file mode 100644 index 0000000000..e5233d2d2e --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTask.java @@ -0,0 +1,158 @@ +package io.metersphere.system.domain; + +import io.metersphere.validation.groups.Created; +import io.metersphere.validation.groups.Updated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import lombok.Data; + +@Data +public class ExecTask implements Serializable { + @Schema(description = "任务ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{exec_task.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED) + private Long num; + + @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task.task_name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 255, message = "{exec_task.task_name.length_range}", groups = {Created.class, Updated.class}) + private String taskName; + + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task.status.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 20, message = "{exec_task.status.length_range}", groups = {Created.class, Updated.class}) + private String status; + + @Schema(description = "用例数量", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task.case_count.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 19, message = "{exec_task.case_count.length_range}", groups = {Created.class, Updated.class}) + private Long caseCount; + + @Schema(description = "执行结果") + private String result; + + @Schema(description = "任务类型", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task.task_type.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task.task_type.length_range}", groups = {Created.class, Updated.class}) + private String taskType; + + @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}) + private String triggerMode; + + @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task.project_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task.project_id.length_range}", groups = {Created.class, Updated.class}) + private String projectId; + + @Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task.organization_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task.organization_id.length_range}", groups = {Created.class, Updated.class}) + private String organizationId; + + @Schema(description = "创建时间") + private Long createTime; + + @Schema(description = "创建人") + private String createUser; + + @Schema(description = "开始时间") + private Long startTime; + + @Schema(description = "结束时间") + private Long endTime; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + num("num", "num", "BIGINT", false), + taskName("task_name", "taskName", "VARCHAR", false), + status("status", "status", "VARCHAR", true), + caseCount("case_count", "caseCount", "BIGINT", false), + result("result", "result", "VARCHAR", true), + taskType("task_type", "taskType", "VARCHAR", false), + triggerMode("trigger_mode", "triggerMode", "VARCHAR", false), + projectId("project_id", "projectId", "VARCHAR", false), + organizationId("organization_id", "organizationId", "VARCHAR", false), + createTime("create_time", "createTime", "BIGINT", false), + createUser("create_user", "createUser", "VARCHAR", false), + startTime("start_time", "startTime", "BIGINT", false), + endTime("end_time", "endTime", "BIGINT", false); + + private static final String BEGINNING_DELIMITER = "`"; + + private static final String ENDING_DELIMITER = "`"; + + private final String column; + + private final boolean isColumnNameDelimited; + + private final String javaProperty; + + private final String jdbcType; + + public String value() { + return this.column; + } + + public String getValue() { + return this.column; + } + + public String getJavaProperty() { + return this.javaProperty; + } + + public String getJdbcType() { + return this.jdbcType; + } + + Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { + this.column = column; + this.javaProperty = javaProperty; + this.jdbcType = jdbcType; + this.isColumnNameDelimited = isColumnNameDelimited; + } + + public String desc() { + return this.getEscapedColumnName() + " DESC"; + } + + public String asc() { + return this.getEscapedColumnName() + " ASC"; + } + + public static Column[] excludes(Column ... excludes) { + ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); + if (excludes != null && excludes.length > 0) { + columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); + } + return columns.toArray(new Column[]{}); + } + + public static Column[] all() { + return Column.values(); + } + + public String getEscapedColumnName() { + if (this.isColumnNameDelimited) { + return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); + } else { + return this.column; + } + } + + public String getAliasedEscapedColumnName() { + return this.getEscapedColumnName(); + } + } +} \ No newline at end of file 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 new file mode 100644 index 0000000000..1636340504 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskExample.java @@ -0,0 +1,1130 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ExecTaskExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ExecTaskExample() { + 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 andNumIsNull() { + addCriterion("num is null"); + return (Criteria) this; + } + + public Criteria andNumIsNotNull() { + addCriterion("num is not null"); + return (Criteria) this; + } + + public Criteria andNumEqualTo(Long value) { + addCriterion("num =", value, "num"); + return (Criteria) this; + } + + public Criteria andNumNotEqualTo(Long value) { + addCriterion("num <>", value, "num"); + return (Criteria) this; + } + + public Criteria andNumGreaterThan(Long value) { + addCriterion("num >", value, "num"); + return (Criteria) this; + } + + public Criteria andNumGreaterThanOrEqualTo(Long value) { + addCriterion("num >=", value, "num"); + return (Criteria) this; + } + + public Criteria andNumLessThan(Long value) { + addCriterion("num <", value, "num"); + return (Criteria) this; + } + + public Criteria andNumLessThanOrEqualTo(Long value) { + addCriterion("num <=", value, "num"); + return (Criteria) this; + } + + public Criteria andNumIn(List values) { + addCriterion("num in", values, "num"); + return (Criteria) this; + } + + public Criteria andNumNotIn(List values) { + addCriterion("num not in", values, "num"); + return (Criteria) this; + } + + public Criteria andNumBetween(Long value1, Long value2) { + addCriterion("num between", value1, value2, "num"); + return (Criteria) this; + } + + public Criteria andNumNotBetween(Long value1, Long value2) { + addCriterion("num not between", value1, value2, "num"); + return (Criteria) this; + } + + public Criteria andTaskNameIsNull() { + addCriterion("task_name is null"); + return (Criteria) this; + } + + public Criteria andTaskNameIsNotNull() { + addCriterion("task_name is not null"); + return (Criteria) this; + } + + public Criteria andTaskNameEqualTo(String value) { + addCriterion("task_name =", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameNotEqualTo(String value) { + addCriterion("task_name <>", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameGreaterThan(String value) { + addCriterion("task_name >", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameGreaterThanOrEqualTo(String value) { + addCriterion("task_name >=", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameLessThan(String value) { + addCriterion("task_name <", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameLessThanOrEqualTo(String value) { + addCriterion("task_name <=", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameLike(String value) { + addCriterion("task_name like", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameNotLike(String value) { + addCriterion("task_name not like", value, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameIn(List values) { + addCriterion("task_name in", values, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameNotIn(List values) { + addCriterion("task_name not in", values, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameBetween(String value1, String value2) { + addCriterion("task_name between", value1, value2, "taskName"); + return (Criteria) this; + } + + public Criteria andTaskNameNotBetween(String value1, String value2) { + addCriterion("task_name not between", value1, value2, "taskName"); + 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 andCaseCountIsNull() { + addCriterion("case_count is null"); + return (Criteria) this; + } + + public Criteria andCaseCountIsNotNull() { + addCriterion("case_count is not null"); + return (Criteria) this; + } + + public Criteria andCaseCountEqualTo(Long value) { + addCriterion("case_count =", value, "caseCount"); + return (Criteria) this; + } + + public Criteria andCaseCountNotEqualTo(Long value) { + addCriterion("case_count <>", value, "caseCount"); + return (Criteria) this; + } + + public Criteria andCaseCountGreaterThan(Long value) { + addCriterion("case_count >", value, "caseCount"); + return (Criteria) this; + } + + public Criteria andCaseCountGreaterThanOrEqualTo(Long value) { + addCriterion("case_count >=", value, "caseCount"); + return (Criteria) this; + } + + public Criteria andCaseCountLessThan(Long value) { + addCriterion("case_count <", value, "caseCount"); + return (Criteria) this; + } + + public Criteria andCaseCountLessThanOrEqualTo(Long value) { + addCriterion("case_count <=", value, "caseCount"); + return (Criteria) this; + } + + public Criteria andCaseCountIn(List values) { + addCriterion("case_count in", values, "caseCount"); + return (Criteria) this; + } + + public Criteria andCaseCountNotIn(List values) { + addCriterion("case_count not in", values, "caseCount"); + return (Criteria) this; + } + + public Criteria andCaseCountBetween(Long value1, Long value2) { + addCriterion("case_count between", value1, value2, "caseCount"); + return (Criteria) this; + } + + public Criteria andCaseCountNotBetween(Long value1, Long value2) { + addCriterion("case_count not between", value1, value2, "caseCount"); + 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 andTaskTypeIsNull() { + addCriterion("task_type is null"); + return (Criteria) this; + } + + public Criteria andTaskTypeIsNotNull() { + addCriterion("task_type is not null"); + return (Criteria) this; + } + + public Criteria andTaskTypeEqualTo(String value) { + addCriterion("task_type =", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeNotEqualTo(String value) { + addCriterion("task_type <>", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeGreaterThan(String value) { + addCriterion("task_type >", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeGreaterThanOrEqualTo(String value) { + addCriterion("task_type >=", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeLessThan(String value) { + addCriterion("task_type <", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeLessThanOrEqualTo(String value) { + addCriterion("task_type <=", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeLike(String value) { + addCriterion("task_type like", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeNotLike(String value) { + addCriterion("task_type not like", value, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeIn(List values) { + addCriterion("task_type in", values, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeNotIn(List values) { + addCriterion("task_type not in", values, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeBetween(String value1, String value2) { + addCriterion("task_type between", value1, value2, "taskType"); + return (Criteria) this; + } + + public Criteria andTaskTypeNotBetween(String value1, String value2) { + addCriterion("task_type not between", value1, value2, "taskType"); + return (Criteria) this; + } + + public Criteria andTriggerModeIsNull() { + addCriterion("trigger_mode is null"); + return (Criteria) this; + } + + public Criteria andTriggerModeIsNotNull() { + addCriterion("trigger_mode is not null"); + return (Criteria) this; + } + + public Criteria andTriggerModeEqualTo(String value) { + addCriterion("trigger_mode =", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeNotEqualTo(String value) { + addCriterion("trigger_mode <>", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeGreaterThan(String value) { + addCriterion("trigger_mode >", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeGreaterThanOrEqualTo(String value) { + addCriterion("trigger_mode >=", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeLessThan(String value) { + addCriterion("trigger_mode <", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeLessThanOrEqualTo(String value) { + addCriterion("trigger_mode <=", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeLike(String value) { + addCriterion("trigger_mode like", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeNotLike(String value) { + addCriterion("trigger_mode not like", value, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeIn(List values) { + addCriterion("trigger_mode in", values, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeNotIn(List values) { + addCriterion("trigger_mode not in", values, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeBetween(String value1, String value2) { + addCriterion("trigger_mode between", value1, value2, "triggerMode"); + return (Criteria) this; + } + + public Criteria andTriggerModeNotBetween(String value1, String value2) { + addCriterion("trigger_mode not between", value1, value2, "triggerMode"); + 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 Criteria andOrganizationIdIsNull() { + addCriterion("organization_id is null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNotNull() { + addCriterion("organization_id is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdEqualTo(String value) { + addCriterion("organization_id =", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotEqualTo(String value) { + addCriterion("organization_id <>", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThan(String value) { + addCriterion("organization_id >", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThanOrEqualTo(String value) { + addCriterion("organization_id >=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThan(String value) { + addCriterion("organization_id <", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThanOrEqualTo(String value) { + addCriterion("organization_id <=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLike(String value) { + addCriterion("organization_id like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotLike(String value) { + addCriterion("organization_id not like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIn(List values) { + addCriterion("organization_id in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("organization_id not in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdBetween(String value1, String value2) { + addCriterion("organization_id between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotBetween(String value1, String value2) { + addCriterion("organization_id not between", value1, value2, "organizationId"); + 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 andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Long value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Long value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Long value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Long value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Long value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Long value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Long value1, Long value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Long value1, Long value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + 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/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskItem.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskItem.java new file mode 100644 index 0000000000..87f74a4ac9 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskItem.java @@ -0,0 +1,164 @@ +package io.metersphere.system.domain; + +import io.metersphere.validation.groups.Created; +import io.metersphere.validation.groups.Updated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Size; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import lombok.Data; + +@Data +public class ExecTaskItem implements Serializable { + @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task_item.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{exec_task_item.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "任务ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task_item.task_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task_item.task_id.length_range}", groups = {Created.class, Updated.class}) + private String taskId; + + @Schema(description = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task_item.resource_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task_item.resource_id.length_range}", groups = {Created.class, Updated.class}) + private String resourceId; + + @Schema(description = "任务来源(任务组下的任务id)") + private String taskOrigin; + + @Schema(description = "执行状态", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task_item.status.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 20, message = "{exec_task_item.status.length_range}", groups = {Created.class, Updated.class}) + private String status; + + @Schema(description = "执行结果") + private String result; + + @Schema(description = "资源池ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task_item.resource_pool_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task_item.resource_pool_id.length_range}", groups = {Created.class, Updated.class}) + private String resourcePoolId; + + @Schema(description = "节点") + private String resourcePoolNode; + + @Schema(description = "资源类型", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task_item.resource_type.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task_item.resource_type.length_range}", groups = {Created.class, Updated.class}) + private String resourceType; + + @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task_item.project_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task_item.project_id.length_range}", groups = {Created.class, Updated.class}) + private String projectId; + + @Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task_item.organization_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task_item.organization_id.length_range}", groups = {Created.class, Updated.class}) + private String organizationId; + + @Schema(description = "线程ID") + private String threadId; + + @Schema(description = "执行开始时间") + private Long startTime; + + @Schema(description = "执行完成时间") + private Long endTime; + + @Schema(description = "执行人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{exec_task_item.executor.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{exec_task_item.executor.length_range}", groups = {Created.class, Updated.class}) + private String executor; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + taskId("task_id", "taskId", "VARCHAR", false), + resourceId("resource_id", "resourceId", "VARCHAR", false), + taskOrigin("task_origin", "taskOrigin", "VARCHAR", false), + status("status", "status", "VARCHAR", true), + result("result", "result", "VARCHAR", true), + resourcePoolId("resource_pool_id", "resourcePoolId", "VARCHAR", false), + resourcePoolNode("resource_pool_node", "resourcePoolNode", "VARCHAR", false), + resourceType("resource_type", "resourceType", "VARCHAR", false), + projectId("project_id", "projectId", "VARCHAR", false), + organizationId("organization_id", "organizationId", "VARCHAR", false), + threadId("thread_id", "threadId", "VARCHAR", false), + startTime("start_time", "startTime", "BIGINT", false), + endTime("end_time", "endTime", "BIGINT", false), + executor("executor", "executor", "VARCHAR", false); + + private static final String BEGINNING_DELIMITER = "`"; + + private static final String ENDING_DELIMITER = "`"; + + private final String column; + + private final boolean isColumnNameDelimited; + + private final String javaProperty; + + private final String jdbcType; + + public String value() { + return this.column; + } + + public String getValue() { + return this.column; + } + + public String getJavaProperty() { + return this.javaProperty; + } + + public String getJdbcType() { + return this.jdbcType; + } + + Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { + this.column = column; + this.javaProperty = javaProperty; + this.jdbcType = jdbcType; + this.isColumnNameDelimited = isColumnNameDelimited; + } + + public String desc() { + return this.getEscapedColumnName() + " DESC"; + } + + public String asc() { + return this.getEscapedColumnName() + " ASC"; + } + + public static Column[] excludes(Column ... excludes) { + ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); + if (excludes != null && excludes.length > 0) { + columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); + } + return columns.toArray(new Column[]{}); + } + + public static Column[] all() { + return Column.values(); + } + + public String getEscapedColumnName() { + if (this.isColumnNameDelimited) { + return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); + } else { + return this.column; + } + } + + public String getAliasedEscapedColumnName() { + return this.getEscapedColumnName(); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskItemExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskItemExample.java new file mode 100644 index 0000000000..05a019317f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ExecTaskItemExample.java @@ -0,0 +1,1230 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ExecTaskItemExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ExecTaskItemExample() { + 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 andTaskIdIsNull() { + addCriterion("task_id is null"); + return (Criteria) this; + } + + public Criteria andTaskIdIsNotNull() { + addCriterion("task_id is not null"); + return (Criteria) this; + } + + public Criteria andTaskIdEqualTo(String value) { + addCriterion("task_id =", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotEqualTo(String value) { + addCriterion("task_id <>", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdGreaterThan(String value) { + addCriterion("task_id >", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdGreaterThanOrEqualTo(String value) { + addCriterion("task_id >=", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdLessThan(String value) { + addCriterion("task_id <", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdLessThanOrEqualTo(String value) { + addCriterion("task_id <=", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdLike(String value) { + addCriterion("task_id like", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotLike(String value) { + addCriterion("task_id not like", value, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdIn(List values) { + addCriterion("task_id in", values, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotIn(List values) { + addCriterion("task_id not in", values, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdBetween(String value1, String value2) { + addCriterion("task_id between", value1, value2, "taskId"); + return (Criteria) this; + } + + public Criteria andTaskIdNotBetween(String value1, String value2) { + addCriterion("task_id not between", value1, value2, "taskId"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNull() { + addCriterion("resource_id is null"); + return (Criteria) this; + } + + public Criteria andResourceIdIsNotNull() { + addCriterion("resource_id is not null"); + return (Criteria) this; + } + + public Criteria andResourceIdEqualTo(String value) { + addCriterion("resource_id =", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotEqualTo(String value) { + addCriterion("resource_id <>", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThan(String value) { + addCriterion("resource_id >", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdGreaterThanOrEqualTo(String value) { + addCriterion("resource_id >=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThan(String value) { + addCriterion("resource_id <", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLessThanOrEqualTo(String value) { + addCriterion("resource_id <=", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdLike(String value) { + addCriterion("resource_id like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotLike(String value) { + addCriterion("resource_id not like", value, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdIn(List values) { + addCriterion("resource_id in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotIn(List values) { + addCriterion("resource_id not in", values, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdBetween(String value1, String value2) { + addCriterion("resource_id between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andResourceIdNotBetween(String value1, String value2) { + addCriterion("resource_id not between", value1, value2, "resourceId"); + return (Criteria) this; + } + + public Criteria andTaskOriginIsNull() { + addCriterion("task_origin is null"); + return (Criteria) this; + } + + public Criteria andTaskOriginIsNotNull() { + addCriterion("task_origin is not null"); + return (Criteria) this; + } + + public Criteria andTaskOriginEqualTo(String value) { + addCriterion("task_origin =", value, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginNotEqualTo(String value) { + addCriterion("task_origin <>", value, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginGreaterThan(String value) { + addCriterion("task_origin >", value, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginGreaterThanOrEqualTo(String value) { + addCriterion("task_origin >=", value, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginLessThan(String value) { + addCriterion("task_origin <", value, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginLessThanOrEqualTo(String value) { + addCriterion("task_origin <=", value, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginLike(String value) { + addCriterion("task_origin like", value, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginNotLike(String value) { + addCriterion("task_origin not like", value, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginIn(List values) { + addCriterion("task_origin in", values, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginNotIn(List values) { + addCriterion("task_origin not in", values, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginBetween(String value1, String value2) { + addCriterion("task_origin between", value1, value2, "taskOrigin"); + return (Criteria) this; + } + + public Criteria andTaskOriginNotBetween(String value1, String value2) { + addCriterion("task_origin not between", value1, value2, "taskOrigin"); + 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 andResourcePoolIdIsNull() { + addCriterion("resource_pool_id is null"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdIsNotNull() { + addCriterion("resource_pool_id is not null"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdEqualTo(String value) { + addCriterion("resource_pool_id =", value, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdNotEqualTo(String value) { + addCriterion("resource_pool_id <>", value, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdGreaterThan(String value) { + addCriterion("resource_pool_id >", value, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdGreaterThanOrEqualTo(String value) { + addCriterion("resource_pool_id >=", value, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdLessThan(String value) { + addCriterion("resource_pool_id <", value, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdLessThanOrEqualTo(String value) { + addCriterion("resource_pool_id <=", value, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdLike(String value) { + addCriterion("resource_pool_id like", value, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdNotLike(String value) { + addCriterion("resource_pool_id not like", value, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdIn(List values) { + addCriterion("resource_pool_id in", values, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdNotIn(List values) { + addCriterion("resource_pool_id not in", values, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdBetween(String value1, String value2) { + addCriterion("resource_pool_id between", value1, value2, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolIdNotBetween(String value1, String value2) { + addCriterion("resource_pool_id not between", value1, value2, "resourcePoolId"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeIsNull() { + addCriterion("resource_pool_node is null"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeIsNotNull() { + addCriterion("resource_pool_node is not null"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeEqualTo(String value) { + addCriterion("resource_pool_node =", value, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeNotEqualTo(String value) { + addCriterion("resource_pool_node <>", value, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeGreaterThan(String value) { + addCriterion("resource_pool_node >", value, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeGreaterThanOrEqualTo(String value) { + addCriterion("resource_pool_node >=", value, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeLessThan(String value) { + addCriterion("resource_pool_node <", value, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeLessThanOrEqualTo(String value) { + addCriterion("resource_pool_node <=", value, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeLike(String value) { + addCriterion("resource_pool_node like", value, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeNotLike(String value) { + addCriterion("resource_pool_node not like", value, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeIn(List values) { + addCriterion("resource_pool_node in", values, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeNotIn(List values) { + addCriterion("resource_pool_node not in", values, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeBetween(String value1, String value2) { + addCriterion("resource_pool_node between", value1, value2, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourcePoolNodeNotBetween(String value1, String value2) { + addCriterion("resource_pool_node not between", value1, value2, "resourcePoolNode"); + return (Criteria) this; + } + + public Criteria andResourceTypeIsNull() { + addCriterion("resource_type is null"); + return (Criteria) this; + } + + public Criteria andResourceTypeIsNotNull() { + addCriterion("resource_type is not null"); + return (Criteria) this; + } + + public Criteria andResourceTypeEqualTo(String value) { + addCriterion("resource_type =", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotEqualTo(String value) { + addCriterion("resource_type <>", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeGreaterThan(String value) { + addCriterion("resource_type >", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeGreaterThanOrEqualTo(String value) { + addCriterion("resource_type >=", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLessThan(String value) { + addCriterion("resource_type <", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLessThanOrEqualTo(String value) { + addCriterion("resource_type <=", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLike(String value) { + addCriterion("resource_type like", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotLike(String value) { + addCriterion("resource_type not like", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeIn(List values) { + addCriterion("resource_type in", values, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotIn(List values) { + addCriterion("resource_type not in", values, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeBetween(String value1, String value2) { + addCriterion("resource_type between", value1, value2, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotBetween(String value1, String value2) { + addCriterion("resource_type not between", value1, value2, "resourceType"); + 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 Criteria andOrganizationIdIsNull() { + addCriterion("organization_id is null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNotNull() { + addCriterion("organization_id is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdEqualTo(String value) { + addCriterion("organization_id =", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotEqualTo(String value) { + addCriterion("organization_id <>", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThan(String value) { + addCriterion("organization_id >", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThanOrEqualTo(String value) { + addCriterion("organization_id >=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThan(String value) { + addCriterion("organization_id <", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThanOrEqualTo(String value) { + addCriterion("organization_id <=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLike(String value) { + addCriterion("organization_id like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotLike(String value) { + addCriterion("organization_id not like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIn(List values) { + addCriterion("organization_id in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("organization_id not in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdBetween(String value1, String value2) { + addCriterion("organization_id between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotBetween(String value1, String value2) { + addCriterion("organization_id not between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andThreadIdIsNull() { + addCriterion("thread_id is null"); + return (Criteria) this; + } + + public Criteria andThreadIdIsNotNull() { + addCriterion("thread_id is not null"); + return (Criteria) this; + } + + public Criteria andThreadIdEqualTo(String value) { + addCriterion("thread_id =", value, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdNotEqualTo(String value) { + addCriterion("thread_id <>", value, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdGreaterThan(String value) { + addCriterion("thread_id >", value, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdGreaterThanOrEqualTo(String value) { + addCriterion("thread_id >=", value, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdLessThan(String value) { + addCriterion("thread_id <", value, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdLessThanOrEqualTo(String value) { + addCriterion("thread_id <=", value, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdLike(String value) { + addCriterion("thread_id like", value, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdNotLike(String value) { + addCriterion("thread_id not like", value, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdIn(List values) { + addCriterion("thread_id in", values, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdNotIn(List values) { + addCriterion("thread_id not in", values, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdBetween(String value1, String value2) { + addCriterion("thread_id between", value1, value2, "threadId"); + return (Criteria) this; + } + + public Criteria andThreadIdNotBetween(String value1, String value2) { + addCriterion("thread_id not between", value1, value2, "threadId"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Long value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Long value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Long value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Long value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Long value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Long value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Long value1, Long value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Long value1, Long value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + 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 Criteria andExecutorIsNull() { + addCriterion("executor is null"); + return (Criteria) this; + } + + public Criteria andExecutorIsNotNull() { + addCriterion("executor is not null"); + return (Criteria) this; + } + + public Criteria andExecutorEqualTo(String value) { + addCriterion("executor =", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorNotEqualTo(String value) { + addCriterion("executor <>", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorGreaterThan(String value) { + addCriterion("executor >", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorGreaterThanOrEqualTo(String value) { + addCriterion("executor >=", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorLessThan(String value) { + addCriterion("executor <", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorLessThanOrEqualTo(String value) { + addCriterion("executor <=", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorLike(String value) { + addCriterion("executor like", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorNotLike(String value) { + addCriterion("executor not like", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorIn(List values) { + addCriterion("executor in", values, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorNotIn(List values) { + addCriterion("executor not in", values, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorBetween(String value1, String value2) { + addCriterion("executor between", value1, value2, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorNotBetween(String value1, String value2) { + addCriterion("executor not between", value1, value2, "executor"); + 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/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskItemMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskItemMapper.java new file mode 100644 index 0000000000..81cdba20ba --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskItemMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.ExecTaskItem; +import io.metersphere.system.domain.ExecTaskItemExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ExecTaskItemMapper { + long countByExample(ExecTaskItemExample example); + + int deleteByExample(ExecTaskItemExample example); + + int deleteByPrimaryKey(String id); + + int insert(ExecTaskItem record); + + int insertSelective(ExecTaskItem record); + + List selectByExample(ExecTaskItemExample example); + + ExecTaskItem selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ExecTaskItem record, @Param("example") ExecTaskItemExample example); + + int updateByExample(@Param("record") ExecTaskItem record, @Param("example") ExecTaskItemExample example); + + int updateByPrimaryKeySelective(ExecTaskItem record); + + int updateByPrimaryKey(ExecTaskItem record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") ExecTaskItem.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskItemMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskItemMapper.xml new file mode 100644 index 0000000000..22ea7706f0 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskItemMapper.xml @@ -0,0 +1,444 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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, task_id, resource_id, task_origin, `status`, `result`, resource_pool_id, resource_pool_node, + resource_type, project_id, organization_id, thread_id, start_time, end_time, executor + + + + + delete from exec_task_item + where id = #{id,jdbcType=VARCHAR} + + + delete from exec_task_item + + + + + + insert into exec_task_item (id, task_id, resource_id, + task_origin, `status`, `result`, + resource_pool_id, resource_pool_node, resource_type, + project_id, organization_id, thread_id, + start_time, end_time, executor + ) + values (#{id,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR}, + #{taskOrigin,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, + #{resourcePoolId,jdbcType=VARCHAR}, #{resourcePoolNode,jdbcType=VARCHAR}, #{resourceType,jdbcType=VARCHAR}, + #{projectId,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR}, #{threadId,jdbcType=VARCHAR}, + #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{executor,jdbcType=VARCHAR} + ) + + + insert into exec_task_item + + + id, + + + task_id, + + + resource_id, + + + task_origin, + + + `status`, + + + `result`, + + + resource_pool_id, + + + resource_pool_node, + + + resource_type, + + + project_id, + + + organization_id, + + + thread_id, + + + start_time, + + + end_time, + + + executor, + + + + + #{id,jdbcType=VARCHAR}, + + + #{taskId,jdbcType=VARCHAR}, + + + #{resourceId,jdbcType=VARCHAR}, + + + #{taskOrigin,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{result,jdbcType=VARCHAR}, + + + #{resourcePoolId,jdbcType=VARCHAR}, + + + #{resourcePoolNode,jdbcType=VARCHAR}, + + + #{resourceType,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{organizationId,jdbcType=VARCHAR}, + + + #{threadId,jdbcType=VARCHAR}, + + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + #{executor,jdbcType=VARCHAR}, + + + + + + update exec_task_item + + + id = #{record.id,jdbcType=VARCHAR}, + + + task_id = #{record.taskId,jdbcType=VARCHAR}, + + + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + + + task_origin = #{record.taskOrigin,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + `result` = #{record.result,jdbcType=VARCHAR}, + + + resource_pool_id = #{record.resourcePoolId,jdbcType=VARCHAR}, + + + resource_pool_node = #{record.resourcePoolNode,jdbcType=VARCHAR}, + + + resource_type = #{record.resourceType,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + organization_id = #{record.organizationId,jdbcType=VARCHAR}, + + + thread_id = #{record.threadId,jdbcType=VARCHAR}, + + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + executor = #{record.executor,jdbcType=VARCHAR}, + + + + + + + + update exec_task_item + set id = #{record.id,jdbcType=VARCHAR}, + task_id = #{record.taskId,jdbcType=VARCHAR}, + resource_id = #{record.resourceId,jdbcType=VARCHAR}, + task_origin = #{record.taskOrigin,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + `result` = #{record.result,jdbcType=VARCHAR}, + resource_pool_id = #{record.resourcePoolId,jdbcType=VARCHAR}, + resource_pool_node = #{record.resourcePoolNode,jdbcType=VARCHAR}, + resource_type = #{record.resourceType,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + organization_id = #{record.organizationId,jdbcType=VARCHAR}, + thread_id = #{record.threadId,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT}, + executor = #{record.executor,jdbcType=VARCHAR} + + + + + + update exec_task_item + + + task_id = #{taskId,jdbcType=VARCHAR}, + + + resource_id = #{resourceId,jdbcType=VARCHAR}, + + + task_origin = #{taskOrigin,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + `result` = #{result,jdbcType=VARCHAR}, + + + resource_pool_id = #{resourcePoolId,jdbcType=VARCHAR}, + + + resource_pool_node = #{resourcePoolNode,jdbcType=VARCHAR}, + + + resource_type = #{resourceType,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + organization_id = #{organizationId,jdbcType=VARCHAR}, + + + thread_id = #{threadId,jdbcType=VARCHAR}, + + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + executor = #{executor,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update exec_task_item + set task_id = #{taskId,jdbcType=VARCHAR}, + resource_id = #{resourceId,jdbcType=VARCHAR}, + task_origin = #{taskOrigin,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + `result` = #{result,jdbcType=VARCHAR}, + resource_pool_id = #{resourcePoolId,jdbcType=VARCHAR}, + resource_pool_node = #{resourcePoolNode,jdbcType=VARCHAR}, + resource_type = #{resourceType,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + organization_id = #{organizationId,jdbcType=VARCHAR}, + thread_id = #{threadId,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT}, + executor = #{executor,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + insert into exec_task_item + (id, task_id, resource_id, task_origin, `status`, `result`, resource_pool_id, resource_pool_node, + resource_type, project_id, organization_id, thread_id, start_time, end_time, executor + ) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.taskId,jdbcType=VARCHAR}, #{item.resourceId,jdbcType=VARCHAR}, + #{item.taskOrigin,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.result,jdbcType=VARCHAR}, + #{item.resourcePoolId,jdbcType=VARCHAR}, #{item.resourcePoolNode,jdbcType=VARCHAR}, + #{item.resourceType,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.organizationId,jdbcType=VARCHAR}, + #{item.threadId,jdbcType=VARCHAR}, #{item.startTime,jdbcType=BIGINT}, #{item.endTime,jdbcType=BIGINT}, + #{item.executor,jdbcType=VARCHAR}) + + + + insert into exec_task_item ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.taskId,jdbcType=VARCHAR} + + + #{item.resourceId,jdbcType=VARCHAR} + + + #{item.taskOrigin,jdbcType=VARCHAR} + + + #{item.status,jdbcType=VARCHAR} + + + #{item.result,jdbcType=VARCHAR} + + + #{item.resourcePoolId,jdbcType=VARCHAR} + + + #{item.resourcePoolNode,jdbcType=VARCHAR} + + + #{item.resourceType,jdbcType=VARCHAR} + + + #{item.projectId,jdbcType=VARCHAR} + + + #{item.organizationId,jdbcType=VARCHAR} + + + #{item.threadId,jdbcType=VARCHAR} + + + #{item.startTime,jdbcType=BIGINT} + + + #{item.endTime,jdbcType=BIGINT} + + + #{item.executor,jdbcType=VARCHAR} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.java new file mode 100644 index 0000000000..b3e75d5f0a --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.ExecTask; +import io.metersphere.system.domain.ExecTaskExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ExecTaskMapper { + long countByExample(ExecTaskExample example); + + int deleteByExample(ExecTaskExample example); + + int deleteByPrimaryKey(String id); + + int insert(ExecTask record); + + int insertSelective(ExecTask record); + + List selectByExample(ExecTaskExample example); + + ExecTask selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ExecTask record, @Param("example") ExecTaskExample example); + + int updateByExample(@Param("record") ExecTask record, @Param("example") ExecTaskExample example); + + int updateByPrimaryKeySelective(ExecTask record); + + int updateByPrimaryKey(ExecTask record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") ExecTask.Column ... selective); +} \ No newline at end of file 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 new file mode 100644 index 0000000000..e7b255684d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/ExecTaskMapper.xml @@ -0,0 +1,422 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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, num, task_name, `status`, case_count, `result`, task_type, trigger_mode, project_id, + organization_id, create_time, create_user, start_time, end_time + + + + + delete from exec_task + where id = #{id,jdbcType=VARCHAR} + + + delete from exec_task + + + + + + insert into exec_task (id, num, task_name, + `status`, case_count, `result`, + task_type, trigger_mode, project_id, + organization_id, create_time, create_user, + start_time, end_time) + values (#{id,jdbcType=VARCHAR}, #{num,jdbcType=BIGINT}, #{taskName,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{caseCount,jdbcType=BIGINT}, #{result,jdbcType=VARCHAR}, + #{taskType,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, + #{organizationId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{startTime,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}) + + + insert into exec_task + + + 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,jdbcType=VARCHAR}, + + + #{num,jdbcType=BIGINT}, + + + #{taskName,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{caseCount,jdbcType=BIGINT}, + + + #{result,jdbcType=VARCHAR}, + + + #{taskType,jdbcType=VARCHAR}, + + + #{triggerMode,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{organizationId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{startTime,jdbcType=BIGINT}, + + + #{endTime,jdbcType=BIGINT}, + + + + + + update exec_task + + + id = #{record.id,jdbcType=VARCHAR}, + + + num = #{record.num,jdbcType=BIGINT}, + + + task_name = #{record.taskName,jdbcType=VARCHAR}, + + + `status` = #{record.status,jdbcType=VARCHAR}, + + + case_count = #{record.caseCount,jdbcType=BIGINT}, + + + `result` = #{record.result,jdbcType=VARCHAR}, + + + task_type = #{record.taskType,jdbcType=VARCHAR}, + + + trigger_mode = #{record.triggerMode,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + organization_id = #{record.organizationId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + start_time = #{record.startTime,jdbcType=BIGINT}, + + + end_time = #{record.endTime,jdbcType=BIGINT}, + + + + + + + + update exec_task + set id = #{record.id,jdbcType=VARCHAR}, + num = #{record.num,jdbcType=BIGINT}, + task_name = #{record.taskName,jdbcType=VARCHAR}, + `status` = #{record.status,jdbcType=VARCHAR}, + case_count = #{record.caseCount,jdbcType=BIGINT}, + `result` = #{record.result,jdbcType=VARCHAR}, + task_type = #{record.taskType,jdbcType=VARCHAR}, + trigger_mode = #{record.triggerMode,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + organization_id = #{record.organizationId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + start_time = #{record.startTime,jdbcType=BIGINT}, + end_time = #{record.endTime,jdbcType=BIGINT} + + + + + + update exec_task + + + num = #{num,jdbcType=BIGINT}, + + + task_name = #{taskName,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=VARCHAR}, + + + case_count = #{caseCount,jdbcType=BIGINT}, + + + `result` = #{result,jdbcType=VARCHAR}, + + + task_type = #{taskType,jdbcType=VARCHAR}, + + + trigger_mode = #{triggerMode,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + organization_id = #{organizationId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + start_time = #{startTime,jdbcType=BIGINT}, + + + end_time = #{endTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update exec_task + set num = #{num,jdbcType=BIGINT}, + task_name = #{taskName,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=VARCHAR}, + case_count = #{caseCount,jdbcType=BIGINT}, + `result` = #{result,jdbcType=VARCHAR}, + task_type = #{taskType,jdbcType=VARCHAR}, + trigger_mode = #{triggerMode,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + organization_id = #{organizationId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=BIGINT}, + end_time = #{endTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + + insert into exec_task + (id, num, task_name, `status`, case_count, `result`, task_type, trigger_mode, project_id, + organization_id, create_time, create_user, start_time, end_time) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.num,jdbcType=BIGINT}, #{item.taskName,jdbcType=VARCHAR}, + #{item.status,jdbcType=VARCHAR}, #{item.caseCount,jdbcType=BIGINT}, #{item.result,jdbcType=VARCHAR}, + #{item.taskType,jdbcType=VARCHAR}, #{item.triggerMode,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, + #{item.organizationId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, + #{item.startTime,jdbcType=BIGINT}, #{item.endTime,jdbcType=BIGINT}) + + + + insert into exec_task ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.num,jdbcType=BIGINT} + + + #{item.taskName,jdbcType=VARCHAR} + + + #{item.status,jdbcType=VARCHAR} + + + #{item.caseCount,jdbcType=BIGINT} + + + #{item.result,jdbcType=VARCHAR} + + + #{item.taskType,jdbcType=VARCHAR} + + + #{item.triggerMode,jdbcType=VARCHAR} + + + #{item.projectId,jdbcType=VARCHAR} + + + #{item.organizationId,jdbcType=VARCHAR} + + + #{item.createTime,jdbcType=BIGINT} + + + #{item.createUser,jdbcType=VARCHAR} + + + #{item.startTime,jdbcType=BIGINT} + + + #{item.endTime,jdbcType=BIGINT} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/resources/migration/3.4.0/ddl/V3.4.0_1__init.sql b/backend/framework/domain/src/main/resources/migration/3.4.0/ddl/V3.4.0_1__init.sql new file mode 100644 index 0000000000..d3fec9ab66 --- /dev/null +++ b/backend/framework/domain/src/main/resources/migration/3.4.0/ddl/V3.4.0_1__init.sql @@ -0,0 +1 @@ +select database(); \ No newline at end of file diff --git a/backend/framework/domain/src/main/resources/migration/3.4.0/ddl/V3.4.0_2__ga_ddl.sql b/backend/framework/domain/src/main/resources/migration/3.4.0/ddl/V3.4.0_2__ga_ddl.sql new file mode 100644 index 0000000000..d45ff3dc2d --- /dev/null +++ b/backend/framework/domain/src/main/resources/migration/3.4.0/ddl/V3.4.0_2__ga_ddl.sql @@ -0,0 +1,74 @@ +-- set innodb lock wait timeout +SET SESSION innodb_lock_wait_timeout = 7200; + +-- 执行任务表 +CREATE TABLE IF NOT EXISTS exec_task( + `id` VARCHAR(50) NOT NULL COMMENT '任务ID' , + `num` BIGINT NOT NULL COMMENT '编号' , + `task_name` VARCHAR(255) NOT NULL COMMENT '任务名称' , + `status` VARCHAR(20) NOT NULL COMMENT '状态' , + `case_count` BIGINT NOT NULL COMMENT '用例数量' , + `result` VARCHAR(64) COMMENT '执行结果' , + `task_type` VARCHAR(50) NOT NULL COMMENT '任务类型' , + `trigger_mode` VARCHAR(20) NOT NULL COMMENT '执行模式' , + `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , + `organization_id` VARCHAR(50) NOT NULL COMMENT '组织ID' , + `create_time` BIGINT NOT NULL COMMENT '创建时间' , + `create_user` VARCHAR(50) NOT NULL COMMENT '创建人' , + `start_time` BIGINT COMMENT '开始时间' , + `end_time` BIGINT COMMENT '结束时间' , + PRIMARY KEY (id) + ) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '执行任务表'; + +CREATE INDEX idx_num ON exec_task(num); +CREATE INDEX idx_name ON exec_task(task_name); +CREATE INDEX idx_status ON exec_task(status); +CREATE INDEX idx_result ON exec_task(result); +CREATE INDEX idx_project_id ON exec_task(project_id); +CREATE INDEX idx_organization_id ON exec_task(organization_id); +CREATE INDEX idx_create_time ON exec_task(create_time desc); +CREATE INDEX idx_create_user ON exec_task(create_user); +CREATE INDEX idx_start_time ON exec_task(start_time); +CREATE INDEX idx_end_time ON exec_task(end_time); +CREATE INDEX idx_trigger_mode ON exec_task(trigger_mode); + + +-- 执行任务详情表 +CREATE TABLE IF NOT EXISTS exec_task_item( + `id` VARCHAR(50) NOT NULL COMMENT '主键ID' , + `task_id` VARCHAR(50) NOT NULL COMMENT '任务ID' , + `resource_id` VARCHAR(50) NOT NULL COMMENT '资源ID' , + `task_origin` VARCHAR(50) COMMENT '任务来源(任务组下的任务id)' , + `status` VARCHAR(20) NOT NULL COMMENT '执行状态' , + `result` VARCHAR(255) COMMENT '执行结果' , + `resource_pool_id` VARCHAR(50) NOT NULL COMMENT '资源池ID' , + `resource_pool_node` VARCHAR(50) COMMENT '节点' , + `resource_type` VARCHAR(50) NOT NULL COMMENT '资源类型' , + `project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' , + `organization_id` VARCHAR(50) NOT NULL COMMENT '组织ID' , + `thread_id` VARCHAR(50) COMMENT '线程ID' , + `start_time` BIGINT COMMENT '执行开始时间' , + `end_time` BIGINT COMMENT '执行完成时间' , + `executor` VARCHAR(50) NOT NULL COMMENT '执行人' , + PRIMARY KEY (id) + ) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_general_ci COMMENT = '执行任务详情表'; + +CREATE INDEX idx_task_id ON exec_task_item(task_id); +CREATE INDEX idx_resource_id ON exec_task_item(resource_id); +CREATE INDEX idx_status ON exec_task_item(status); +CREATE INDEX idx_result ON exec_task_item(result); +CREATE INDEX idx_resource_pool_id ON exec_task_item(resource_pool_id); +CREATE INDEX idx_resource_pool_node ON exec_task_item(resource_pool_node); +CREATE INDEX idx_project_id ON exec_task_item(project_id); +CREATE INDEX idx_organization_id ON exec_task_item(organization_id); +CREATE INDEX idx_thread_id ON exec_task_item(thread_id); +CREATE INDEX idx_start_time ON exec_task_item(start_time desc); +CREATE INDEX idx_end_time ON exec_task_item(end_time desc); +CREATE INDEX idx_executor ON exec_task_item(executor); + +-- set innodb lock wait timeout to default +SET SESSION innodb_lock_wait_timeout = DEFAULT; \ No newline at end of file diff --git a/backend/framework/domain/src/main/resources/migration/3.4.0/dml/V3.4.0_2_1__data.sql b/backend/framework/domain/src/main/resources/migration/3.4.0/dml/V3.4.0_2_1__data.sql new file mode 100644 index 0000000000..1947631a33 --- /dev/null +++ b/backend/framework/domain/src/main/resources/migration/3.4.0/dml/V3.4.0_2_1__data.sql @@ -0,0 +1,2 @@ +-- set innodb lock wait timeout +SET SESSION innodb_lock_wait_timeout = 7200;