diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueue.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueue.java deleted file mode 100644 index c15b28fa63..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueue.java +++ /dev/null @@ -1,43 +0,0 @@ -package io.metersphere.sdk.domain; - -import io.metersphere.validation.groups.*; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; -import java.io.Serializable; -import lombok.Data; - -@Data -public class ExecutionQueue implements Serializable { - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{execution_queue.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{execution_queue.id.length_range}", groups = {Created.class, Updated.class}) - private String id; - - @Schema(description = "集合报告/测试计划报告", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{execution_queue.report_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{execution_queue.report_id.length_range}", groups = {Created.class, Updated.class}) - private String reportId; - - @Schema(description = "报告类型/计划报告/单独报告", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{execution_queue.report_type.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{execution_queue.report_type.length_range}", groups = {Created.class, Updated.class}) - private String reportType; - - @Schema(description = "执行模式/scenario/api/test_paln_api/test_pan_scenario", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{execution_queue.run_mode.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 100, message = "{execution_queue.run_mode.length_range}", groups = {Created.class, Updated.class}) - private String runMode; - - @Schema(description = "执行资源池", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{execution_queue.pool_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{execution_queue.pool_id.length_range}", groups = {Created.class, Updated.class}) - private String poolId; - - @Schema(description = "创建时间") - private Long createTime; - - @Schema(description = "") - private Boolean failure; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetail.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetail.java deleted file mode 100644 index e67c42943b..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetail.java +++ /dev/null @@ -1,47 +0,0 @@ -package io.metersphere.sdk.domain; - -import io.metersphere.validation.groups.*; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.*; -import java.io.Serializable; -import lombok.Data; - -@Data -public class ExecutionQueueDetail implements Serializable { - @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{execution_queue_detail.id.not_blank}", groups = {Updated.class}) - @Size(min = 1, max = 50, message = "{execution_queue_detail.id.length_range}", groups = {Created.class, Updated.class}) - private String id; - - @Schema(description = "队列id") - private String queueId; - - @Schema(description = "排序") - private Integer sort; - - @Schema(description = "报告id") - private String reportId; - - @Schema(description = "资源id") - private String testId; - - @Schema(description = "资源类型") - private String type; - - @Schema(description = "创建时间") - private Long createTime; - - @Schema(description = "是否开启失败重试") - private Boolean retryEnable; - - @Schema(description = "失败重试次数") - private Long retryNumber; - - @Schema(description = "项目ID集合") - private String projectIds; - - @Schema(description = "环境") - private String evnMap; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetailExample.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetailExample.java deleted file mode 100644 index d0277d442e..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueDetailExample.java +++ /dev/null @@ -1,860 +0,0 @@ -package io.metersphere.sdk.domain; - -import java.util.ArrayList; -import java.util.List; - -public class ExecutionQueueDetailExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ExecutionQueueDetailExample() { - 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 andQueueIdIsNull() { - addCriterion("queue_id is null"); - return (Criteria) this; - } - - public Criteria andQueueIdIsNotNull() { - addCriterion("queue_id is not null"); - return (Criteria) this; - } - - public Criteria andQueueIdEqualTo(String value) { - addCriterion("queue_id =", value, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdNotEqualTo(String value) { - addCriterion("queue_id <>", value, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdGreaterThan(String value) { - addCriterion("queue_id >", value, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdGreaterThanOrEqualTo(String value) { - addCriterion("queue_id >=", value, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdLessThan(String value) { - addCriterion("queue_id <", value, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdLessThanOrEqualTo(String value) { - addCriterion("queue_id <=", value, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdLike(String value) { - addCriterion("queue_id like", value, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdNotLike(String value) { - addCriterion("queue_id not like", value, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdIn(List values) { - addCriterion("queue_id in", values, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdNotIn(List values) { - addCriterion("queue_id not in", values, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdBetween(String value1, String value2) { - addCriterion("queue_id between", value1, value2, "queueId"); - return (Criteria) this; - } - - public Criteria andQueueIdNotBetween(String value1, String value2) { - addCriterion("queue_id not between", value1, value2, "queueId"); - return (Criteria) this; - } - - public Criteria andSortIsNull() { - addCriterion("sort is null"); - return (Criteria) this; - } - - public Criteria andSortIsNotNull() { - addCriterion("sort is not null"); - return (Criteria) this; - } - - public Criteria andSortEqualTo(Integer value) { - addCriterion("sort =", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortNotEqualTo(Integer value) { - addCriterion("sort <>", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortGreaterThan(Integer value) { - addCriterion("sort >", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortGreaterThanOrEqualTo(Integer value) { - addCriterion("sort >=", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortLessThan(Integer value) { - addCriterion("sort <", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortLessThanOrEqualTo(Integer value) { - addCriterion("sort <=", value, "sort"); - return (Criteria) this; - } - - public Criteria andSortIn(List values) { - addCriterion("sort in", values, "sort"); - return (Criteria) this; - } - - public Criteria andSortNotIn(List values) { - addCriterion("sort not in", values, "sort"); - return (Criteria) this; - } - - public Criteria andSortBetween(Integer value1, Integer value2) { - addCriterion("sort between", value1, value2, "sort"); - return (Criteria) this; - } - - public Criteria andSortNotBetween(Integer value1, Integer value2) { - addCriterion("sort not between", value1, value2, "sort"); - return (Criteria) this; - } - - public Criteria andReportIdIsNull() { - addCriterion("report_id is null"); - return (Criteria) this; - } - - public Criteria andReportIdIsNotNull() { - addCriterion("report_id is not null"); - return (Criteria) this; - } - - public Criteria andReportIdEqualTo(String value) { - addCriterion("report_id =", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotEqualTo(String value) { - addCriterion("report_id <>", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdGreaterThan(String value) { - addCriterion("report_id >", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdGreaterThanOrEqualTo(String value) { - addCriterion("report_id >=", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdLessThan(String value) { - addCriterion("report_id <", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdLessThanOrEqualTo(String value) { - addCriterion("report_id <=", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdLike(String value) { - addCriterion("report_id like", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotLike(String value) { - addCriterion("report_id not like", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdIn(List values) { - addCriterion("report_id in", values, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotIn(List values) { - addCriterion("report_id not in", values, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdBetween(String value1, String value2) { - addCriterion("report_id between", value1, value2, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotBetween(String value1, String value2) { - addCriterion("report_id not between", value1, value2, "reportId"); - return (Criteria) this; - } - - public Criteria andTestIdIsNull() { - addCriterion("test_id is null"); - return (Criteria) this; - } - - public Criteria andTestIdIsNotNull() { - addCriterion("test_id is not null"); - return (Criteria) this; - } - - public Criteria andTestIdEqualTo(String value) { - addCriterion("test_id =", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdNotEqualTo(String value) { - addCriterion("test_id <>", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdGreaterThan(String value) { - addCriterion("test_id >", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdGreaterThanOrEqualTo(String value) { - addCriterion("test_id >=", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdLessThan(String value) { - addCriterion("test_id <", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdLessThanOrEqualTo(String value) { - addCriterion("test_id <=", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdLike(String value) { - addCriterion("test_id like", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdNotLike(String value) { - addCriterion("test_id not like", value, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdIn(List values) { - addCriterion("test_id in", values, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdNotIn(List values) { - addCriterion("test_id not in", values, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdBetween(String value1, String value2) { - addCriterion("test_id between", value1, value2, "testId"); - return (Criteria) this; - } - - public Criteria andTestIdNotBetween(String value1, String value2) { - addCriterion("test_id not between", value1, value2, "testId"); - return (Criteria) this; - } - - public Criteria andTypeIsNull() { - addCriterion("`type` is null"); - return (Criteria) this; - } - - public Criteria andTypeIsNotNull() { - addCriterion("`type` is not null"); - return (Criteria) this; - } - - public Criteria andTypeEqualTo(String value) { - addCriterion("`type` =", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotEqualTo(String value) { - addCriterion("`type` <>", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThan(String value) { - addCriterion("`type` >", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThanOrEqualTo(String value) { - addCriterion("`type` >=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThan(String value) { - addCriterion("`type` <", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThanOrEqualTo(String value) { - addCriterion("`type` <=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLike(String value) { - addCriterion("`type` like", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotLike(String value) { - addCriterion("`type` not like", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeIn(List values) { - addCriterion("`type` in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotIn(List values) { - addCriterion("`type` not in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeBetween(String value1, String value2) { - addCriterion("`type` between", value1, value2, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotBetween(String value1, String value2) { - addCriterion("`type` not between", value1, value2, "type"); - 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 andRetryEnableIsNull() { - addCriterion("retry_enable is null"); - return (Criteria) this; - } - - public Criteria andRetryEnableIsNotNull() { - addCriterion("retry_enable is not null"); - return (Criteria) this; - } - - public Criteria andRetryEnableEqualTo(Boolean value) { - addCriterion("retry_enable =", value, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryEnableNotEqualTo(Boolean value) { - addCriterion("retry_enable <>", value, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryEnableGreaterThan(Boolean value) { - addCriterion("retry_enable >", value, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryEnableGreaterThanOrEqualTo(Boolean value) { - addCriterion("retry_enable >=", value, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryEnableLessThan(Boolean value) { - addCriterion("retry_enable <", value, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryEnableLessThanOrEqualTo(Boolean value) { - addCriterion("retry_enable <=", value, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryEnableIn(List values) { - addCriterion("retry_enable in", values, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryEnableNotIn(List values) { - addCriterion("retry_enable not in", values, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryEnableBetween(Boolean value1, Boolean value2) { - addCriterion("retry_enable between", value1, value2, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryEnableNotBetween(Boolean value1, Boolean value2) { - addCriterion("retry_enable not between", value1, value2, "retryEnable"); - return (Criteria) this; - } - - public Criteria andRetryNumberIsNull() { - addCriterion("retry_number is null"); - return (Criteria) this; - } - - public Criteria andRetryNumberIsNotNull() { - addCriterion("retry_number is not null"); - return (Criteria) this; - } - - public Criteria andRetryNumberEqualTo(Long value) { - addCriterion("retry_number =", value, "retryNumber"); - return (Criteria) this; - } - - public Criteria andRetryNumberNotEqualTo(Long value) { - addCriterion("retry_number <>", value, "retryNumber"); - return (Criteria) this; - } - - public Criteria andRetryNumberGreaterThan(Long value) { - addCriterion("retry_number >", value, "retryNumber"); - return (Criteria) this; - } - - public Criteria andRetryNumberGreaterThanOrEqualTo(Long value) { - addCriterion("retry_number >=", value, "retryNumber"); - return (Criteria) this; - } - - public Criteria andRetryNumberLessThan(Long value) { - addCriterion("retry_number <", value, "retryNumber"); - return (Criteria) this; - } - - public Criteria andRetryNumberLessThanOrEqualTo(Long value) { - addCriterion("retry_number <=", value, "retryNumber"); - return (Criteria) this; - } - - public Criteria andRetryNumberIn(List values) { - addCriterion("retry_number in", values, "retryNumber"); - return (Criteria) this; - } - - public Criteria andRetryNumberNotIn(List values) { - addCriterion("retry_number not in", values, "retryNumber"); - return (Criteria) this; - } - - public Criteria andRetryNumberBetween(Long value1, Long value2) { - addCriterion("retry_number between", value1, value2, "retryNumber"); - return (Criteria) this; - } - - public Criteria andRetryNumberNotBetween(Long value1, Long value2) { - addCriterion("retry_number not between", value1, value2, "retryNumber"); - return (Criteria) this; - } - - public Criteria andProjectIdsIsNull() { - addCriterion("project_ids is null"); - return (Criteria) this; - } - - public Criteria andProjectIdsIsNotNull() { - addCriterion("project_ids is not null"); - return (Criteria) this; - } - - public Criteria andProjectIdsEqualTo(String value) { - addCriterion("project_ids =", value, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsNotEqualTo(String value) { - addCriterion("project_ids <>", value, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsGreaterThan(String value) { - addCriterion("project_ids >", value, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsGreaterThanOrEqualTo(String value) { - addCriterion("project_ids >=", value, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsLessThan(String value) { - addCriterion("project_ids <", value, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsLessThanOrEqualTo(String value) { - addCriterion("project_ids <=", value, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsLike(String value) { - addCriterion("project_ids like", value, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsNotLike(String value) { - addCriterion("project_ids not like", value, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsIn(List values) { - addCriterion("project_ids in", values, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsNotIn(List values) { - addCriterion("project_ids not in", values, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsBetween(String value1, String value2) { - addCriterion("project_ids between", value1, value2, "projectIds"); - return (Criteria) this; - } - - public Criteria andProjectIdsNotBetween(String value1, String value2) { - addCriterion("project_ids not between", value1, value2, "projectIds"); - 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/sdk/domain/ExecutionQueueExample.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueExample.java deleted file mode 100644 index 927044fc97..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/domain/ExecutionQueueExample.java +++ /dev/null @@ -1,670 +0,0 @@ -package io.metersphere.sdk.domain; - -import java.util.ArrayList; -import java.util.List; - -public class ExecutionQueueExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ExecutionQueueExample() { - 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 andReportIdIsNull() { - addCriterion("report_id is null"); - return (Criteria) this; - } - - public Criteria andReportIdIsNotNull() { - addCriterion("report_id is not null"); - return (Criteria) this; - } - - public Criteria andReportIdEqualTo(String value) { - addCriterion("report_id =", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotEqualTo(String value) { - addCriterion("report_id <>", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdGreaterThan(String value) { - addCriterion("report_id >", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdGreaterThanOrEqualTo(String value) { - addCriterion("report_id >=", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdLessThan(String value) { - addCriterion("report_id <", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdLessThanOrEqualTo(String value) { - addCriterion("report_id <=", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdLike(String value) { - addCriterion("report_id like", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotLike(String value) { - addCriterion("report_id not like", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdIn(List values) { - addCriterion("report_id in", values, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotIn(List values) { - addCriterion("report_id not in", values, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdBetween(String value1, String value2) { - addCriterion("report_id between", value1, value2, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotBetween(String value1, String value2) { - addCriterion("report_id not between", value1, value2, "reportId"); - return (Criteria) this; - } - - public Criteria andReportTypeIsNull() { - addCriterion("report_type is null"); - return (Criteria) this; - } - - public Criteria andReportTypeIsNotNull() { - addCriterion("report_type is not null"); - return (Criteria) this; - } - - public Criteria andReportTypeEqualTo(String value) { - addCriterion("report_type =", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeNotEqualTo(String value) { - addCriterion("report_type <>", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeGreaterThan(String value) { - addCriterion("report_type >", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeGreaterThanOrEqualTo(String value) { - addCriterion("report_type >=", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeLessThan(String value) { - addCriterion("report_type <", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeLessThanOrEqualTo(String value) { - addCriterion("report_type <=", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeLike(String value) { - addCriterion("report_type like", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeNotLike(String value) { - addCriterion("report_type not like", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeIn(List values) { - addCriterion("report_type in", values, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeNotIn(List values) { - addCriterion("report_type not in", values, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeBetween(String value1, String value2) { - addCriterion("report_type between", value1, value2, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeNotBetween(String value1, String value2) { - addCriterion("report_type not between", value1, value2, "reportType"); - return (Criteria) this; - } - - public Criteria andRunModeIsNull() { - addCriterion("run_mode is null"); - return (Criteria) this; - } - - public Criteria andRunModeIsNotNull() { - addCriterion("run_mode is not null"); - return (Criteria) this; - } - - public Criteria andRunModeEqualTo(String value) { - addCriterion("run_mode =", value, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeNotEqualTo(String value) { - addCriterion("run_mode <>", value, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeGreaterThan(String value) { - addCriterion("run_mode >", value, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeGreaterThanOrEqualTo(String value) { - addCriterion("run_mode >=", value, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeLessThan(String value) { - addCriterion("run_mode <", value, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeLessThanOrEqualTo(String value) { - addCriterion("run_mode <=", value, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeLike(String value) { - addCriterion("run_mode like", value, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeNotLike(String value) { - addCriterion("run_mode not like", value, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeIn(List values) { - addCriterion("run_mode in", values, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeNotIn(List values) { - addCriterion("run_mode not in", values, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeBetween(String value1, String value2) { - addCriterion("run_mode between", value1, value2, "runMode"); - return (Criteria) this; - } - - public Criteria andRunModeNotBetween(String value1, String value2) { - addCriterion("run_mode not between", value1, value2, "runMode"); - return (Criteria) this; - } - - public Criteria andPoolIdIsNull() { - addCriterion("pool_id is null"); - return (Criteria) this; - } - - public Criteria andPoolIdIsNotNull() { - addCriterion("pool_id is not null"); - return (Criteria) this; - } - - public Criteria andPoolIdEqualTo(String value) { - addCriterion("pool_id =", value, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdNotEqualTo(String value) { - addCriterion("pool_id <>", value, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdGreaterThan(String value) { - addCriterion("pool_id >", value, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdGreaterThanOrEqualTo(String value) { - addCriterion("pool_id >=", value, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdLessThan(String value) { - addCriterion("pool_id <", value, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdLessThanOrEqualTo(String value) { - addCriterion("pool_id <=", value, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdLike(String value) { - addCriterion("pool_id like", value, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdNotLike(String value) { - addCriterion("pool_id not like", value, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdIn(List values) { - addCriterion("pool_id in", values, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdNotIn(List values) { - addCriterion("pool_id not in", values, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdBetween(String value1, String value2) { - addCriterion("pool_id between", value1, value2, "poolId"); - return (Criteria) this; - } - - public Criteria andPoolIdNotBetween(String value1, String value2) { - addCriterion("pool_id not between", value1, value2, "poolId"); - 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 andFailureIsNull() { - addCriterion("failure is null"); - return (Criteria) this; - } - - public Criteria andFailureIsNotNull() { - addCriterion("failure is not null"); - return (Criteria) this; - } - - public Criteria andFailureEqualTo(Boolean value) { - addCriterion("failure =", value, "failure"); - return (Criteria) this; - } - - public Criteria andFailureNotEqualTo(Boolean value) { - addCriterion("failure <>", value, "failure"); - return (Criteria) this; - } - - public Criteria andFailureGreaterThan(Boolean value) { - addCriterion("failure >", value, "failure"); - return (Criteria) this; - } - - public Criteria andFailureGreaterThanOrEqualTo(Boolean value) { - addCriterion("failure >=", value, "failure"); - return (Criteria) this; - } - - public Criteria andFailureLessThan(Boolean value) { - addCriterion("failure <", value, "failure"); - return (Criteria) this; - } - - public Criteria andFailureLessThanOrEqualTo(Boolean value) { - addCriterion("failure <=", value, "failure"); - return (Criteria) this; - } - - public Criteria andFailureIn(List values) { - addCriterion("failure in", values, "failure"); - return (Criteria) this; - } - - public Criteria andFailureNotIn(List values) { - addCriterion("failure not in", values, "failure"); - return (Criteria) this; - } - - public Criteria andFailureBetween(Boolean value1, Boolean value2) { - addCriterion("failure between", value1, value2, "failure"); - return (Criteria) this; - } - - public Criteria andFailureNotBetween(Boolean value1, Boolean value2) { - addCriterion("failure not between", value1, value2, "failure"); - 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/sdk/mapper/ExecutionQueueDetailMapper.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.java deleted file mode 100644 index ea87fae8d7..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.metersphere.sdk.mapper; - -import io.metersphere.sdk.domain.ExecutionQueueDetail; -import io.metersphere.sdk.domain.ExecutionQueueDetailExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface ExecutionQueueDetailMapper { - long countByExample(ExecutionQueueDetailExample example); - - int deleteByExample(ExecutionQueueDetailExample example); - - int deleteByPrimaryKey(String id); - - int insert(ExecutionQueueDetail record); - - int insertSelective(ExecutionQueueDetail record); - - List selectByExampleWithBLOBs(ExecutionQueueDetailExample example); - - List selectByExample(ExecutionQueueDetailExample example); - - ExecutionQueueDetail selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") ExecutionQueueDetail record, @Param("example") ExecutionQueueDetailExample example); - - int updateByExampleWithBLOBs(@Param("record") ExecutionQueueDetail record, @Param("example") ExecutionQueueDetailExample example); - - int updateByExample(@Param("record") ExecutionQueueDetail record, @Param("example") ExecutionQueueDetailExample example); - - int updateByPrimaryKeySelective(ExecutionQueueDetail record); - - int updateByPrimaryKeyWithBLOBs(ExecutionQueueDetail record); - - int updateByPrimaryKey(ExecutionQueueDetail record); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.xml deleted file mode 100644 index 6eb8fda588..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueDetailMapper.xml +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 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, queue_id, sort, report_id, test_id, `type`, create_time, retry_enable, retry_number, - project_ids - - - evn_map - - - - - - delete from execution_queue_detail - where id = #{id,jdbcType=VARCHAR} - - - delete from execution_queue_detail - - - - - - insert into execution_queue_detail (id, queue_id, sort, - report_id, test_id, `type`, - create_time, retry_enable, retry_number, - project_ids, evn_map) - values (#{id,jdbcType=VARCHAR}, #{queueId,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, - #{reportId,jdbcType=VARCHAR}, #{testId,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}, #{retryEnable,jdbcType=BIT}, #{retryNumber,jdbcType=BIGINT}, - #{projectIds,jdbcType=VARCHAR}, #{evnMap,jdbcType=LONGVARCHAR}) - - - insert into execution_queue_detail - - - id, - - - queue_id, - - - sort, - - - report_id, - - - test_id, - - - `type`, - - - create_time, - - - retry_enable, - - - retry_number, - - - project_ids, - - - evn_map, - - - - - #{id,jdbcType=VARCHAR}, - - - #{queueId,jdbcType=VARCHAR}, - - - #{sort,jdbcType=INTEGER}, - - - #{reportId,jdbcType=VARCHAR}, - - - #{testId,jdbcType=VARCHAR}, - - - #{type,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=BIGINT}, - - - #{retryEnable,jdbcType=BIT}, - - - #{retryNumber,jdbcType=BIGINT}, - - - #{projectIds,jdbcType=VARCHAR}, - - - #{evnMap,jdbcType=LONGVARCHAR}, - - - - - - update execution_queue_detail - - - id = #{record.id,jdbcType=VARCHAR}, - - - queue_id = #{record.queueId,jdbcType=VARCHAR}, - - - sort = #{record.sort,jdbcType=INTEGER}, - - - report_id = #{record.reportId,jdbcType=VARCHAR}, - - - test_id = #{record.testId,jdbcType=VARCHAR}, - - - `type` = #{record.type,jdbcType=VARCHAR}, - - - create_time = #{record.createTime,jdbcType=BIGINT}, - - - retry_enable = #{record.retryEnable,jdbcType=BIT}, - - - retry_number = #{record.retryNumber,jdbcType=BIGINT}, - - - project_ids = #{record.projectIds,jdbcType=VARCHAR}, - - - evn_map = #{record.evnMap,jdbcType=LONGVARCHAR}, - - - - - - - - update execution_queue_detail - set id = #{record.id,jdbcType=VARCHAR}, - queue_id = #{record.queueId,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER}, - report_id = #{record.reportId,jdbcType=VARCHAR}, - test_id = #{record.testId,jdbcType=VARCHAR}, - `type` = #{record.type,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - retry_enable = #{record.retryEnable,jdbcType=BIT}, - retry_number = #{record.retryNumber,jdbcType=BIGINT}, - project_ids = #{record.projectIds,jdbcType=VARCHAR}, - evn_map = #{record.evnMap,jdbcType=LONGVARCHAR} - - - - - - update execution_queue_detail - set id = #{record.id,jdbcType=VARCHAR}, - queue_id = #{record.queueId,jdbcType=VARCHAR}, - sort = #{record.sort,jdbcType=INTEGER}, - report_id = #{record.reportId,jdbcType=VARCHAR}, - test_id = #{record.testId,jdbcType=VARCHAR}, - `type` = #{record.type,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - retry_enable = #{record.retryEnable,jdbcType=BIT}, - retry_number = #{record.retryNumber,jdbcType=BIGINT}, - project_ids = #{record.projectIds,jdbcType=VARCHAR} - - - - - - update execution_queue_detail - - - queue_id = #{queueId,jdbcType=VARCHAR}, - - - sort = #{sort,jdbcType=INTEGER}, - - - report_id = #{reportId,jdbcType=VARCHAR}, - - - test_id = #{testId,jdbcType=VARCHAR}, - - - `type` = #{type,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=BIGINT}, - - - retry_enable = #{retryEnable,jdbcType=BIT}, - - - retry_number = #{retryNumber,jdbcType=BIGINT}, - - - project_ids = #{projectIds,jdbcType=VARCHAR}, - - - evn_map = #{evnMap,jdbcType=LONGVARCHAR}, - - - where id = #{id,jdbcType=VARCHAR} - - - update execution_queue_detail - set queue_id = #{queueId,jdbcType=VARCHAR}, - sort = #{sort,jdbcType=INTEGER}, - report_id = #{reportId,jdbcType=VARCHAR}, - test_id = #{testId,jdbcType=VARCHAR}, - `type` = #{type,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - retry_enable = #{retryEnable,jdbcType=BIT}, - retry_number = #{retryNumber,jdbcType=BIGINT}, - project_ids = #{projectIds,jdbcType=VARCHAR}, - evn_map = #{evnMap,jdbcType=LONGVARCHAR} - where id = #{id,jdbcType=VARCHAR} - - - update execution_queue_detail - set queue_id = #{queueId,jdbcType=VARCHAR}, - sort = #{sort,jdbcType=INTEGER}, - report_id = #{reportId,jdbcType=VARCHAR}, - test_id = #{testId,jdbcType=VARCHAR}, - `type` = #{type,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - retry_enable = #{retryEnable,jdbcType=BIT}, - retry_number = #{retryNumber,jdbcType=BIGINT}, - project_ids = #{projectIds,jdbcType=VARCHAR} - where id = #{id,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.java b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.java deleted file mode 100644 index db2fb571b9..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.metersphere.sdk.mapper; - -import io.metersphere.sdk.domain.ExecutionQueue; -import io.metersphere.sdk.domain.ExecutionQueueExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface ExecutionQueueMapper { - long countByExample(ExecutionQueueExample example); - - int deleteByExample(ExecutionQueueExample example); - - int deleteByPrimaryKey(String id); - - int insert(ExecutionQueue record); - - int insertSelective(ExecutionQueue record); - - List selectByExample(ExecutionQueueExample example); - - ExecutionQueue selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") ExecutionQueue record, @Param("example") ExecutionQueueExample example); - - int updateByExample(@Param("record") ExecutionQueue record, @Param("example") ExecutionQueueExample example); - - int updateByPrimaryKeySelective(ExecutionQueue record); - - int updateByPrimaryKey(ExecutionQueue record); -} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.xml deleted file mode 100644 index 03aeba5b4c..0000000000 --- a/backend/framework/domain/src/main/java/io/metersphere/sdk/mapper/ExecutionQueueMapper.xml +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - 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, report_id, report_type, run_mode, pool_id, create_time, failure - - - - - delete from execution_queue - where id = #{id,jdbcType=VARCHAR} - - - delete from execution_queue - - - - - - insert into execution_queue (id, report_id, report_type, - run_mode, pool_id, create_time, - failure) - values (#{id,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{reportType,jdbcType=VARCHAR}, - #{runMode,jdbcType=VARCHAR}, #{poolId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, - #{failure,jdbcType=BIT}) - - - insert into execution_queue - - - id, - - - report_id, - - - report_type, - - - run_mode, - - - pool_id, - - - create_time, - - - failure, - - - - - #{id,jdbcType=VARCHAR}, - - - #{reportId,jdbcType=VARCHAR}, - - - #{reportType,jdbcType=VARCHAR}, - - - #{runMode,jdbcType=VARCHAR}, - - - #{poolId,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=BIGINT}, - - - #{failure,jdbcType=BIT}, - - - - - - update execution_queue - - - id = #{record.id,jdbcType=VARCHAR}, - - - report_id = #{record.reportId,jdbcType=VARCHAR}, - - - report_type = #{record.reportType,jdbcType=VARCHAR}, - - - run_mode = #{record.runMode,jdbcType=VARCHAR}, - - - pool_id = #{record.poolId,jdbcType=VARCHAR}, - - - create_time = #{record.createTime,jdbcType=BIGINT}, - - - failure = #{record.failure,jdbcType=BIT}, - - - - - - - - update execution_queue - set id = #{record.id,jdbcType=VARCHAR}, - report_id = #{record.reportId,jdbcType=VARCHAR}, - report_type = #{record.reportType,jdbcType=VARCHAR}, - run_mode = #{record.runMode,jdbcType=VARCHAR}, - pool_id = #{record.poolId,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT}, - failure = #{record.failure,jdbcType=BIT} - - - - - - update execution_queue - - - report_id = #{reportId,jdbcType=VARCHAR}, - - - report_type = #{reportType,jdbcType=VARCHAR}, - - - run_mode = #{runMode,jdbcType=VARCHAR}, - - - pool_id = #{poolId,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=BIGINT}, - - - failure = #{failure,jdbcType=BIT}, - - - where id = #{id,jdbcType=VARCHAR} - - - update execution_queue - set report_id = #{reportId,jdbcType=VARCHAR}, - report_type = #{reportType,jdbcType=VARCHAR}, - run_mode = #{runMode,jdbcType=VARCHAR}, - pool_id = #{poolId,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT}, - failure = #{failure,jdbcType=BIT} - where id = #{id,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/JSON.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/JSON.java index e88df43079..8341b4df1e 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/JSON.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/JSON.java @@ -2,6 +2,7 @@ package io.metersphere.sdk.util; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.StreamReadConstraints; import com.fasterxml.jackson.core.json.JsonReadFeature; @@ -30,6 +31,8 @@ public class JSON { static { objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + // 支持json字符中带注释符 + objectMapper.configure(JsonParser.Feature.ALLOW_COMMENTS, true); // 自动检测所有类的全部属性 objectMapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY); // 如果一个对象中没有任何的属性,那么在序列化的时候就会报错 diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionDuration.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionDuration.java new file mode 100644 index 0000000000..204491e364 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionDuration.java @@ -0,0 +1,18 @@ +package io.metersphere.api.dto.jmeter.assertion; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode(callSuper = true) +@Data +public class MsAssertionDuration extends MsAssertionType { + private long value; + + public MsAssertionDuration() { + setType(MsAssertionType.DURATION); + } + + public boolean isValid() { + return value > 0 && isEnable(); + } +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionJSR223.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionJSR223.java new file mode 100644 index 0000000000..e5706ac528 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionJSR223.java @@ -0,0 +1,26 @@ +package io.metersphere.api.dto.jmeter.assertion; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.StringUtils; + +@EqualsAndHashCode(callSuper = true) +@Data +public class MsAssertionJSR223 extends MsAssertionType { + private String variable; + private String operator; + private String value; + private String desc; + private String name; + private String script; + private String scriptLanguage; + private Boolean jsrEnable; + + public MsAssertionJSR223() { + setType(MsAssertionType.JSR223); + } + + public boolean isValid() { + return StringUtils.isNotBlank(script) && StringUtils.isNotBlank(scriptLanguage) && isEnable(); + } +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionJsonPath.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionJsonPath.java new file mode 100644 index 0000000000..aaff354c0e --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionJsonPath.java @@ -0,0 +1,22 @@ +package io.metersphere.api.dto.jmeter.assertion; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.StringUtils; + +@EqualsAndHashCode(callSuper = true) +@Data +public class MsAssertionJsonPath extends MsAssertionType { + private String expect; + private String expression; + private String description; + private String option = "REGEX"; + + public MsAssertionJsonPath() { + setType(MsAssertionType.JSON_PATH); + } + + public boolean isValid() { + return StringUtils.isNotBlank(expression) && isEnable(); + } +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionRegex.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionRegex.java new file mode 100644 index 0000000000..9b43777a49 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionRegex.java @@ -0,0 +1,23 @@ +package io.metersphere.api.dto.jmeter.assertion; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.StringUtils; + +@EqualsAndHashCode(callSuper = true) +@Data +public class MsAssertionRegex extends MsAssertionType { + private String subject; + private String expression; + private String description; + private boolean assumeSuccess; + private int testType = 2; + + public MsAssertionRegex() { + setType(MsAssertionType.REGEX); + } + + public boolean isValid() { + return StringUtils.isNotBlank(subject) && StringUtils.isNotBlank(expression) && isEnable(); + } +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionType.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionType.java new file mode 100644 index 0000000000..91ca271293 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionType.java @@ -0,0 +1,17 @@ +package io.metersphere.api.dto.jmeter.assertion; + +import lombok.Data; + +@Data +public class MsAssertionType { + public final static String REGEX = "Regex"; + public final static String DURATION = "Duration"; + public final static String JSON_PATH = "JSONPath"; + public final static String JSR223 = "JSR223"; + public final static String TEXT = "Text"; + public final static String XPATH2 = "XPath2"; + private boolean enable = true; + public String label; + + private String type; +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionXPath2.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionXPath2.java new file mode 100644 index 0000000000..0aaf4823a2 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertionXPath2.java @@ -0,0 +1,19 @@ +package io.metersphere.api.dto.jmeter.assertion; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.StringUtils; + +@EqualsAndHashCode(callSuper = true) +@Data +public class MsAssertionXPath2 extends MsAssertionType { + private String expression; + + public MsAssertionXPath2() { + setType(MsAssertionType.XPATH2); + } + + public boolean isValid() { + return StringUtils.isNotBlank(expression) && isEnable(); + } +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertions.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertions.java new file mode 100644 index 0000000000..c089fb6fd1 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/assertion/MsAssertions.java @@ -0,0 +1,23 @@ +package io.metersphere.api.dto.jmeter.assertion; + +import io.metersphere.plugin.api.annotation.PluginSubType; +import io.metersphere.plugin.api.dto.TestElementDTO; +import io.metersphere.project.dto.environment.assertions.document.MsAssertionDocument; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +@Data +@EqualsAndHashCode(callSuper = true) +@PluginSubType("MsAssertions") +public class MsAssertions extends TestElementDTO { + private String xpathType; + private boolean scenarioAss; + private List regex; + private List jsonPath; + private List jsr223; + private List xpath2; + private MsAssertionDuration duration; + private MsAssertionDocument document; +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/logic/controller/MsLoopController.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/logic/controller/MsLoopController.java new file mode 100644 index 0000000000..c839fff40b --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/logic/controller/MsLoopController.java @@ -0,0 +1,14 @@ +package io.metersphere.api.dto.jmeter.logic.controller; + +import io.metersphere.plugin.api.annotation.PluginSubType; +import io.metersphere.plugin.api.dto.TestElementDTO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@PluginSubType("MsLoopController") +public class MsLoopController extends TestElementDTO { + private String clazzName = MsLoopController.class.getCanonicalName(); + private String loopType; +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtract.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtract.java new file mode 100644 index 0000000000..75afefd9f8 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtract.java @@ -0,0 +1,18 @@ +package io.metersphere.api.dto.jmeter.post.extract; + +import io.metersphere.plugin.api.annotation.PluginSubType; +import io.metersphere.plugin.api.dto.TestElementDTO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.List; + +@Data +@EqualsAndHashCode(callSuper = true) +@PluginSubType("MsExtract") +public class MsExtract extends TestElementDTO { + private String xpathType; + private List regex; + private List json; + private List xpath; +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractCommon.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractCommon.java new file mode 100644 index 0000000000..1ed96ae0bc --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractCommon.java @@ -0,0 +1,19 @@ +package io.metersphere.api.dto.jmeter.post.extract; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.StringUtils; + +@EqualsAndHashCode(callSuper = true) +@Data +public class MsExtractCommon extends MsExtractType { + private String variable; + private String value; + private String expression; + private String description; + private boolean multipleMatching; + + public boolean isValid() { + return StringUtils.isNotBlank(variable) && StringUtils.isNotBlank(expression); + } +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractJSONPath.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractJSONPath.java new file mode 100644 index 0000000000..4c64849d23 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractJSONPath.java @@ -0,0 +1,12 @@ +package io.metersphere.api.dto.jmeter.post.extract; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode(callSuper = true) +@Data +public class MsExtractJSONPath extends MsExtractCommon { + public MsExtractJSONPath() { + setType(MsExtractType.JSON_PATH); + } +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractRegex.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractRegex.java new file mode 100644 index 0000000000..44f5463dab --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractRegex.java @@ -0,0 +1,14 @@ +package io.metersphere.api.dto.jmeter.post.extract; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode(callSuper = true) +@Data +public class MsExtractRegex extends MsExtractCommon { + private String useHeaders; + private String template; + public MsExtractRegex() { + setType(MsExtractType.REGEX); + } +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractType.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractType.java new file mode 100644 index 0000000000..4353ffca54 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractType.java @@ -0,0 +1,12 @@ +package io.metersphere.api.dto.jmeter.post.extract; + +import lombok.Data; + +@Data +public class MsExtractType { + public final static String REGEX = "Regex"; + public final static String JSON_PATH = "JSONPath"; + public final static String XPATH = "XPath"; + + private String type; +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractXPath.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractXPath.java new file mode 100644 index 0000000000..ade80dba13 --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/extract/MsExtractXPath.java @@ -0,0 +1,12 @@ +package io.metersphere.api.dto.jmeter.post.extract; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode(callSuper = true) +@Data +public class MsExtractXPath extends MsExtractCommon { + public MsExtractXPath() { + setType(MsExtractType.XPATH); + } +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/processors/MsPostJSR223Processor.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/processors/MsPostJSR223Processor.java new file mode 100644 index 0000000000..ce6b66ebdb --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/post/processors/MsPostJSR223Processor.java @@ -0,0 +1,16 @@ +package io.metersphere.api.dto.jmeter.post.processors; + +import io.metersphere.plugin.api.annotation.PluginSubType; +import io.metersphere.plugin.api.dto.TestElementDTO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@PluginSubType("MSPostJSR223Processor") +public class MsPostJSR223Processor extends TestElementDTO { + private String script; + private String scriptLanguage; + private Boolean jsrEnable; + +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/pre/processors/MsPreJSR223Processor.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/pre/processors/MsPreJSR223Processor.java new file mode 100644 index 0000000000..8d8016a28e --- /dev/null +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/pre/processors/MsPreJSR223Processor.java @@ -0,0 +1,15 @@ +package io.metersphere.api.dto.jmeter.pre.processors; + +import io.metersphere.plugin.api.annotation.PluginSubType; +import io.metersphere.plugin.api.dto.TestElementDTO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +@PluginSubType("MSPreJSR223Processor") +public class MsPreJSR223Processor extends TestElementDTO { + private String script; + private String scriptLanguage; + private Boolean jsrEnable; +} diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/processors/MSJSR223Processor.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/processors/MsJSR223Processor.java similarity index 79% rename from backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/processors/MSJSR223Processor.java rename to backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/processors/MsJSR223Processor.java index 0255d73ecd..1df1e67249 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/processors/MSJSR223Processor.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/processors/MsJSR223Processor.java @@ -7,8 +7,8 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) -@PluginSubType("MSJSR223Processor") -public class MSJSR223Processor extends TestElementDTO { +@PluginSubType("MsJSR223Processor") +public class MsJSR223Processor extends TestElementDTO { private String script; private String scriptLanguage; private Boolean jsrEnable; diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/sampler/MSDebugSampler.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/sampler/MsDebugSampler.java similarity index 91% rename from backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/sampler/MSDebugSampler.java rename to backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/sampler/MsDebugSampler.java index a780414e43..4c577df961 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/sampler/MSDebugSampler.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/jmeter/sampler/MsDebugSampler.java @@ -10,8 +10,8 @@ import org.apache.jmeter.save.SaveService; import org.apache.jmeter.testelement.TestElement; @Data @EqualsAndHashCode(callSuper = true) -@PluginSubType("MSDebugSampler") -public class MSDebugSampler extends TestElementDTO { +@PluginSubType("MsDebugSampler") +public class MsDebugSampler extends TestElementDTO { private boolean displayJMeterProperties = false; private boolean displayJMeterVariables = true; private boolean displaySystemProperties = false; @@ -21,7 +21,7 @@ public class MSDebugSampler extends TestElementDTO { DebugSampler debugSampler = new DebugSampler(); debugSampler.setEnabled(this.isEnable()); if (StringUtils.isEmpty(this.getName())) { - this.setName(MSDebugSampler.class.getSimpleName()); + this.setName(MsDebugSampler.class.getSimpleName()); } debugSampler.setName(this.getName()); debugSampler.setProperty(TestElement.TEST_CLASS, DebugSampler.class.getName()); diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/util/ApiDataUtils.java b/backend/services/api-test/src/main/java/io/metersphere/api/util/ApiDataUtils.java index 9c0430f7fe..c9a7ab363c 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/util/ApiDataUtils.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/util/ApiDataUtils.java @@ -2,6 +2,7 @@ package io.metersphere.api.util; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.json.JsonReadFeature; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; @@ -10,8 +11,8 @@ import com.fasterxml.jackson.databind.json.JsonMapper; import com.fasterxml.jackson.databind.jsontype.NamedType; import com.fasterxml.jackson.databind.jsontype.impl.StdSubtypeResolver; import com.fasterxml.jackson.databind.type.CollectionType; -import io.metersphere.api.dto.jmeter.processors.MSJSR223Processor; -import io.metersphere.api.dto.jmeter.sampler.MSDebugSampler; +import io.metersphere.api.dto.jmeter.post.processors.MsPostJSR223Processor; +import io.metersphere.api.dto.jmeter.sampler.MsDebugSampler; import io.metersphere.sdk.exception.MSException; import java.io.IOException; @@ -32,10 +33,12 @@ public class ApiDataUtils { static { // 添加处理资源文件的类 final List namedTypes = new LinkedList<>(); - namedTypes.add(new NamedType(MSJSR223Processor.class, MSJSR223Processor.class.getSimpleName())); - namedTypes.add(new NamedType(MSDebugSampler.class, MSDebugSampler.class.getSimpleName())); + namedTypes.add(new NamedType(MsPostJSR223Processor.class, MsPostJSR223Processor.class.getSimpleName())); + namedTypes.add(new NamedType(MsDebugSampler.class, MsDebugSampler.class.getSimpleName())); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + // 支持json字符中带注释符 + objectMapper.configure(JsonParser.Feature.ALLOW_COMMENTS, true); // 自动检测所有类的全部属性 objectMapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY); // 如果一个对象中没有任何的属性,那么在序列化的时候就会报错 diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java index 403bd20b25..7c6c0e1ab2 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/PluginSubTypeTests.java @@ -1,7 +1,7 @@ package io.metersphere.api.controller; -import io.metersphere.api.dto.jmeter.processors.MSJSR223Processor; -import io.metersphere.api.dto.jmeter.sampler.MSDebugSampler; +import io.metersphere.api.dto.jmeter.post.processors.MsPostJSR223Processor; +import io.metersphere.api.dto.jmeter.sampler.MsDebugSampler; import io.metersphere.api.util.ApiDataUtils; import io.metersphere.plugin.api.dto.TestElementDTO; import io.metersphere.system.uid.IDGenerator; @@ -20,12 +20,12 @@ public class PluginSubTypeTests { @Test @Order(0) public void pluginSubTypeTest() throws Exception { - MSDebugSampler debugSampler = new MSDebugSampler(); + MsDebugSampler debugSampler = new MsDebugSampler(); debugSampler.setName("测试DebugSampler"); debugSampler.setUuid(IDGenerator.nextStr()); LinkedList hashTree = new LinkedList<>(); hashTree.add(debugSampler); - MSJSR223Processor msjsr223Processor = new MSJSR223Processor(); + MsPostJSR223Processor msjsr223Processor = new MsPostJSR223Processor(); msjsr223Processor.setName("测试jsr223"); msjsr223Processor.setJsrEnable(true); msjsr223Processor.setChildren(hashTree);