From d453bb93e084fecf92c122e4ebb4fd091de234d4 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 28 Sep 2023 11:21:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B0=83=E8=AF=95=E5=8A=9F=E8=83=BD=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E8=A1=A8=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/api/domain/ApiDebug.java | 136 +++ .../metersphere/api/domain/ApiDebugBlob.java | 98 ++ .../api/domain/ApiDebugBlobExample.java | 270 +++++ .../api/domain/ApiDebugExample.java | 950 ++++++++++++++++++ .../api/domain/ApiDebugModule.java | 140 +++ .../api/domain/ApiDebugModuleExample.java | 930 +++++++++++++++++ .../metersphere/api/domain/ApiDefinition.java | 18 +- .../api/domain/ApiDefinitionExample.java | 266 +++-- .../metersphere/api/domain/ApiScenario.java | 4 - .../api/domain/ApiScenarioExample.java | 70 -- .../api/mapper/ApiDebugBlobMapper.java | 38 + .../api/mapper/ApiDebugBlobMapper.xml | 243 +++++ .../api/mapper/ApiDebugMapper.java | 34 + .../metersphere/api/mapper/ApiDebugMapper.xml | 365 +++++++ .../api/mapper/ApiDebugModuleMapper.java | 34 + .../api/mapper/ApiDebugModuleMapper.xml | 365 +++++++ .../api/mapper/ApiDefinitionMapper.xml | 120 ++- .../api/mapper/ApiScenarioMapper.xml | 50 +- .../3.0.0/ddl/V3.0.0_5__api_test.sql | 174 +++- .../src/main/resources/apiGeneratorConfig.xml | 5 +- 20 files changed, 3990 insertions(+), 320 deletions(-) create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebug.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugBlob.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugBlobExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugModule.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugModuleExample.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugBlobMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugBlobMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugMapper.xml create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugModuleMapper.java create mode 100644 backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugModuleMapper.xml diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebug.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebug.java new file mode 100644 index 0000000000..b73f1a491f --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebug.java @@ -0,0 +1,136 @@ +package io.metersphere.api.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import lombok.Data; + +@Data +public class ApiDebug implements Serializable { + @Schema(description = "接口pk", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{api_debug.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug.name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 255, message = "{api_debug.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(description = "接口协议", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug.protocol.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 20, message = "{api_debug.protocol.length_range}", groups = {Created.class, Updated.class}) + private String protocol; + + @Schema(description = "http协议类型post/get/其它协议则是协议名(mqtt)") + private String method; + + @Schema(description = "http协议路径/其它协议则为空") + private String path; + + @Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug.project_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{api_debug.project_id.length_range}", groups = {Created.class, Updated.class}) + private String projectId; + + @Schema(description = "模块fk") + private String moduleId; + + @Schema(description = "创建时间") + private Long createTime; + + @Schema(description = "创建人") + private String createUser; + + @Schema(description = "修改时间") + private Long updateTime; + + @Schema(description = "修改人") + private String updateUser; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + name("name", "name", "VARCHAR", true), + protocol("protocol", "protocol", "VARCHAR", false), + method("method", "method", "VARCHAR", true), + path("path", "path", "VARCHAR", true), + projectId("project_id", "projectId", "VARCHAR", false), + moduleId("module_id", "moduleId", "VARCHAR", false), + createTime("create_time", "createTime", "BIGINT", false), + createUser("create_user", "createUser", "VARCHAR", false), + updateTime("update_time", "updateTime", "BIGINT", false), + updateUser("update_user", "updateUser", "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/api/domain/ApiDebugBlob.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugBlob.java new file mode 100644 index 0000000000..3d42241328 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugBlob.java @@ -0,0 +1,98 @@ +package io.metersphere.api.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import lombok.Data; + +@Data +public class ApiDebugBlob implements Serializable { + @Schema(description = "接口fk/ 一对一关系", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug_blob.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{api_debug_blob.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "请求内容") + private byte[] request; + + @Schema(description = "响应内容") + private byte[] response; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + request("request", "request", "LONGVARBINARY", false), + response("response", "response", "LONGVARBINARY", 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/api/domain/ApiDebugBlobExample.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugBlobExample.java new file mode 100644 index 0000000000..a467733a62 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugBlobExample.java @@ -0,0 +1,270 @@ +package io.metersphere.api.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ApiDebugBlobExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApiDebugBlobExample() { + 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 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/api/domain/ApiDebugExample.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugExample.java new file mode 100644 index 0000000000..7170a72232 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugExample.java @@ -0,0 +1,950 @@ +package io.metersphere.api.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ApiDebugExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApiDebugExample() { + 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 andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andProtocolIsNull() { + addCriterion("protocol is null"); + return (Criteria) this; + } + + public Criteria andProtocolIsNotNull() { + addCriterion("protocol is not null"); + return (Criteria) this; + } + + public Criteria andProtocolEqualTo(String value) { + addCriterion("protocol =", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotEqualTo(String value) { + addCriterion("protocol <>", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThan(String value) { + addCriterion("protocol >", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThanOrEqualTo(String value) { + addCriterion("protocol >=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThan(String value) { + addCriterion("protocol <", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThanOrEqualTo(String value) { + addCriterion("protocol <=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLike(String value) { + addCriterion("protocol like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotLike(String value) { + addCriterion("protocol not like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolIn(List values) { + addCriterion("protocol in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotIn(List values) { + addCriterion("protocol not in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolBetween(String value1, String value2) { + addCriterion("protocol between", value1, value2, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotBetween(String value1, String value2) { + addCriterion("protocol not between", value1, value2, "protocol"); + return (Criteria) this; + } + + public Criteria andMethodIsNull() { + addCriterion("`method` is null"); + return (Criteria) this; + } + + public Criteria andMethodIsNotNull() { + addCriterion("`method` is not null"); + return (Criteria) this; + } + + public Criteria andMethodEqualTo(String value) { + addCriterion("`method` =", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotEqualTo(String value) { + addCriterion("`method` <>", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodGreaterThan(String value) { + addCriterion("`method` >", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodGreaterThanOrEqualTo(String value) { + addCriterion("`method` >=", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodLessThan(String value) { + addCriterion("`method` <", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodLessThanOrEqualTo(String value) { + addCriterion("`method` <=", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodLike(String value) { + addCriterion("`method` like", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotLike(String value) { + addCriterion("`method` not like", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodIn(List values) { + addCriterion("`method` in", values, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotIn(List values) { + addCriterion("`method` not in", values, "method"); + return (Criteria) this; + } + + public Criteria andMethodBetween(String value1, String value2) { + addCriterion("`method` between", value1, value2, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotBetween(String value1, String value2) { + addCriterion("`method` not between", value1, value2, "method"); + return (Criteria) this; + } + + public Criteria andPathIsNull() { + addCriterion("`path` is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("`path` is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("`path` =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("`path` <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("`path` >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("`path` >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("`path` <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("`path` <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("`path` like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("`path` not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("`path` in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("`path` not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("`path` between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("`path` not between", value1, value2, "path"); + 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 andModuleIdIsNull() { + addCriterion("module_id is null"); + return (Criteria) this; + } + + public Criteria andModuleIdIsNotNull() { + addCriterion("module_id is not null"); + return (Criteria) this; + } + + public Criteria andModuleIdEqualTo(String value) { + addCriterion("module_id =", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotEqualTo(String value) { + addCriterion("module_id <>", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThan(String value) { + addCriterion("module_id >", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThanOrEqualTo(String value) { + addCriterion("module_id >=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThan(String value) { + addCriterion("module_id <", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThanOrEqualTo(String value) { + addCriterion("module_id <=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLike(String value) { + addCriterion("module_id like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotLike(String value) { + addCriterion("module_id not like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdIn(List values) { + addCriterion("module_id in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotIn(List values) { + addCriterion("module_id not in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdBetween(String value1, String value2) { + addCriterion("module_id between", value1, value2, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotBetween(String value1, String value2) { + addCriterion("module_id not between", value1, value2, "moduleId"); + 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 andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNull() { + addCriterion("update_user is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNotNull() { + addCriterion("update_user is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserEqualTo(String value) { + addCriterion("update_user =", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotEqualTo(String value) { + addCriterion("update_user <>", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThan(String value) { + addCriterion("update_user >", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThanOrEqualTo(String value) { + addCriterion("update_user >=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThan(String value) { + addCriterion("update_user <", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThanOrEqualTo(String value) { + addCriterion("update_user <=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLike(String value) { + addCriterion("update_user like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotLike(String value) { + addCriterion("update_user not like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserIn(List values) { + addCriterion("update_user in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotIn(List values) { + addCriterion("update_user not in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserBetween(String value1, String value2) { + addCriterion("update_user between", value1, value2, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotBetween(String value1, String value2) { + addCriterion("update_user not between", value1, value2, "updateUser"); + 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/api/domain/ApiDebugModule.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugModule.java new file mode 100644 index 0000000000..7fec3de911 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugModule.java @@ -0,0 +1,140 @@ +package io.metersphere.api.domain; + +import io.metersphere.validation.groups.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.*; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Arrays; +import lombok.Data; + +@Data +public class ApiDebugModule implements Serializable { + @Schema(description = "接口模块pk", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug_module.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{api_debug_module.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(description = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug_module.name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 255, message = "{api_debug_module.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(description = "协议", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug_module.protocol.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 64, message = "{api_debug_module.protocol.length_range}", groups = {Created.class, Updated.class}) + private String protocol; + + @Schema(description = "父级fk", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug_module.parent_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{api_debug_module.parent_id.length_range}", groups = {Created.class, Updated.class}) + private String parentId; + + @Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{api_debug_module.project_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{api_debug_module.project_id.length_range}", groups = {Created.class, Updated.class}) + private String projectId; + + @Schema(description = "树节点级别", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{api_debug_module.level.not_blank}", groups = {Created.class}) + private Integer level; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{api_debug_module.pos.not_blank}", groups = {Created.class}) + private Integer pos; + + @Schema(description = "创建时间") + private Long createTime; + + @Schema(description = "修改时间") + private Long updateTime; + + @Schema(description = "修改人") + private String updateUser; + + @Schema(description = "创建人") + private String createUser; + + private static final long serialVersionUID = 1L; + + public enum Column { + id("id", "id", "VARCHAR", false), + name("name", "name", "VARCHAR", true), + protocol("protocol", "protocol", "VARCHAR", false), + parentId("parent_id", "parentId", "VARCHAR", false), + projectId("project_id", "projectId", "VARCHAR", false), + level("level", "level", "INTEGER", true), + pos("pos", "pos", "INTEGER", false), + createTime("create_time", "createTime", "BIGINT", false), + updateTime("update_time", "updateTime", "BIGINT", false), + updateUser("update_user", "updateUser", "VARCHAR", false), + createUser("create_user", "createUser", "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/api/domain/ApiDebugModuleExample.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugModuleExample.java new file mode 100644 index 0000000000..1771b48a87 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDebugModuleExample.java @@ -0,0 +1,930 @@ +package io.metersphere.api.domain; + +import java.util.ArrayList; +import java.util.List; + +public class ApiDebugModuleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ApiDebugModuleExample() { + 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 andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andProtocolIsNull() { + addCriterion("protocol is null"); + return (Criteria) this; + } + + public Criteria andProtocolIsNotNull() { + addCriterion("protocol is not null"); + return (Criteria) this; + } + + public Criteria andProtocolEqualTo(String value) { + addCriterion("protocol =", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotEqualTo(String value) { + addCriterion("protocol <>", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThan(String value) { + addCriterion("protocol >", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolGreaterThanOrEqualTo(String value) { + addCriterion("protocol >=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThan(String value) { + addCriterion("protocol <", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLessThanOrEqualTo(String value) { + addCriterion("protocol <=", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolLike(String value) { + addCriterion("protocol like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotLike(String value) { + addCriterion("protocol not like", value, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolIn(List values) { + addCriterion("protocol in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotIn(List values) { + addCriterion("protocol not in", values, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolBetween(String value1, String value2) { + addCriterion("protocol between", value1, value2, "protocol"); + return (Criteria) this; + } + + public Criteria andProtocolNotBetween(String value1, String value2) { + addCriterion("protocol not between", value1, value2, "protocol"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(String value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(String value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(String value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(String value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(String value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(String value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLike(String value) { + addCriterion("parent_id like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotLike(String value) { + addCriterion("parent_id not like", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(String value1, String value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(String value1, String value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + 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 andLevelIsNull() { + addCriterion("`level` is null"); + return (Criteria) this; + } + + public Criteria andLevelIsNotNull() { + addCriterion("`level` is not null"); + return (Criteria) this; + } + + public Criteria andLevelEqualTo(Integer value) { + addCriterion("`level` =", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotEqualTo(Integer value) { + addCriterion("`level` <>", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThan(Integer value) { + addCriterion("`level` >", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThanOrEqualTo(Integer value) { + addCriterion("`level` >=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThan(Integer value) { + addCriterion("`level` <", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThanOrEqualTo(Integer value) { + addCriterion("`level` <=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelIn(List values) { + addCriterion("`level` in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotIn(List values) { + addCriterion("`level` not in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelBetween(Integer value1, Integer value2) { + addCriterion("`level` between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotBetween(Integer value1, Integer value2) { + addCriterion("`level` not between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andPosIsNull() { + addCriterion("pos is null"); + return (Criteria) this; + } + + public Criteria andPosIsNotNull() { + addCriterion("pos is not null"); + return (Criteria) this; + } + + public Criteria andPosEqualTo(Integer value) { + addCriterion("pos =", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotEqualTo(Integer value) { + addCriterion("pos <>", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThan(Integer value) { + addCriterion("pos >", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosGreaterThanOrEqualTo(Integer value) { + addCriterion("pos >=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThan(Integer value) { + addCriterion("pos <", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosLessThanOrEqualTo(Integer value) { + addCriterion("pos <=", value, "pos"); + return (Criteria) this; + } + + public Criteria andPosIn(List values) { + addCriterion("pos in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotIn(List values) { + addCriterion("pos not in", values, "pos"); + return (Criteria) this; + } + + public Criteria andPosBetween(Integer value1, Integer value2) { + addCriterion("pos between", value1, value2, "pos"); + return (Criteria) this; + } + + public Criteria andPosNotBetween(Integer value1, Integer value2) { + addCriterion("pos not between", value1, value2, "pos"); + 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 andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNull() { + addCriterion("update_user is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIsNotNull() { + addCriterion("update_user is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserEqualTo(String value) { + addCriterion("update_user =", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotEqualTo(String value) { + addCriterion("update_user <>", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThan(String value) { + addCriterion("update_user >", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserGreaterThanOrEqualTo(String value) { + addCriterion("update_user >=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThan(String value) { + addCriterion("update_user <", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLessThanOrEqualTo(String value) { + addCriterion("update_user <=", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserLike(String value) { + addCriterion("update_user like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotLike(String value) { + addCriterion("update_user not like", value, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserIn(List values) { + addCriterion("update_user in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotIn(List values) { + addCriterion("update_user not in", values, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserBetween(String value1, String value2) { + addCriterion("update_user between", value1, value2, "updateUser"); + return (Criteria) this; + } + + public Criteria andUpdateUserNotBetween(String value1, String value2) { + addCriterion("update_user not between", value1, value2, "updateUser"); + 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 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/api/domain/ApiDefinition.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinition.java index 8379e59998..e5a9845ef4 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinition.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinition.java @@ -25,17 +25,17 @@ public class ApiDefinition implements Serializable { @Size(min = 1, max = 20, message = "{api_definition.protocol.length_range}", groups = {Created.class, Updated.class}) private String protocol; - @Schema(description = "模块全路径-用于导入处理") - private String modulePath; + @Schema(description = "http协议类型post/get/其它协议则是协议名(mqtt)") + private String method; + + @Schema(description = "http协议路径/其它协议则为空") + private String path; @Schema(description = "接口状态/进行中/已完成", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{api_definition.status.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{api_definition.status.length_range}", groups = {Created.class, Updated.class}) private String status; - @Schema(description = "模块fk") - private String moduleId; - @Schema(description = "自定义id") private Integer num; @@ -51,6 +51,9 @@ public class ApiDefinition implements Serializable { @Size(min = 1, max = 50, message = "{api_definition.project_id.length_range}", groups = {Created.class, Updated.class}) private String projectId; + @Schema(description = "模块fk") + private String moduleId; + @Schema(description = "环境fk") private String environmentId; @@ -95,13 +98,14 @@ public class ApiDefinition implements Serializable { id("id", "id", "VARCHAR", false), name("name", "name", "VARCHAR", true), protocol("protocol", "protocol", "VARCHAR", false), - modulePath("module_path", "modulePath", "VARCHAR", false), + method("method", "method", "VARCHAR", true), + path("path", "path", "VARCHAR", true), status("status", "status", "VARCHAR", true), - moduleId("module_id", "moduleId", "VARCHAR", false), num("num", "num", "INTEGER", false), tags("tags", "tags", "VARCHAR", false), pos("pos", "pos", "BIGINT", false), projectId("project_id", "projectId", "VARCHAR", false), + moduleId("module_id", "moduleId", "VARCHAR", false), environmentId("environment_id", "environmentId", "VARCHAR", false), latest("latest", "latest", "BIT", false), versionId("version_id", "versionId", "VARCHAR", false), diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionExample.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionExample.java index 75cb531f0e..bbb17b37c6 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiDefinitionExample.java @@ -314,73 +314,143 @@ public class ApiDefinitionExample { return (Criteria) this; } - public Criteria andModulePathIsNull() { - addCriterion("module_path is null"); + public Criteria andMethodIsNull() { + addCriterion("`method` is null"); return (Criteria) this; } - public Criteria andModulePathIsNotNull() { - addCriterion("module_path is not null"); + public Criteria andMethodIsNotNull() { + addCriterion("`method` is not null"); return (Criteria) this; } - public Criteria andModulePathEqualTo(String value) { - addCriterion("module_path =", value, "modulePath"); + public Criteria andMethodEqualTo(String value) { + addCriterion("`method` =", value, "method"); return (Criteria) this; } - public Criteria andModulePathNotEqualTo(String value) { - addCriterion("module_path <>", value, "modulePath"); + public Criteria andMethodNotEqualTo(String value) { + addCriterion("`method` <>", value, "method"); return (Criteria) this; } - public Criteria andModulePathGreaterThan(String value) { - addCriterion("module_path >", value, "modulePath"); + public Criteria andMethodGreaterThan(String value) { + addCriterion("`method` >", value, "method"); return (Criteria) this; } - public Criteria andModulePathGreaterThanOrEqualTo(String value) { - addCriterion("module_path >=", value, "modulePath"); + public Criteria andMethodGreaterThanOrEqualTo(String value) { + addCriterion("`method` >=", value, "method"); return (Criteria) this; } - public Criteria andModulePathLessThan(String value) { - addCriterion("module_path <", value, "modulePath"); + public Criteria andMethodLessThan(String value) { + addCriterion("`method` <", value, "method"); return (Criteria) this; } - public Criteria andModulePathLessThanOrEqualTo(String value) { - addCriterion("module_path <=", value, "modulePath"); + public Criteria andMethodLessThanOrEqualTo(String value) { + addCriterion("`method` <=", value, "method"); return (Criteria) this; } - public Criteria andModulePathLike(String value) { - addCriterion("module_path like", value, "modulePath"); + public Criteria andMethodLike(String value) { + addCriterion("`method` like", value, "method"); return (Criteria) this; } - public Criteria andModulePathNotLike(String value) { - addCriterion("module_path not like", value, "modulePath"); + public Criteria andMethodNotLike(String value) { + addCriterion("`method` not like", value, "method"); return (Criteria) this; } - public Criteria andModulePathIn(List values) { - addCriterion("module_path in", values, "modulePath"); + public Criteria andMethodIn(List values) { + addCriterion("`method` in", values, "method"); return (Criteria) this; } - public Criteria andModulePathNotIn(List values) { - addCriterion("module_path not in", values, "modulePath"); + public Criteria andMethodNotIn(List values) { + addCriterion("`method` not in", values, "method"); return (Criteria) this; } - public Criteria andModulePathBetween(String value1, String value2) { - addCriterion("module_path between", value1, value2, "modulePath"); + public Criteria andMethodBetween(String value1, String value2) { + addCriterion("`method` between", value1, value2, "method"); return (Criteria) this; } - public Criteria andModulePathNotBetween(String value1, String value2) { - addCriterion("module_path not between", value1, value2, "modulePath"); + public Criteria andMethodNotBetween(String value1, String value2) { + addCriterion("`method` not between", value1, value2, "method"); + return (Criteria) this; + } + + public Criteria andPathIsNull() { + addCriterion("`path` is null"); + return (Criteria) this; + } + + public Criteria andPathIsNotNull() { + addCriterion("`path` is not null"); + return (Criteria) this; + } + + public Criteria andPathEqualTo(String value) { + addCriterion("`path` =", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotEqualTo(String value) { + addCriterion("`path` <>", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThan(String value) { + addCriterion("`path` >", value, "path"); + return (Criteria) this; + } + + public Criteria andPathGreaterThanOrEqualTo(String value) { + addCriterion("`path` >=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThan(String value) { + addCriterion("`path` <", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLessThanOrEqualTo(String value) { + addCriterion("`path` <=", value, "path"); + return (Criteria) this; + } + + public Criteria andPathLike(String value) { + addCriterion("`path` like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathNotLike(String value) { + addCriterion("`path` not like", value, "path"); + return (Criteria) this; + } + + public Criteria andPathIn(List values) { + addCriterion("`path` in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathNotIn(List values) { + addCriterion("`path` not in", values, "path"); + return (Criteria) this; + } + + public Criteria andPathBetween(String value1, String value2) { + addCriterion("`path` between", value1, value2, "path"); + return (Criteria) this; + } + + public Criteria andPathNotBetween(String value1, String value2) { + addCriterion("`path` not between", value1, value2, "path"); return (Criteria) this; } @@ -454,76 +524,6 @@ public class ApiDefinitionExample { return (Criteria) this; } - public Criteria andModuleIdIsNull() { - addCriterion("module_id is null"); - return (Criteria) this; - } - - public Criteria andModuleIdIsNotNull() { - addCriterion("module_id is not null"); - return (Criteria) this; - } - - public Criteria andModuleIdEqualTo(String value) { - addCriterion("module_id =", value, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdNotEqualTo(String value) { - addCriterion("module_id <>", value, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdGreaterThan(String value) { - addCriterion("module_id >", value, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdGreaterThanOrEqualTo(String value) { - addCriterion("module_id >=", value, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdLessThan(String value) { - addCriterion("module_id <", value, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdLessThanOrEqualTo(String value) { - addCriterion("module_id <=", value, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdLike(String value) { - addCriterion("module_id like", value, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdNotLike(String value) { - addCriterion("module_id not like", value, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdIn(List values) { - addCriterion("module_id in", values, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdNotIn(List values) { - addCriterion("module_id not in", values, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdBetween(String value1, String value2) { - addCriterion("module_id between", value1, value2, "moduleId"); - return (Criteria) this; - } - - public Criteria andModuleIdNotBetween(String value1, String value2) { - addCriterion("module_id not between", value1, value2, "moduleId"); - return (Criteria) this; - } - public Criteria andNumIsNull() { addCriterion("num is null"); return (Criteria) this; @@ -784,6 +784,76 @@ public class ApiDefinitionExample { return (Criteria) this; } + public Criteria andModuleIdIsNull() { + addCriterion("module_id is null"); + return (Criteria) this; + } + + public Criteria andModuleIdIsNotNull() { + addCriterion("module_id is not null"); + return (Criteria) this; + } + + public Criteria andModuleIdEqualTo(String value) { + addCriterion("module_id =", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotEqualTo(String value) { + addCriterion("module_id <>", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThan(String value) { + addCriterion("module_id >", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdGreaterThanOrEqualTo(String value) { + addCriterion("module_id >=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThan(String value) { + addCriterion("module_id <", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLessThanOrEqualTo(String value) { + addCriterion("module_id <=", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdLike(String value) { + addCriterion("module_id like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotLike(String value) { + addCriterion("module_id not like", value, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdIn(List values) { + addCriterion("module_id in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotIn(List values) { + addCriterion("module_id not in", values, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdBetween(String value1, String value2) { + addCriterion("module_id between", value1, value2, "moduleId"); + return (Criteria) this; + } + + public Criteria andModuleIdNotBetween(String value1, String value2) { + addCriterion("module_id not between", value1, value2, "moduleId"); + return (Criteria) this; + } + public Criteria andEnvironmentIdIsNull() { addCriterion("environment_id is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java index 5af91c4a20..54225c170a 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenario.java @@ -83,9 +83,6 @@ public class ApiScenario implements Serializable { @Schema(description = "描述信息") private String description; - @Schema(description = "模块全路径/用于导入模块创建") - private String modulePath; - @Schema(description = "标签") private String tags; @@ -133,7 +130,6 @@ public class ApiScenario implements Serializable { projectId("project_id", "projectId", "VARCHAR", false), apiScenarioModuleId("api_scenario_module_id", "apiScenarioModuleId", "VARCHAR", false), description("description", "description", "VARCHAR", false), - modulePath("module_path", "modulePath", "VARCHAR", false), tags("tags", "tags", "VARCHAR", false), grouped("grouped", "grouped", "BIT", false), createUser("create_user", "createUser", "VARCHAR", false), diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioExample.java b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioExample.java index 76e4bdc632..7a0b4f62d2 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/api/domain/ApiScenarioExample.java @@ -1374,76 +1374,6 @@ public class ApiScenarioExample { return (Criteria) this; } - public Criteria andModulePathIsNull() { - addCriterion("module_path is null"); - return (Criteria) this; - } - - public Criteria andModulePathIsNotNull() { - addCriterion("module_path is not null"); - return (Criteria) this; - } - - public Criteria andModulePathEqualTo(String value) { - addCriterion("module_path =", value, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathNotEqualTo(String value) { - addCriterion("module_path <>", value, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathGreaterThan(String value) { - addCriterion("module_path >", value, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathGreaterThanOrEqualTo(String value) { - addCriterion("module_path >=", value, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathLessThan(String value) { - addCriterion("module_path <", value, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathLessThanOrEqualTo(String value) { - addCriterion("module_path <=", value, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathLike(String value) { - addCriterion("module_path like", value, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathNotLike(String value) { - addCriterion("module_path not like", value, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathIn(List values) { - addCriterion("module_path in", values, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathNotIn(List values) { - addCriterion("module_path not in", values, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathBetween(String value1, String value2) { - addCriterion("module_path between", value1, value2, "modulePath"); - return (Criteria) this; - } - - public Criteria andModulePathNotBetween(String value1, String value2) { - addCriterion("module_path not between", value1, value2, "modulePath"); - return (Criteria) this; - } - public Criteria andTagsIsNull() { addCriterion("tags is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugBlobMapper.java b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugBlobMapper.java new file mode 100644 index 0000000000..82fda96f79 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugBlobMapper.java @@ -0,0 +1,38 @@ +package io.metersphere.api.mapper; + +import io.metersphere.api.domain.ApiDebugBlob; +import io.metersphere.api.domain.ApiDebugBlobExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ApiDebugBlobMapper { + long countByExample(ApiDebugBlobExample example); + + int deleteByExample(ApiDebugBlobExample example); + + int deleteByPrimaryKey(String id); + + int insert(ApiDebugBlob record); + + int insertSelective(ApiDebugBlob record); + + List selectByExampleWithBLOBs(ApiDebugBlobExample example); + + List selectByExample(ApiDebugBlobExample example); + + ApiDebugBlob selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ApiDebugBlob record, @Param("example") ApiDebugBlobExample example); + + int updateByExampleWithBLOBs(@Param("record") ApiDebugBlob record, @Param("example") ApiDebugBlobExample example); + + int updateByExample(@Param("record") ApiDebugBlob record, @Param("example") ApiDebugBlobExample example); + + int updateByPrimaryKeySelective(ApiDebugBlob record); + + int updateByPrimaryKeyWithBLOBs(ApiDebugBlob record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") ApiDebugBlob.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugBlobMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugBlobMapper.xml new file mode 100644 index 0000000000..8794b5b1e4 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugBlobMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + 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 + + + request, response + + + + + + delete from api_debug_blob + where id = #{id,jdbcType=VARCHAR} + + + delete from api_debug_blob + + + + + + insert into api_debug_blob (id, request, response + ) + values (#{id,jdbcType=VARCHAR}, #{request,jdbcType=LONGVARBINARY}, #{response,jdbcType=LONGVARBINARY} + ) + + + insert into api_debug_blob + + + id, + + + request, + + + response, + + + + + #{id,jdbcType=VARCHAR}, + + + #{request,jdbcType=LONGVARBINARY}, + + + #{response,jdbcType=LONGVARBINARY}, + + + + + + update api_debug_blob + + + id = #{record.id,jdbcType=VARCHAR}, + + + request = #{record.request,jdbcType=LONGVARBINARY}, + + + response = #{record.response,jdbcType=LONGVARBINARY}, + + + + + + + + update api_debug_blob + set id = #{record.id,jdbcType=VARCHAR}, + request = #{record.request,jdbcType=LONGVARBINARY}, + response = #{record.response,jdbcType=LONGVARBINARY} + + + + + + update api_debug_blob + set id = #{record.id,jdbcType=VARCHAR} + + + + + + update api_debug_blob + + + request = #{request,jdbcType=LONGVARBINARY}, + + + response = #{response,jdbcType=LONGVARBINARY}, + + + where id = #{id,jdbcType=VARCHAR} + + + update api_debug_blob + set request = #{request,jdbcType=LONGVARBINARY}, + response = #{response,jdbcType=LONGVARBINARY} + where id = #{id,jdbcType=VARCHAR} + + + insert into api_debug_blob + (id, request, response) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.request,jdbcType=LONGVARBINARY}, #{item.response,jdbcType=LONGVARBINARY} + ) + + + + insert into api_debug_blob ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.request,jdbcType=LONGVARBINARY} + + + #{item.response,jdbcType=LONGVARBINARY} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugMapper.java b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugMapper.java new file mode 100644 index 0000000000..a7700b8f05 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.api.mapper; + +import io.metersphere.api.domain.ApiDebug; +import io.metersphere.api.domain.ApiDebugExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ApiDebugMapper { + long countByExample(ApiDebugExample example); + + int deleteByExample(ApiDebugExample example); + + int deleteByPrimaryKey(String id); + + int insert(ApiDebug record); + + int insertSelective(ApiDebug record); + + List selectByExample(ApiDebugExample example); + + ApiDebug selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ApiDebug record, @Param("example") ApiDebugExample example); + + int updateByExample(@Param("record") ApiDebug record, @Param("example") ApiDebugExample example); + + int updateByPrimaryKeySelective(ApiDebug record); + + int updateByPrimaryKey(ApiDebug record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") ApiDebug.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugMapper.xml new file mode 100644 index 0000000000..6afdc9ca05 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugMapper.xml @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 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, `name`, protocol, `method`, `path`, project_id, module_id, create_time, create_user, + update_time, update_user + + + + + delete from api_debug + where id = #{id,jdbcType=VARCHAR} + + + delete from api_debug + + + + + + insert into api_debug (id, `name`, protocol, + `method`, `path`, project_id, + module_id, create_time, create_user, + update_time, update_user) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, + #{method,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, + #{moduleId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, + #{updateTime,jdbcType=BIGINT}, #{updateUser,jdbcType=VARCHAR}) + + + insert into api_debug + + + id, + + + `name`, + + + protocol, + + + `method`, + + + `path`, + + + project_id, + + + module_id, + + + create_time, + + + create_user, + + + update_time, + + + update_user, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{protocol,jdbcType=VARCHAR}, + + + #{method,jdbcType=VARCHAR}, + + + #{path,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{moduleId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{updateUser,jdbcType=VARCHAR}, + + + + + + update api_debug + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + protocol = #{record.protocol,jdbcType=VARCHAR}, + + + `method` = #{record.method,jdbcType=VARCHAR}, + + + `path` = #{record.path,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + module_id = #{record.moduleId,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + update_user = #{record.updateUser,jdbcType=VARCHAR}, + + + + + + + + update api_debug + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + protocol = #{record.protocol,jdbcType=VARCHAR}, + `method` = #{record.method,jdbcType=VARCHAR}, + `path` = #{record.path,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + module_id = #{record.moduleId,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + update_user = #{record.updateUser,jdbcType=VARCHAR} + + + + + + update api_debug + + + `name` = #{name,jdbcType=VARCHAR}, + + + protocol = #{protocol,jdbcType=VARCHAR}, + + + `method` = #{method,jdbcType=VARCHAR}, + + + `path` = #{path,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + module_id = #{moduleId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + update_user = #{updateUser,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update api_debug + set `name` = #{name,jdbcType=VARCHAR}, + protocol = #{protocol,jdbcType=VARCHAR}, + `method` = #{method,jdbcType=VARCHAR}, + `path` = #{path,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + module_id = #{moduleId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=BIGINT}, + update_user = #{updateUser,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + insert into api_debug + (id, `name`, protocol, `method`, `path`, project_id, module_id, create_time, create_user, + update_time, update_user) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.protocol,jdbcType=VARCHAR}, + #{item.method,jdbcType=VARCHAR}, #{item.path,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, + #{item.moduleId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, + #{item.updateTime,jdbcType=BIGINT}, #{item.updateUser,jdbcType=VARCHAR}) + + + + insert into api_debug ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.name,jdbcType=VARCHAR} + + + #{item.protocol,jdbcType=VARCHAR} + + + #{item.method,jdbcType=VARCHAR} + + + #{item.path,jdbcType=VARCHAR} + + + #{item.projectId,jdbcType=VARCHAR} + + + #{item.moduleId,jdbcType=VARCHAR} + + + #{item.createTime,jdbcType=BIGINT} + + + #{item.createUser,jdbcType=VARCHAR} + + + #{item.updateTime,jdbcType=BIGINT} + + + #{item.updateUser,jdbcType=VARCHAR} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugModuleMapper.java b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugModuleMapper.java new file mode 100644 index 0000000000..fe1482583d --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugModuleMapper.java @@ -0,0 +1,34 @@ +package io.metersphere.api.mapper; + +import io.metersphere.api.domain.ApiDebugModule; +import io.metersphere.api.domain.ApiDebugModuleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ApiDebugModuleMapper { + long countByExample(ApiDebugModuleExample example); + + int deleteByExample(ApiDebugModuleExample example); + + int deleteByPrimaryKey(String id); + + int insert(ApiDebugModule record); + + int insertSelective(ApiDebugModule record); + + List selectByExample(ApiDebugModuleExample example); + + ApiDebugModule selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") ApiDebugModule record, @Param("example") ApiDebugModuleExample example); + + int updateByExample(@Param("record") ApiDebugModule record, @Param("example") ApiDebugModuleExample example); + + int updateByPrimaryKeySelective(ApiDebugModule record); + + int updateByPrimaryKey(ApiDebugModule record); + + int batchInsert(@Param("list") List list); + + int batchInsertSelective(@Param("list") List list, @Param("selective") ApiDebugModule.Column ... selective); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugModuleMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugModuleMapper.xml new file mode 100644 index 0000000000..e56171cf34 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDebugModuleMapper.xml @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 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, `name`, protocol, parent_id, project_id, `level`, pos, create_time, update_time, + update_user, create_user + + + + + delete from api_debug_module + where id = #{id,jdbcType=VARCHAR} + + + delete from api_debug_module + + + + + + insert into api_debug_module (id, `name`, protocol, + parent_id, project_id, `level`, + pos, create_time, update_time, + update_user, create_user) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, + #{parentId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, + #{pos,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{updateUser,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}) + + + insert into api_debug_module + + + id, + + + `name`, + + + protocol, + + + parent_id, + + + project_id, + + + `level`, + + + pos, + + + create_time, + + + update_time, + + + update_user, + + + create_user, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{protocol,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{level,jdbcType=INTEGER}, + + + #{pos,jdbcType=INTEGER}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{updateUser,jdbcType=VARCHAR}, + + + #{createUser,jdbcType=VARCHAR}, + + + + + + update api_debug_module + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + protocol = #{record.protocol,jdbcType=VARCHAR}, + + + parent_id = #{record.parentId,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + `level` = #{record.level,jdbcType=INTEGER}, + + + pos = #{record.pos,jdbcType=INTEGER}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + update_user = #{record.updateUser,jdbcType=VARCHAR}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + + + + + + update api_debug_module + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + protocol = #{record.protocol,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + `level` = #{record.level,jdbcType=INTEGER}, + pos = #{record.pos,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + update_user = #{record.updateUser,jdbcType=VARCHAR}, + create_user = #{record.createUser,jdbcType=VARCHAR} + + + + + + update api_debug_module + + + `name` = #{name,jdbcType=VARCHAR}, + + + protocol = #{protocol,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + `level` = #{level,jdbcType=INTEGER}, + + + pos = #{pos,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + update_user = #{updateUser,jdbcType=VARCHAR}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update api_debug_module + set `name` = #{name,jdbcType=VARCHAR}, + protocol = #{protocol,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + `level` = #{level,jdbcType=INTEGER}, + pos = #{pos,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + update_user = #{updateUser,jdbcType=VARCHAR}, + create_user = #{createUser,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + insert into api_debug_module + (id, `name`, protocol, parent_id, project_id, `level`, pos, create_time, update_time, + update_user, create_user) + values + + (#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.protocol,jdbcType=VARCHAR}, + #{item.parentId,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.level,jdbcType=INTEGER}, + #{item.pos,jdbcType=INTEGER}, #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, + #{item.updateUser,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR}) + + + + insert into api_debug_module ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.id,jdbcType=VARCHAR} + + + #{item.name,jdbcType=VARCHAR} + + + #{item.protocol,jdbcType=VARCHAR} + + + #{item.parentId,jdbcType=VARCHAR} + + + #{item.projectId,jdbcType=VARCHAR} + + + #{item.level,jdbcType=INTEGER} + + + #{item.pos,jdbcType=INTEGER} + + + #{item.createTime,jdbcType=BIGINT} + + + #{item.updateTime,jdbcType=BIGINT} + + + #{item.updateUser,jdbcType=VARCHAR} + + + #{item.createUser,jdbcType=VARCHAR} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDefinitionMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDefinitionMapper.xml index 8d1f63e94b..4bf1286a9f 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDefinitionMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiDefinitionMapper.xml @@ -5,13 +5,14 @@ - + + - + @@ -84,7 +85,7 @@ - id, `name`, protocol, module_path, `status`, module_id, num, tags, pos, project_id, + id, `name`, protocol, `method`, `path`, `status`, num, tags, pos, project_id, module_id, environment_id, latest, version_id, ref_id, description, create_time, create_user, update_time, update_user, delete_user, delete_time, deleted @@ -120,21 +121,21 @@ insert into api_definition (id, `name`, protocol, - module_path, `status`, module_id, + `method`, `path`, `status`, num, tags, pos, project_id, - environment_id, latest, version_id, - ref_id, description, create_time, - create_user, update_time, update_user, - delete_user, delete_time, deleted - ) + module_id, environment_id, latest, + version_id, ref_id, description, + create_time, create_user, update_time, + update_user, delete_user, delete_time, + deleted) values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, - #{modulePath,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR}, + #{method,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, #{tags,jdbcType=VARCHAR}, #{pos,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, - #{environmentId,jdbcType=VARCHAR}, #{latest,jdbcType=BIT}, #{versionId,jdbcType=VARCHAR}, - #{refId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, - #{createUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}, #{updateUser,jdbcType=VARCHAR}, - #{deleteUser,jdbcType=VARCHAR}, #{deleteTime,jdbcType=BIGINT}, #{deleted,jdbcType=BIT} - ) + #{moduleId,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, #{latest,jdbcType=BIT}, + #{versionId,jdbcType=VARCHAR}, #{refId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}, + #{updateUser,jdbcType=VARCHAR}, #{deleteUser,jdbcType=VARCHAR}, #{deleteTime,jdbcType=BIGINT}, + #{deleted,jdbcType=BIT}) insert into api_definition @@ -148,15 +149,15 @@ protocol, - - module_path, + + `method`, + + + `path`, `status`, - - module_id, - num, @@ -169,6 +170,9 @@ project_id, + + module_id, + environment_id, @@ -216,15 +220,15 @@ #{protocol,jdbcType=VARCHAR}, - - #{modulePath,jdbcType=VARCHAR}, + + #{method,jdbcType=VARCHAR}, + + + #{path,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, - - #{moduleId,jdbcType=VARCHAR}, - #{num,jdbcType=INTEGER}, @@ -237,6 +241,9 @@ #{projectId,jdbcType=VARCHAR}, + + #{moduleId,jdbcType=VARCHAR}, + #{environmentId,jdbcType=VARCHAR}, @@ -293,15 +300,15 @@ protocol = #{record.protocol,jdbcType=VARCHAR}, - - module_path = #{record.modulePath,jdbcType=VARCHAR}, + + `method` = #{record.method,jdbcType=VARCHAR}, + + + `path` = #{record.path,jdbcType=VARCHAR}, `status` = #{record.status,jdbcType=VARCHAR}, - - module_id = #{record.moduleId,jdbcType=VARCHAR}, - num = #{record.num,jdbcType=INTEGER}, @@ -314,6 +321,9 @@ project_id = #{record.projectId,jdbcType=VARCHAR}, + + module_id = #{record.moduleId,jdbcType=VARCHAR}, + environment_id = #{record.environmentId,jdbcType=VARCHAR}, @@ -360,13 +370,14 @@ set id = #{record.id,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR}, protocol = #{record.protocol,jdbcType=VARCHAR}, - module_path = #{record.modulePath,jdbcType=VARCHAR}, + `method` = #{record.method,jdbcType=VARCHAR}, + `path` = #{record.path,jdbcType=VARCHAR}, `status` = #{record.status,jdbcType=VARCHAR}, - module_id = #{record.moduleId,jdbcType=VARCHAR}, num = #{record.num,jdbcType=INTEGER}, tags = #{record.tags,jdbcType=VARCHAR}, pos = #{record.pos,jdbcType=BIGINT}, project_id = #{record.projectId,jdbcType=VARCHAR}, + module_id = #{record.moduleId,jdbcType=VARCHAR}, environment_id = #{record.environmentId,jdbcType=VARCHAR}, latest = #{record.latest,jdbcType=BIT}, version_id = #{record.versionId,jdbcType=VARCHAR}, @@ -392,15 +403,15 @@ protocol = #{protocol,jdbcType=VARCHAR}, - - module_path = #{modulePath,jdbcType=VARCHAR}, + + `method` = #{method,jdbcType=VARCHAR}, + + + `path` = #{path,jdbcType=VARCHAR}, `status` = #{status,jdbcType=VARCHAR}, - - module_id = #{moduleId,jdbcType=VARCHAR}, - num = #{num,jdbcType=INTEGER}, @@ -413,6 +424,9 @@ project_id = #{projectId,jdbcType=VARCHAR}, + + module_id = #{moduleId,jdbcType=VARCHAR}, + environment_id = #{environmentId,jdbcType=VARCHAR}, @@ -456,13 +470,14 @@ update api_definition set `name` = #{name,jdbcType=VARCHAR}, protocol = #{protocol,jdbcType=VARCHAR}, - module_path = #{modulePath,jdbcType=VARCHAR}, + `method` = #{method,jdbcType=VARCHAR}, + `path` = #{path,jdbcType=VARCHAR}, `status` = #{status,jdbcType=VARCHAR}, - module_id = #{moduleId,jdbcType=VARCHAR}, num = #{num,jdbcType=INTEGER}, tags = #{tags,jdbcType=VARCHAR}, pos = #{pos,jdbcType=BIGINT}, project_id = #{projectId,jdbcType=VARCHAR}, + module_id = #{moduleId,jdbcType=VARCHAR}, environment_id = #{environmentId,jdbcType=VARCHAR}, latest = #{latest,jdbcType=BIT}, version_id = #{versionId,jdbcType=VARCHAR}, @@ -479,19 +494,19 @@ insert into api_definition - (id, `name`, protocol, module_path, `status`, module_id, num, tags, pos, project_id, + (id, `name`, protocol, `method`, `path`, `status`, num, tags, pos, project_id, module_id, environment_id, latest, version_id, ref_id, description, create_time, create_user, update_time, update_user, delete_user, delete_time, deleted) values (#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.protocol,jdbcType=VARCHAR}, - #{item.modulePath,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.moduleId,jdbcType=VARCHAR}, + #{item.method,jdbcType=VARCHAR}, #{item.path,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.num,jdbcType=INTEGER}, #{item.tags,jdbcType=VARCHAR}, #{item.pos,jdbcType=BIGINT}, - #{item.projectId,jdbcType=VARCHAR}, #{item.environmentId,jdbcType=VARCHAR}, #{item.latest,jdbcType=BIT}, - #{item.versionId,jdbcType=VARCHAR}, #{item.refId,jdbcType=VARCHAR}, #{item.description,jdbcType=VARCHAR}, - #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=BIGINT}, - #{item.updateUser,jdbcType=VARCHAR}, #{item.deleteUser,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=BIGINT}, - #{item.deleted,jdbcType=BIT}) + #{item.projectId,jdbcType=VARCHAR}, #{item.moduleId,jdbcType=VARCHAR}, #{item.environmentId,jdbcType=VARCHAR}, + #{item.latest,jdbcType=BIT}, #{item.versionId,jdbcType=VARCHAR}, #{item.refId,jdbcType=VARCHAR}, + #{item.description,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, + #{item.updateTime,jdbcType=BIGINT}, #{item.updateUser,jdbcType=VARCHAR}, #{item.deleteUser,jdbcType=VARCHAR}, + #{item.deleteTime,jdbcType=BIGINT}, #{item.deleted,jdbcType=BIT}) @@ -513,15 +528,15 @@ #{item.protocol,jdbcType=VARCHAR} - - #{item.modulePath,jdbcType=VARCHAR} + + #{item.method,jdbcType=VARCHAR} + + + #{item.path,jdbcType=VARCHAR} #{item.status,jdbcType=VARCHAR} - - #{item.moduleId,jdbcType=VARCHAR} - #{item.num,jdbcType=INTEGER} @@ -534,6 +549,9 @@ #{item.projectId,jdbcType=VARCHAR} + + #{item.moduleId,jdbcType=VARCHAR} + #{item.environmentId,jdbcType=VARCHAR} diff --git a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioMapper.xml index 0ed53a8732..721e584824 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/api/mapper/ApiScenarioMapper.xml @@ -21,7 +21,6 @@ - @@ -92,8 +91,8 @@ id, `name`, `level`, `status`, principal, step_total, pass_rate, last_report_status, last_report_id, num, custom_num, deleted, pos, version_id, ref_id, latest, project_id, - api_scenario_module_id, description, module_path, tags, grouped, create_user, create_time, - delete_time, delete_user, update_user, update_time + api_scenario_module_id, description, tags, grouped, create_user, create_time, delete_time, + delete_user, update_user, update_time