mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
build: API module
This commit is contained in:
parent
69e312e87b
commit
73d319ccfa
@ -10,126 +10,110 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApiDefinition implements Serializable {
|
||||
@Schema(description = "接口pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "删除人")
|
||||
private String deleteUser;
|
||||
|
||||
@Schema(description = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
@Schema(description = "删除状态")
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition.name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 255, message = "{api_definition.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "接口类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition.method.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition.method.length_range}", groups = {Created.class, Updated.class})
|
||||
private String method;
|
||||
|
||||
@Schema(description = "接口协议", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口协议", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition.protocol.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 20, message = "{api_definition.protocol.length_range}", groups = {Created.class, Updated.class})
|
||||
private String protocol;
|
||||
|
||||
@Schema(description = "接口路径-只有HTTP协议有值")
|
||||
private String path;
|
||||
|
||||
@Schema(description = "模块全路径-用于导入处理")
|
||||
@Schema(description = "模块全路径-用于导入处理")
|
||||
private String modulePath;
|
||||
|
||||
@Schema(description = "接口状态/进行中/已完成", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@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")
|
||||
@Schema(description = "模块fk")
|
||||
private String moduleId;
|
||||
|
||||
@Schema(description = "自定义id")
|
||||
@Schema(description = "自定义id")
|
||||
private Integer num;
|
||||
|
||||
@Schema(description = "标签")
|
||||
@Schema(description = "标签")
|
||||
private String tags;
|
||||
|
||||
@Schema(description = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_definition.pos.not_blank}", groups = {Created.class})
|
||||
private Long pos;
|
||||
|
||||
@Schema(description = "是否启用同步")
|
||||
private Boolean syncEnable;
|
||||
|
||||
@Schema(description = "同步开始时间")
|
||||
private Long syncTime;
|
||||
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "环境fk")
|
||||
@Schema(description = "环境fk")
|
||||
private String environmentId;
|
||||
|
||||
@Schema(description = "是否为最新版本 0:否,1:是")
|
||||
@Schema(description = "是否为最新版本 0:否,1:是", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_definition.latest.not_blank}", groups = {Created.class})
|
||||
private Boolean latest;
|
||||
|
||||
@Schema(description = "版本fk")
|
||||
@Schema(description = "版本fk")
|
||||
private String versionId;
|
||||
|
||||
@Schema(description = "版本引用fk")
|
||||
@Schema(description = "版本引用fk")
|
||||
private String refId;
|
||||
|
||||
@Schema(description = "描述")
|
||||
@Schema(description = "描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "删除人")
|
||||
private String deleteUser;
|
||||
|
||||
@Schema(description = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
@Schema(description = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_definition.deleted.not_blank}", groups = {Created.class})
|
||||
private Boolean deleted;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "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),
|
||||
deleteUser("delete_user", "deleteUser", "VARCHAR", false),
|
||||
deleteTime("delete_time", "deleteTime", "BIGINT", false),
|
||||
deleted("deleted", "deleted", "BIT", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
method("method", "method", "VARCHAR", true),
|
||||
protocol("protocol", "protocol", "VARCHAR", false),
|
||||
path("path", "path", "VARCHAR", true),
|
||||
modulePath("module_path", "modulePath", "VARCHAR", false),
|
||||
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),
|
||||
syncEnable("sync_enable", "syncEnable", "BIT", false),
|
||||
syncTime("sync_time", "syncTime", "BIGINT", false),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
environmentId("environment_id", "environmentId", "VARCHAR", false),
|
||||
latest("latest", "latest", "BIT", false),
|
||||
versionId("version_id", "versionId", "VARCHAR", false),
|
||||
refId("ref_id", "refId", "VARCHAR", false),
|
||||
description("description", "description", "VARCHAR", false);
|
||||
description("description", "description", "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),
|
||||
deleteUser("delete_user", "deleteUser", "VARCHAR", false),
|
||||
deleteTime("delete_time", "deleteTime", "BIGINT", false),
|
||||
deleted("deleted", "deleted", "BIT", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
|
@ -10,27 +10,23 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApiDefinitionBlob implements Serializable {
|
||||
@Schema(description = "接口fk/ 一对一关系", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口fk/ 一对一关系", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_blob.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_blob.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "请求内容")
|
||||
@Schema(description = "请求内容")
|
||||
private byte[] request;
|
||||
|
||||
@Schema(description = "响应内容")
|
||||
@Schema(description = "响应内容")
|
||||
private byte[] response;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private byte[] remark;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
request("request", "request", "LONGVARBINARY", false),
|
||||
response("response", "response", "LONGVARBINARY", false),
|
||||
remark("remark", "remark", "LONGVARBINARY", false);
|
||||
response("response", "response", "LONGVARBINARY", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,19 +4,93 @@ 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 ApiDefinitionFollower implements Serializable {
|
||||
@Schema(description = "接口fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_follower.api_definition_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_follower.api_definition_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String apiDefinitionId;
|
||||
|
||||
@Schema(description = "关注人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "关注人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_follower.user_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_follower.user_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String userId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
apiDefinitionId("api_definition_id", "apiDefinitionId", "VARCHAR", false),
|
||||
userId("user_id", "userId", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,63 +1,142 @@
|
||||
package io.metersphere.api.domain;
|
||||
|
||||
import io.metersphere.validation.groups.Created;
|
||||
import io.metersphere.validation.groups.Updated;
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApiDefinitionMock implements Serializable {
|
||||
@Schema(description = "mock pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "mock pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_mock.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_mock.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "接口路径")
|
||||
@Schema(description = "接口路径")
|
||||
private String apiPath;
|
||||
|
||||
@Schema(description = "接口类型")
|
||||
@Schema(description = "接口类型")
|
||||
private String apiMethod;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@Schema(description = "修改时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "mock 名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "mock 名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_mock.name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 200, message = "{api_definition_mock.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "自定义标签")
|
||||
@Schema(description = "自定义标签")
|
||||
private String tags;
|
||||
|
||||
@Schema(description = "启用/禁用", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_definition_mock.enable.not_blank}", groups = {Created.class})
|
||||
@Schema(description = "启用/禁用")
|
||||
private Boolean enable;
|
||||
|
||||
@Schema(description = "mock编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "mock编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_mock.expect_num.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_mock.expect_num.length_range}", groups = {Created.class, Updated.class})
|
||||
private String expectNum;
|
||||
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_mock.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_mock.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "接口fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_mock.api_definition_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_mock.api_definition_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String apiDefinitionId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
apiPath("api_path", "apiPath", "VARCHAR", false),
|
||||
apiMethod("api_method", "apiMethod", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
updateTime("update_time", "updateTime", "BIGINT", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
tags("tags", "tags", "VARCHAR", false),
|
||||
enable("enable", "enable", "BIT", true),
|
||||
expectNum("expect_num", "expectNum", "VARCHAR", false),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
apiDefinitionId("api_definition_id", "apiDefinitionId", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,26 +1,98 @@
|
||||
package io.metersphere.api.domain;
|
||||
|
||||
import io.metersphere.validation.groups.Created;
|
||||
import io.metersphere.validation.groups.Updated;
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApiDefinitionMockConfig implements Serializable {
|
||||
@Schema(description = "接口mock pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口mock pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_mock_config.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_mock_config.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "请求内容")
|
||||
@Schema(description = "请求内容")
|
||||
private byte[] request;
|
||||
|
||||
@Schema(description = "响应内容")
|
||||
@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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,61 +1,140 @@
|
||||
package io.metersphere.api.domain;
|
||||
|
||||
import io.metersphere.validation.groups.Created;
|
||||
import io.metersphere.validation.groups.Updated;
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ApiDefinitionModule implements Serializable {
|
||||
@Schema(description = "接口模块pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口模块pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_module.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_module.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_module.name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 255, message = "{api_definition_module.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "协议", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "协议", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_module.protocol.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 64, message = "{api_definition_module.protocol.length_range}", groups = {Created.class, Updated.class})
|
||||
private String protocol;
|
||||
|
||||
@Schema(description = "父级fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "父级fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_module.parent_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_module.parent_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String parentId;
|
||||
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_module.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_module.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "树节点级别", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "树节点级别", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_definition_module.level.not_blank}", groups = {Created.class})
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_definition_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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -174,266 +174,6 @@ public class ApiDefinitionModuleExample {
|
||||
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<Long> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Long> 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<Long> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Long> 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<String> values) {
|
||||
addCriterion("update_user in", values, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserNotIn(List<String> 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<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotIn(List<String> 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 andNameIsNull() {
|
||||
addCriterion("`name` is null");
|
||||
return (Criteria) this;
|
||||
@ -833,6 +573,266 @@ public class ApiDefinitionModuleExample {
|
||||
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<Long> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<Long> 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<Long> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<Long> 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<String> values) {
|
||||
addCriterion("update_user in", values, "updateUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateUserNotIn(List<String> 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<String> values) {
|
||||
addCriterion("create_user in", values, "createUser");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserNotIn(List<String> 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 {
|
||||
|
@ -4,37 +4,117 @@ 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 ApiDefinitionSwagger implements Serializable {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_swagger.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_definition_swagger.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "url地址", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "url地址", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_definition_swagger.swagger_url.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 500, message = "{api_definition_swagger.swagger_url.length_range}", groups = {Created.class, Updated.class})
|
||||
private String swaggerUrl;
|
||||
|
||||
@Schema(description = "模块fk")
|
||||
@Schema(description = "模块fk")
|
||||
private String moduleId;
|
||||
|
||||
@Schema(description = "模块路径")
|
||||
@Schema(description = "模块路径")
|
||||
private String modulePath;
|
||||
|
||||
@Schema(description = "导入模式/覆盖/不覆盖")
|
||||
@Schema(description = "导入模式/覆盖/不覆盖")
|
||||
private Boolean mode;
|
||||
|
||||
@Schema(description = "项目fk")
|
||||
@Schema(description = "项目fk")
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "导入版本")
|
||||
@Schema(description = "导入版本")
|
||||
private String versionId;
|
||||
|
||||
@Schema(description = "鉴权配置信息")
|
||||
@Schema(description = "鉴权配置信息")
|
||||
private byte[] config;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
swaggerUrl("swagger_url", "swaggerUrl", "VARCHAR", false),
|
||||
moduleId("module_id", "moduleId", "VARCHAR", false),
|
||||
modulePath("module_path", "modulePath", "VARCHAR", false),
|
||||
mode("mode", "mode", "BIT", true),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
versionId("version_id", "versionId", "VARCHAR", false),
|
||||
config("config", "config", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,28 +4,105 @@ 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 ApiEnvironmentConfig implements Serializable {
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_environment_config.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_environment_config.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@Schema(description = "修改时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "用户fk")
|
||||
@Schema(description = "用户fk")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "环境fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "环境fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_environment_config.environment_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_environment_config.environment_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String environmentId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
updateTime("update_time", "updateTime", "BIGINT", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
environmentId("environment_id", "environmentId", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,83 +4,173 @@ 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 ApiReport implements Serializable {
|
||||
@Schema(description = "接口结果报告pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口结果报告pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_report.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "接口报告名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口报告名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report.name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 200, message = "{api_report.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "资源fk/api_definition_id/api_test_case_id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "资源fk/api_definition_id/api_test_case_id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report.resource_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_report.resource_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String resourceId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "修改时间")
|
||||
@Schema(description = "修改时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "创建人fk")
|
||||
@Schema(description = "创建人fk")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
@Schema(description = "修改人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_report.deleted.not_blank}", groups = {Created.class})
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "结果状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "结果状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report.status.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_report.status.length_range}", groups = {Created.class, Updated.class})
|
||||
private String status;
|
||||
|
||||
@Schema(description = "接口开始执行时间")
|
||||
@Schema(description = "接口开始执行时间")
|
||||
private Long startTime;
|
||||
|
||||
@Schema(description = "接口执行结束时间")
|
||||
@Schema(description = "接口执行结束时间")
|
||||
private Long endTime;
|
||||
|
||||
@Schema(description = "执行模块/API/CASE/API_PLAN", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "执行模块/API/CASE/API_PLAN", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report.run_mode.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 20, message = "{api_report.run_mode.length_range}", groups = {Created.class, Updated.class})
|
||||
private String runMode;
|
||||
|
||||
@Schema(description = "资源池fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "资源池fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report.pool_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_report.pool_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String poolId;
|
||||
|
||||
@Schema(description = "触发模式/手动/批量/定时任务/JENKINS", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "触发模式/手动/批量/定时任务/JENKINS", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report.trigger_mode.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_report.trigger_mode.length_range}", groups = {Created.class, Updated.class})
|
||||
private String triggerMode;
|
||||
|
||||
@Schema(description = "版本fk")
|
||||
@Schema(description = "版本fk")
|
||||
private String versionId;
|
||||
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_report.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "集成报告id/api_scenario_report_id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "集成报告id/api_scenario_report_id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report.integrated_report_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_report.integrated_report_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String integratedReportId;
|
||||
|
||||
@Schema(description = "是否为集成报告,默认否", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "是否为集成报告,默认否", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_report.integrated.not_blank}", groups = {Created.class})
|
||||
private Boolean integrated;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
resourceId("resource_id", "resourceId", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
updateTime("update_time", "updateTime", "BIGINT", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
updateUser("update_user", "updateUser", "VARCHAR", false),
|
||||
deleted("deleted", "deleted", "BIT", false),
|
||||
status("status", "status", "VARCHAR", true),
|
||||
startTime("start_time", "startTime", "BIGINT", false),
|
||||
endTime("end_time", "endTime", "BIGINT", false),
|
||||
runMode("run_mode", "runMode", "VARCHAR", false),
|
||||
poolId("pool_id", "poolId", "VARCHAR", false),
|
||||
triggerMode("trigger_mode", "triggerMode", "VARCHAR", false),
|
||||
versionId("version_id", "versionId", "VARCHAR", false),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
integratedReportId("integrated_report_id", "integratedReportId", "VARCHAR", false),
|
||||
integrated("integrated", "integrated", "BIT", 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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,23 +4,99 @@ 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 ApiReportBlob implements Serializable {
|
||||
@Schema(description = "接口报告fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口报告fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_report_blob.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_report_blob.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "结果内容详情")
|
||||
@Schema(description = "结果内容详情")
|
||||
private byte[] content;
|
||||
|
||||
@Schema(description = "执行环境配置")
|
||||
@Schema(description = "执行环境配置")
|
||||
private byte[] config;
|
||||
|
||||
@Schema(description = "执行过程日志")
|
||||
@Schema(description = "执行过程日志")
|
||||
private byte[] console;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
content("content", "content", "LONGVARBINARY", false),
|
||||
config("config", "config", "LONGVARBINARY", false),
|
||||
console("console", "console", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,110 +4,210 @@ 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 ApiScenario implements Serializable {
|
||||
@Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "场景名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario.name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 255, message = "{api_scenario.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
@Schema(description = "删除人")
|
||||
private String deleteUser;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "场景级别/P0/P1等", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景级别/P0/P1等", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario.level.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 10, message = "{api_scenario.level.length_range}", groups = {Created.class, Updated.class})
|
||||
private String level;
|
||||
|
||||
@Schema(description = "场景状态/未规划/已完成 等", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景状态/未规划/已完成 等", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario.status.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 20, message = "{api_scenario.status.length_range}", groups = {Created.class, Updated.class})
|
||||
private String status;
|
||||
|
||||
@Schema(description = "责任人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "责任人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario.principal.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario.principal.length_range}", groups = {Created.class, Updated.class})
|
||||
private String principal;
|
||||
|
||||
@Schema(description = "场景步骤总数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景步骤总数", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_scenario.step_total.not_blank}", groups = {Created.class})
|
||||
private Integer stepTotal;
|
||||
|
||||
@Schema(description = "通过率", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "通过率", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_scenario.pass_rate.not_blank}", groups = {Created.class})
|
||||
private Long passRate;
|
||||
|
||||
@Schema(description = "最后一次执行的结果状态")
|
||||
private String reportStatus;
|
||||
@Schema(description = "最后一次执行的结果状态")
|
||||
private String lastReportStatus;
|
||||
|
||||
@Schema(description = "编号")
|
||||
@Schema(description = "最后一次执行的报告fk")
|
||||
private String lastReportId;
|
||||
|
||||
@Schema(description = "编号")
|
||||
private Integer num;
|
||||
|
||||
@Schema(description = "自定义id")
|
||||
@Schema(description = "自定义id")
|
||||
private String customNum;
|
||||
|
||||
@Schema(description = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_scenario.deleted.not_blank}", groups = {Created.class})
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_scenario.pos.not_blank}", groups = {Created.class})
|
||||
private Long pos;
|
||||
|
||||
@Schema(description = "版本fk")
|
||||
@Schema(description = "版本fk")
|
||||
private String versionId;
|
||||
|
||||
@Schema(description = "引用资源fk")
|
||||
@Schema(description = "引用资源fk")
|
||||
private String refId;
|
||||
|
||||
@Schema(description = "是否为最新版本 0:否,1:是")
|
||||
@Schema(description = "是否为最新版本 0:否,1:是")
|
||||
private Boolean latest;
|
||||
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "场景模块fk")
|
||||
@Schema(description = "场景模块fk")
|
||||
private String apiScenarioModuleId;
|
||||
|
||||
@Schema(description = "最后一次执行的报告fk")
|
||||
private String reportId;
|
||||
|
||||
@Schema(description = "描述信息")
|
||||
@Schema(description = "描述信息")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "模块全路径/用于导入模块创建")
|
||||
@Schema(description = "模块全路径/用于导入模块创建")
|
||||
private String modulePath;
|
||||
|
||||
@Schema(description = "标签")
|
||||
@Schema(description = "标签")
|
||||
private String tags;
|
||||
|
||||
@Schema(description = "是否为环境组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "是否为环境组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_scenario.grouped.not_blank}", groups = {Created.class})
|
||||
private Boolean grouped;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
@Schema(description = "删除人")
|
||||
private String deleteUser;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
level("level", "level", "VARCHAR", true),
|
||||
status("status", "status", "VARCHAR", true),
|
||||
principal("principal", "principal", "VARCHAR", false),
|
||||
stepTotal("step_total", "stepTotal", "INTEGER", false),
|
||||
passRate("pass_rate", "passRate", "BIGINT", false),
|
||||
lastReportStatus("last_report_status", "lastReportStatus", "VARCHAR", false),
|
||||
lastReportId("last_report_id", "lastReportId", "VARCHAR", false),
|
||||
num("num", "num", "INTEGER", false),
|
||||
customNum("custom_num", "customNum", "VARCHAR", false),
|
||||
deleted("deleted", "deleted", "BIT", false),
|
||||
pos("pos", "pos", "BIGINT", false),
|
||||
versionId("version_id", "versionId", "VARCHAR", false),
|
||||
refId("ref_id", "refId", "VARCHAR", false),
|
||||
latest("latest", "latest", "BIT", false),
|
||||
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),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
deleteTime("delete_time", "deleteTime", "BIGINT", false),
|
||||
deleteUser("delete_user", "deleteUser", "VARCHAR", false),
|
||||
updateUser("update_user", "updateUser", "VARCHAR", false),
|
||||
updateTime("update_time", "updateTime", "BIGINT", false);
|
||||
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
private final String column;
|
||||
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
private final String javaProperty;
|
||||
|
||||
private final String jdbcType;
|
||||
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,17 +4,91 @@ 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 ApiScenarioBlob implements Serializable {
|
||||
@Schema(description = "场景pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_blob.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_blob.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "场景步骤内容")
|
||||
@Schema(description = "场景步骤内容")
|
||||
private byte[] content;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
content("content", "content", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,30 +4,107 @@ 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 ApiScenarioEnvironment implements Serializable {
|
||||
@Schema(description = "场景环境pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景环境pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_environment.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_environment.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_environment.api_scenario_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_environment.api_scenario_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String apiScenarioId;
|
||||
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_environment.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_environment.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "环境fk")
|
||||
@Schema(description = "环境fk")
|
||||
private String environmentId;
|
||||
|
||||
@Schema(description = "环境组fk")
|
||||
@Schema(description = "环境组fk")
|
||||
private String environmentGroupId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
apiScenarioId("api_scenario_id", "apiScenarioId", "VARCHAR", false),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
environmentId("environment_id", "environmentId", "VARCHAR", false),
|
||||
environmentGroupId("environment_group_id", "environmentGroupId", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -4,19 +4,93 @@ 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 ApiScenarioFollower implements Serializable {
|
||||
@Schema(description = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_follower.api_scenario_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_follower.api_scenario_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String apiScenarioId;
|
||||
|
||||
@Schema(description = "关注人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "关注人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_follower.user_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_follower.user_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String userId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
apiScenarioId("api_scenario_id", "apiScenarioId", "VARCHAR", false),
|
||||
userId("user_id", "userId", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,49 +4,131 @@ 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 ApiScenarioModule implements Serializable {
|
||||
@Schema(description = "场景模块pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景模块pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_module.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_module.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_module.name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 255, message = "{api_scenario_module.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "模块级别", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "模块级别", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_scenario_module.level.not_blank}", groups = {Created.class})
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_scenario_module.pos.not_blank}", groups = {Created.class})
|
||||
private Integer pos;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
@Schema(description = "更新人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_module.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_module.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "父级fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "父级fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_module.parent_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_module.parent_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String parentId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
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),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
parentId("parent_id", "parentId", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,36 +4,115 @@ 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 ApiScenarioReference implements Serializable {
|
||||
@Schema(description = "引用关系pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "引用关系pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_reference.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_reference.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_reference.api_scenario_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_reference.api_scenario_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String apiScenarioId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "引用步骤fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "引用步骤fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_reference.reference_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_reference.reference_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String referenceId;
|
||||
|
||||
@Schema(description = "引用步骤类型/REF/COPY")
|
||||
@Schema(description = "引用步骤类型/REF/COPY")
|
||||
private String referenceType;
|
||||
|
||||
@Schema(description = "步骤类型/CASE/API")
|
||||
@Schema(description = "步骤类型/CASE/API")
|
||||
private String dataType;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
apiScenarioId("api_scenario_id", "apiScenarioId", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
referenceId("reference_id", "referenceId", "VARCHAR", false),
|
||||
referenceType("reference_type", "referenceType", "VARCHAR", false),
|
||||
dataType("data_type", "dataType", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,81 +4,171 @@ 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 ApiScenarioReport implements Serializable {
|
||||
@Schema(description = "场景报告pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景报告pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_report.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "报告名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "报告名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report.name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 255, message = "{api_scenario_report.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "删除时间")
|
||||
@Schema(description = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
@Schema(description = "删除人")
|
||||
@Schema(description = "删除人")
|
||||
private String deleteUser;
|
||||
|
||||
@Schema(description = "删除标识", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "删除标识", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_scenario_report.deleted.not_blank}", groups = {Created.class})
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
@Schema(description = "修改人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "通过率")
|
||||
@Schema(description = "通过率")
|
||||
private Long passRate;
|
||||
|
||||
@Schema(description = "报告状态/SUCCESS/ERROR", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "报告状态/SUCCESS/ERROR", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report.status.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 20, message = "{api_scenario_report.status.length_range}", groups = {Created.class, Updated.class})
|
||||
private String status;
|
||||
|
||||
@Schema(description = "触发方式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "触发方式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report.trigger_mode.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 20, message = "{api_scenario_report.trigger_mode.length_range}", groups = {Created.class, Updated.class})
|
||||
private String triggerMode;
|
||||
|
||||
@Schema(description = "执行模式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "执行模式", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report.run_mode.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 20, message = "{api_scenario_report.run_mode.length_range}", groups = {Created.class, Updated.class})
|
||||
private String runMode;
|
||||
|
||||
@Schema(description = "资源池", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "资源池", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report.pool_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_report.pool_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String poolId;
|
||||
|
||||
@Schema(description = "版本fk")
|
||||
@Schema(description = "版本fk")
|
||||
private String versionId;
|
||||
|
||||
@Schema(description = "是否是集成报告", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "是否是集成报告", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_scenario_report.integrated.not_blank}", groups = {Created.class})
|
||||
private Boolean integrated;
|
||||
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_report.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report.scenario_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_report.scenario_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String scenarioId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
deleteTime("delete_time", "deleteTime", "BIGINT", false),
|
||||
deleteUser("delete_user", "deleteUser", "VARCHAR", false),
|
||||
deleted("deleted", "deleted", "BIT", false),
|
||||
updateUser("update_user", "updateUser", "VARCHAR", false),
|
||||
updateTime("update_time", "updateTime", "BIGINT", false),
|
||||
passRate("pass_rate", "passRate", "BIGINT", false),
|
||||
status("status", "status", "VARCHAR", true),
|
||||
triggerMode("trigger_mode", "triggerMode", "VARCHAR", false),
|
||||
runMode("run_mode", "runMode", "VARCHAR", false),
|
||||
poolId("pool_id", "poolId", "VARCHAR", false),
|
||||
versionId("version_id", "versionId", "VARCHAR", false),
|
||||
integrated("integrated", "integrated", "BIT", false),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
scenarioId("scenario_id", "scenarioId", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,60 +4,147 @@ 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 ApiScenarioReportDetail implements Serializable {
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report_detail.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_report_detail.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "报告fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "报告fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report_detail.report_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_report_detail.report_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String reportId;
|
||||
|
||||
@Schema(description = "场景中各个步骤请求唯一标识", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "场景中各个步骤请求唯一标识", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report_detail.resource_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_report_detail.resource_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String resourceId;
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@Schema(description = "开始时间")
|
||||
private Long startTime;
|
||||
|
||||
@Schema(description = "结果状态")
|
||||
@Schema(description = "结果状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "单个请求步骤时间")
|
||||
@Schema(description = "单个请求步骤时间")
|
||||
private Long requestTime;
|
||||
|
||||
@Schema(description = "总断言数")
|
||||
@Schema(description = "总断言数")
|
||||
private Long assertionsTotal;
|
||||
|
||||
@Schema(description = "失败断言数")
|
||||
@Schema(description = "失败断言数")
|
||||
private Long passAssertionsTotal;
|
||||
|
||||
@Schema(description = "误报编号")
|
||||
@Schema(description = "误报编号")
|
||||
private String fakeCode;
|
||||
|
||||
@Schema(description = "请求名称")
|
||||
@Schema(description = "请求名称")
|
||||
private String requestName;
|
||||
|
||||
@Schema(description = "环境fk")
|
||||
@Schema(description = "环境fk")
|
||||
private String environmentId;
|
||||
|
||||
@Schema(description = "项目fk")
|
||||
@Schema(description = "项目fk")
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "失败总数")
|
||||
@Schema(description = "失败总数")
|
||||
private Integer errorTotal;
|
||||
|
||||
@Schema(description = "请求响应码")
|
||||
@Schema(description = "请求响应码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "执行结果")
|
||||
@Schema(description = "执行结果")
|
||||
private byte[] content;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
reportId("report_id", "reportId", "VARCHAR", false),
|
||||
resourceId("resource_id", "resourceId", "VARCHAR", false),
|
||||
startTime("start_time", "startTime", "BIGINT", false),
|
||||
status("status", "status", "VARCHAR", true),
|
||||
requestTime("request_time", "requestTime", "BIGINT", false),
|
||||
assertionsTotal("assertions_total", "assertionsTotal", "BIGINT", false),
|
||||
passAssertionsTotal("pass_assertions_total", "passAssertionsTotal", "BIGINT", false),
|
||||
fakeCode("fake_code", "fakeCode", "VARCHAR", false),
|
||||
requestName("request_name", "requestName", "VARCHAR", false),
|
||||
environmentId("environment_id", "environmentId", "VARCHAR", false),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
errorTotal("error_total", "errorTotal", "INTEGER", false),
|
||||
code("code", "code", "VARCHAR", false),
|
||||
content("content", "content", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,17 +4,91 @@ 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 ApiScenarioReportLog implements Serializable {
|
||||
@Schema(description = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report_log.report_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_report_log.report_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String reportId;
|
||||
|
||||
@Schema(description = "执行日志")
|
||||
@Schema(description = "执行日志")
|
||||
private byte[] console;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
reportId("report_id", "reportId", "VARCHAR", false),
|
||||
console("console", "console", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,17 +4,91 @@ 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 ApiScenarioReportStructure implements Serializable {
|
||||
@Schema(description = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "请求资源 id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_scenario_report_structure.report_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_scenario_report_structure.report_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String reportId;
|
||||
|
||||
@Schema(description = "资源步骤结构树")
|
||||
@Schema(description = "资源步骤结构树")
|
||||
private byte[] resourceTree;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
reportId("report_id", "reportId", "VARCHAR", false),
|
||||
resourceTree("resource_tree", "resourceTree", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,45 +4,126 @@ 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 ApiSyncConfig implements Serializable {
|
||||
@Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_sync_config.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_sync_config.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "API/CASE 来源fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "API/CASE 来源fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_sync_config.resource_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_sync_config.resource_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String resourceId;
|
||||
|
||||
@Schema(description = "来源类型/API/CASE", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "来源类型/API/CASE", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_sync_config.resource_type.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_sync_config.resource_type.length_range}", groups = {Created.class, Updated.class})
|
||||
private String resourceType;
|
||||
|
||||
@Schema(description = "是否隐藏")
|
||||
@Schema(description = "是否隐藏")
|
||||
private Boolean hide;
|
||||
|
||||
@Schema(description = "是否通知用例创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "是否通知用例创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_sync_config.notify_case_creator.not_blank}", groups = {Created.class})
|
||||
private Boolean notifyCaseCreator;
|
||||
|
||||
@Schema(description = "是否通知场景创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "是否通知场景创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_sync_config.notify_scenario_creator.not_blank}", groups = {Created.class})
|
||||
private Boolean notifyScenarioCreator;
|
||||
|
||||
@Schema(description = "是否同步用例", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "是否同步用例", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_sync_config.sync_enable.not_blank}", groups = {Created.class})
|
||||
private Boolean syncEnable;
|
||||
|
||||
@Schema(description = "是否发送通知")
|
||||
@Schema(description = "是否发送通知")
|
||||
private Boolean noticeEnable;
|
||||
|
||||
@Schema(description = "同步规则")
|
||||
@Schema(description = "同步规则")
|
||||
private String ruleConfig;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
resourceId("resource_id", "resourceId", "VARCHAR", false),
|
||||
resourceType("resource_type", "resourceType", "VARCHAR", false),
|
||||
hide("hide", "hide", "BIT", false),
|
||||
notifyCaseCreator("notify_case_creator", "notifyCaseCreator", "BIT", false),
|
||||
notifyScenarioCreator("notify_scenario_creator", "notifyScenarioCreator", "BIT", false),
|
||||
syncEnable("sync_enable", "syncEnable", "BIT", false),
|
||||
noticeEnable("notice_enable", "noticeEnable", "BIT", false),
|
||||
ruleConfig("rule_config", "ruleConfig", "LONGVARCHAR", 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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,95 +4,181 @@ 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 ApiTestCase implements Serializable {
|
||||
@Schema(description = "接口用例pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口用例pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_test_case.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "接口用例名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口用例名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case.name.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 255, message = "{api_test_case.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
@Schema(description = "删除人")
|
||||
private String deleteUser;
|
||||
|
||||
@Schema(description = "删除标识", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_test_case.deleted.not_blank}", groups = {Created.class})
|
||||
private Boolean deleted;
|
||||
|
||||
@Schema(description = "用例等级", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "用例等级", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case.priority.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_test_case.priority.length_range}", groups = {Created.class, Updated.class})
|
||||
private String priority;
|
||||
|
||||
@Schema(description = "接口用例编号id")
|
||||
@Schema(description = "接口用例编号id")
|
||||
private Integer num;
|
||||
|
||||
@Schema(description = "标签")
|
||||
@Schema(description = "标签")
|
||||
private String tags;
|
||||
|
||||
@Schema(description = "用例状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "用例状态", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case.status.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 20, message = "{api_test_case.status.length_range}", groups = {Created.class, Updated.class})
|
||||
private String status;
|
||||
|
||||
@Schema(description = "最新执行结果状态")
|
||||
private String apiReportStatus;
|
||||
@Schema(description = "最新执行结果状态")
|
||||
private String lastReportStatus;
|
||||
|
||||
@Schema(description = "最后执行结果报告fk")
|
||||
private String apiReportId;
|
||||
@Schema(description = "最后执行结果报告fk")
|
||||
private String lastReportId;
|
||||
|
||||
@Schema(description = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "自定义排序", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_test_case.pos.not_blank}", groups = {Created.class})
|
||||
private Long pos;
|
||||
|
||||
@Schema(description = "是否开启同步", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_test_case.sync_enable.not_blank}", groups = {Created.class})
|
||||
private Boolean syncEnable;
|
||||
|
||||
@Schema(description = "需要同步的开始时间")
|
||||
private Long syncTime;
|
||||
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_test_case.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "接口fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case.api_definition_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_test_case.api_definition_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String apiDefinitionId;
|
||||
|
||||
@Schema(description = "版本fk")
|
||||
@Schema(description = "版本fk")
|
||||
private String versionId;
|
||||
|
||||
@Schema(description = "责任人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "责任人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case.principal.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_test_case.principal.length_range}", groups = {Created.class, Updated.class})
|
||||
private String principal;
|
||||
|
||||
@Schema(description = "环境fk")
|
||||
@Schema(description = "环境fk")
|
||||
private String environmentId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "更新人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
@Schema(description = "删除人")
|
||||
private String deleteUser;
|
||||
|
||||
@Schema(description = "删除标识", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{api_test_case.deleted.not_blank}", groups = {Created.class})
|
||||
private Boolean deleted;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
priority("priority", "priority", "VARCHAR", false),
|
||||
num("num", "num", "INTEGER", false),
|
||||
tags("tags", "tags", "VARCHAR", false),
|
||||
status("status", "status", "VARCHAR", true),
|
||||
lastReportStatus("last_report_status", "lastReportStatus", "VARCHAR", false),
|
||||
lastReportId("last_report_id", "lastReportId", "VARCHAR", false),
|
||||
pos("pos", "pos", "BIGINT", false),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
apiDefinitionId("api_definition_id", "apiDefinitionId", "VARCHAR", false),
|
||||
versionId("version_id", "versionId", "VARCHAR", false),
|
||||
principal("principal", "principal", "VARCHAR", false),
|
||||
environmentId("environment_id", "environmentId", "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),
|
||||
deleteTime("delete_time", "deleteTime", "BIGINT", false),
|
||||
deleteUser("delete_user", "deleteUser", "VARCHAR", false),
|
||||
deleted("deleted", "deleted", "BIT", 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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,17 +4,91 @@ 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 ApiTestCaseBlob implements Serializable {
|
||||
@Schema(description = "接口用例pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "接口用例pk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case_blob.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{api_test_case_blob.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "请求内容")
|
||||
@Schema(description = "请求内容")
|
||||
private byte[] request;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
request("request", "request", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -4,19 +4,93 @@ 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 ApiTestCaseFollower implements Serializable {
|
||||
@Schema(description = "用例fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "用例fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case_follower.case_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_test_case_follower.case_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String caseId;
|
||||
|
||||
@Schema(description = "关注人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "关注人/用户fk", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{api_test_case_follower.user_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{api_test_case_follower.user_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String userId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
caseId("case_id", "caseId", "VARCHAR", false),
|
||||
userId("user_id", "userId", "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<Column> 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -7,7 +7,6 @@
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.api.domain.ApiDefinitionBlob">
|
||||
<result column="request" jdbcType="LONGVARBINARY" property="request" />
|
||||
<result column="response" jdbcType="LONGVARBINARY" property="response" />
|
||||
<result column="remark" jdbcType="LONGVARBINARY" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -71,7 +70,7 @@
|
||||
id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
request, response, remark
|
||||
request, response
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.api.domain.ApiDefinitionBlobExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
@ -122,10 +121,10 @@
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.api.domain.ApiDefinitionBlob">
|
||||
insert into api_definition_blob (id, request, response,
|
||||
remark)
|
||||
values (#{id,jdbcType=VARCHAR}, #{request,jdbcType=LONGVARBINARY}, #{response,jdbcType=LONGVARBINARY},
|
||||
#{remark,jdbcType=LONGVARBINARY})
|
||||
insert into api_definition_blob (id, request, response
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{request,jdbcType=LONGVARBINARY}, #{response,jdbcType=LONGVARBINARY}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiDefinitionBlob">
|
||||
insert into api_definition_blob
|
||||
@ -139,9 +138,6 @@
|
||||
<if test="response != null">
|
||||
response,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@ -153,9 +149,6 @@
|
||||
<if test="response != null">
|
||||
#{response,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiDefinitionBlobExample" resultType="java.lang.Long">
|
||||
@ -176,9 +169,6 @@
|
||||
<if test="record.response != null">
|
||||
response = #{record.response,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
remark = #{record.remark,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@ -188,8 +178,7 @@
|
||||
update api_definition_blob
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
request = #{record.request,jdbcType=LONGVARBINARY},
|
||||
response = #{record.response,jdbcType=LONGVARBINARY},
|
||||
remark = #{record.remark,jdbcType=LONGVARBINARY}
|
||||
response = #{record.response,jdbcType=LONGVARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -210,26 +199,22 @@
|
||||
<if test="response != null">
|
||||
response = #{response,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.api.domain.ApiDefinitionBlob">
|
||||
update api_definition_blob
|
||||
set request = #{request,jdbcType=LONGVARBINARY},
|
||||
response = #{response,jdbcType=LONGVARBINARY},
|
||||
remark = #{remark,jdbcType=LONGVARBINARY}
|
||||
response = #{response,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_definition_blob
|
||||
(id, request, response, remark)
|
||||
(id, request, response)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.request,jdbcType=LONGVARBINARY}, #{item.response,jdbcType=LONGVARBINARY},
|
||||
#{item.remark,jdbcType=LONGVARBINARY})
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.request,jdbcType=LONGVARBINARY}, #{item.response,jdbcType=LONGVARBINARY}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
@ -251,9 +236,6 @@
|
||||
<if test="'response'.toString() == column.value">
|
||||
#{item.response,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
<if test="'remark'.toString() == column.value">
|
||||
#{item.remark,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
|
@ -21,4 +21,8 @@ public interface ApiDefinitionFollowerMapper {
|
||||
int updateByExampleSelective(@Param("record") ApiDefinitionFollower record, @Param("example") ApiDefinitionFollowerExample example);
|
||||
|
||||
int updateByExample(@Param("record") ApiDefinitionFollower record, @Param("example") ApiDefinitionFollowerExample example);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiDefinitionFollower> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiDefinitionFollower> list, @Param("selective") ApiDefinitionFollower.Column ... selective);
|
||||
}
|
@ -142,4 +142,32 @@
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_definition_follower
|
||||
(api_definition_id, user_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.apiDefinitionId,jdbcType=VARCHAR}, #{item.userId,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_definition_follower (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'api_definition_id'.toString() == column.value">
|
||||
#{item.apiDefinitionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'user_id'.toString() == column.value">
|
||||
#{item.userId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -3,6 +3,20 @@
|
||||
<mapper namespace="io.metersphere.api.mapper.ApiDefinitionMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiDefinition">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
||||
<result column="module_path" jdbcType="VARCHAR" property="modulePath" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="module_id" jdbcType="VARCHAR" property="moduleId" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="tags" jdbcType="VARCHAR" property="tags" />
|
||||
<result column="pos" jdbcType="BIGINT" property="pos" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||
<result column="latest" jdbcType="BIT" property="latest" />
|
||||
<result column="version_id" jdbcType="VARCHAR" property="versionId" />
|
||||
<result column="ref_id" jdbcType="VARCHAR" property="refId" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
@ -10,24 +24,6 @@
|
||||
<result column="delete_user" jdbcType="VARCHAR" property="deleteUser" />
|
||||
<result column="delete_time" jdbcType="BIGINT" property="deleteTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="method" jdbcType="VARCHAR" property="method" />
|
||||
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
||||
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||
<result column="module_path" jdbcType="VARCHAR" property="modulePath" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="module_id" jdbcType="VARCHAR" property="moduleId" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="tags" jdbcType="VARCHAR" property="tags" />
|
||||
<result column="pos" jdbcType="BIGINT" property="pos" />
|
||||
<result column="sync_enable" jdbcType="BIT" property="syncEnable" />
|
||||
<result column="sync_time" jdbcType="BIGINT" property="syncTime" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||
<result column="latest" jdbcType="BIT" property="latest" />
|
||||
<result column="version_id" jdbcType="VARCHAR" property="versionId" />
|
||||
<result column="ref_id" jdbcType="VARCHAR" property="refId" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -88,10 +84,9 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, create_time, create_user, update_time, update_user, delete_user, delete_time,
|
||||
deleted, `name`, `method`, protocol, `path`, module_path, `status`, module_id, num,
|
||||
tags, pos, sync_enable, sync_time, project_id, environment_id, latest, version_id,
|
||||
ref_id, description
|
||||
id, `name`, protocol, module_path, `status`, module_id, 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
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiDefinitionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -124,24 +119,22 @@
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.api.domain.ApiDefinition">
|
||||
insert into api_definition (id, create_time, create_user,
|
||||
update_time, update_user, delete_user,
|
||||
delete_time, deleted, `name`,
|
||||
`method`, protocol, `path`,
|
||||
insert into api_definition (id, `name`, protocol,
|
||||
module_path, `status`, module_id,
|
||||
num, tags, pos, sync_enable,
|
||||
sync_time, project_id, environment_id,
|
||||
latest, version_id, ref_id,
|
||||
description)
|
||||
values (#{id,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR},
|
||||
#{updateTime,jdbcType=BIGINT}, #{updateUser,jdbcType=VARCHAR}, #{deleteUser,jdbcType=VARCHAR},
|
||||
#{deleteTime,jdbcType=BIGINT}, #{deleted,jdbcType=BIT}, #{name,jdbcType=VARCHAR},
|
||||
#{method,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR},
|
||||
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
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR},
|
||||
#{modulePath,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR},
|
||||
#{num,jdbcType=INTEGER}, #{tags,jdbcType=VARCHAR}, #{pos,jdbcType=BIGINT}, #{syncEnable,jdbcType=BIT},
|
||||
#{syncTime,jdbcType=BIGINT}, #{projectId,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR},
|
||||
#{latest,jdbcType=BIT}, #{versionId,jdbcType=VARCHAR}, #{refId,jdbcType=VARCHAR},
|
||||
#{description,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}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiDefinition">
|
||||
insert into api_definition
|
||||
@ -149,6 +142,48 @@
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
protocol,
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
module_path,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
module_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags,
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
pos,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id,
|
||||
</if>
|
||||
<if test="latest != null">
|
||||
latest,
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
version_id,
|
||||
</if>
|
||||
<if test="refId != null">
|
||||
ref_id,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
@ -170,65 +205,53 @@
|
||||
<if test="deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="method != null">
|
||||
`method`,
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
protocol,
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path`,
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
module_path,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
module_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags,
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
pos,
|
||||
</if>
|
||||
<if test="syncEnable != null">
|
||||
sync_enable,
|
||||
</if>
|
||||
<if test="syncTime != null">
|
||||
sync_time,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id,
|
||||
</if>
|
||||
<if test="latest != null">
|
||||
latest,
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
version_id,
|
||||
</if>
|
||||
<if test="refId != null">
|
||||
ref_id,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
#{protocol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
#{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
#{moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
#{tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
#{pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
#{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="latest != null">
|
||||
#{latest,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
#{versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refId != null">
|
||||
#{refId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -250,60 +273,6 @@
|
||||
<if test="deleted != null">
|
||||
#{deleted,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="method != null">
|
||||
#{method,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
#{protocol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
#{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
#{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
#{moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
#{tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
#{pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="syncEnable != null">
|
||||
#{syncEnable,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="syncTime != null">
|
||||
#{syncTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
#{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="latest != null">
|
||||
#{latest,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
#{versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refId != null">
|
||||
#{refId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiDefinitionExample" resultType="java.lang.Long">
|
||||
@ -318,6 +287,48 @@
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.protocol != null">
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.modulePath != null">
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.moduleId != null">
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.tags != null">
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.pos != null">
|
||||
pos = #{record.pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.environmentId != null">
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.latest != null">
|
||||
latest = #{record.latest,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.versionId != null">
|
||||
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.refId != null">
|
||||
ref_id = #{record.refId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -339,60 +350,6 @@
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.method != null">
|
||||
`method` = #{record.method,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.protocol != null">
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.path != null">
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.modulePath != null">
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.moduleId != null">
|
||||
module_id = #{record.moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.tags != null">
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.pos != null">
|
||||
pos = #{record.pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.syncEnable != null">
|
||||
sync_enable = #{record.syncEnable,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.syncTime != null">
|
||||
sync_time = #{record.syncTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.environmentId != null">
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.latest != null">
|
||||
latest = #{record.latest,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.versionId != null">
|
||||
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.refId != null">
|
||||
ref_id = #{record.refId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@ -401,31 +358,27 @@
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update api_definition
|
||||
set id = #{record.id,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},
|
||||
delete_user = #{record.deleteUser,jdbcType=VARCHAR},
|
||||
delete_time = #{record.deleteTime,jdbcType=BIGINT},
|
||||
deleted = #{record.deleted,jdbcType=BIT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
`method` = #{record.method,jdbcType=VARCHAR},
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
`path` = #{record.path,jdbcType=VARCHAR},
|
||||
module_path = #{record.modulePath,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},
|
||||
sync_enable = #{record.syncEnable,jdbcType=BIT},
|
||||
sync_time = #{record.syncTime,jdbcType=BIGINT},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
latest = #{record.latest,jdbcType=BIT},
|
||||
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||
ref_id = #{record.refId,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR}
|
||||
description = #{record.description,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},
|
||||
delete_user = #{record.deleteUser,jdbcType=VARCHAR},
|
||||
delete_time = #{record.deleteTime,jdbcType=BIGINT},
|
||||
deleted = #{record.deleted,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -433,6 +386,48 @@
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiDefinition">
|
||||
update api_definition
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
pos = #{pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="latest != null">
|
||||
latest = #{latest,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
version_id = #{versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refId != null">
|
||||
ref_id = #{refId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -454,109 +449,49 @@
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="method != null">
|
||||
`method` = #{method,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="path != null">
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="modulePath != null">
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="moduleId != null">
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
pos = #{pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="syncEnable != null">
|
||||
sync_enable = #{syncEnable,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="syncTime != null">
|
||||
sync_time = #{syncTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="latest != null">
|
||||
latest = #{latest,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
version_id = #{versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="refId != null">
|
||||
ref_id = #{refId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.api.domain.ApiDefinition">
|
||||
update api_definition
|
||||
set create_time = #{createTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
delete_user = #{deleteUser,jdbcType=VARCHAR},
|
||||
delete_time = #{deleteTime,jdbcType=BIGINT},
|
||||
deleted = #{deleted,jdbcType=BIT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
`method` = #{method,jdbcType=VARCHAR},
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
`path` = #{path,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
module_id = #{moduleId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
pos = #{pos,jdbcType=BIGINT},
|
||||
sync_enable = #{syncEnable,jdbcType=BIT},
|
||||
sync_time = #{syncTime,jdbcType=BIGINT},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
latest = #{latest,jdbcType=BIT},
|
||||
version_id = #{versionId,jdbcType=VARCHAR},
|
||||
ref_id = #{refId,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR}
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
delete_user = #{deleteUser,jdbcType=VARCHAR},
|
||||
delete_time = #{deleteTime,jdbcType=BIGINT},
|
||||
deleted = #{deleted,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_definition
|
||||
(id, create_time, create_user, update_time, update_user, delete_user, delete_time,
|
||||
deleted, `name`, `method`, protocol, `path`, module_path, `status`, module_id,
|
||||
num, tags, pos, sync_enable, sync_time, project_id, environment_id, latest, version_id,
|
||||
ref_id, description)
|
||||
(id, `name`, protocol, module_path, `status`, module_id, 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)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,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.name,jdbcType=VARCHAR},
|
||||
#{item.method,jdbcType=VARCHAR}, #{item.protocol,jdbcType=VARCHAR}, #{item.path,jdbcType=VARCHAR},
|
||||
(#{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.num,jdbcType=INTEGER}, #{item.tags,jdbcType=VARCHAR}, #{item.pos,jdbcType=BIGINT},
|
||||
#{item.syncEnable,jdbcType=BIT}, #{item.syncTime,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.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})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
@ -572,6 +507,48 @@
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'protocol'.toString() == column.value">
|
||||
#{item.protocol,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'module_path'.toString() == column.value">
|
||||
#{item.modulePath,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'status'.toString() == column.value">
|
||||
#{item.status,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'module_id'.toString() == column.value">
|
||||
#{item.moduleId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'num'.toString() == column.value">
|
||||
#{item.num,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'tags'.toString() == column.value">
|
||||
#{item.tags,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'pos'.toString() == column.value">
|
||||
#{item.pos,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'environment_id'.toString() == column.value">
|
||||
#{item.environmentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'latest'.toString() == column.value">
|
||||
#{item.latest,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'version_id'.toString() == column.value">
|
||||
#{item.versionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'ref_id'.toString() == column.value">
|
||||
#{item.refId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'description'.toString() == column.value">
|
||||
#{item.description,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
@ -593,60 +570,6 @@
|
||||
<if test="'deleted'.toString() == column.value">
|
||||
#{item.deleted,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'method'.toString() == column.value">
|
||||
#{item.method,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'protocol'.toString() == column.value">
|
||||
#{item.protocol,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'path'.toString() == column.value">
|
||||
#{item.path,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'module_path'.toString() == column.value">
|
||||
#{item.modulePath,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'status'.toString() == column.value">
|
||||
#{item.status,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'module_id'.toString() == column.value">
|
||||
#{item.moduleId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'num'.toString() == column.value">
|
||||
#{item.num,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'tags'.toString() == column.value">
|
||||
#{item.tags,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'pos'.toString() == column.value">
|
||||
#{item.pos,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'sync_enable'.toString() == column.value">
|
||||
#{item.syncEnable,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'sync_time'.toString() == column.value">
|
||||
#{item.syncTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'environment_id'.toString() == column.value">
|
||||
#{item.environmentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'latest'.toString() == column.value">
|
||||
#{item.latest,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'version_id'.toString() == column.value">
|
||||
#{item.versionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'ref_id'.toString() == column.value">
|
||||
#{item.refId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'description'.toString() == column.value">
|
||||
#{item.description,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
|
@ -31,4 +31,8 @@ public interface ApiDefinitionMockConfigMapper {
|
||||
int updateByPrimaryKeySelective(ApiDefinitionMockConfig record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ApiDefinitionMockConfig record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiDefinitionMockConfig> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiDefinitionMockConfig> list, @Param("selective") ApiDefinitionMockConfig.Column ... selective);
|
||||
}
|
@ -208,4 +208,36 @@
|
||||
response = #{response,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_definition_mock_config
|
||||
(id, request, response)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.request,jdbcType=LONGVARBINARY}, #{item.response,jdbcType=LONGVARBINARY}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_definition_mock_config (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'request'.toString() == column.value">
|
||||
#{item.request,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
<if test="'response'.toString() == column.value">
|
||||
#{item.response,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiDefinitionMockMapper {
|
||||
int updateByPrimaryKeySelective(ApiDefinitionMock record);
|
||||
|
||||
int updateByPrimaryKey(ApiDefinitionMock record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiDefinitionMock> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiDefinitionMock> list, @Param("selective") ApiDefinitionMock.Column ... selective);
|
||||
}
|
@ -318,4 +318,67 @@
|
||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_definition_mock
|
||||
(id, api_path, api_method, create_time, update_time, create_user, `name`, tags, `enable`,
|
||||
expect_num, project_id, api_definition_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.apiPath,jdbcType=VARCHAR}, #{item.apiMethod,jdbcType=VARCHAR},
|
||||
#{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR},
|
||||
#{item.name,jdbcType=VARCHAR}, #{item.tags,jdbcType=VARCHAR}, #{item.enable,jdbcType=BIT},
|
||||
#{item.expectNum,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.apiDefinitionId,jdbcType=VARCHAR}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_definition_mock (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'api_path'.toString() == column.value">
|
||||
#{item.apiPath,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'api_method'.toString() == column.value">
|
||||
#{item.apiMethod,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'tags'.toString() == column.value">
|
||||
#{item.tags,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'enable'.toString() == column.value">
|
||||
#{item.enable,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'expect_num'.toString() == column.value">
|
||||
#{item.expectNum,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'api_definition_id'.toString() == column.value">
|
||||
#{item.apiDefinitionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiDefinitionModuleMapper {
|
||||
int updateByPrimaryKeySelective(ApiDefinitionModule record);
|
||||
|
||||
int updateByPrimaryKey(ApiDefinitionModule record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiDefinitionModule> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiDefinitionModule> list, @Param("selective") ApiDefinitionModule.Column ... selective);
|
||||
}
|
@ -3,16 +3,16 @@
|
||||
<mapper namespace="io.metersphere.api.mapper.ApiDefinitionModuleMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiDefinitionModule">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
||||
<result column="parent_id" jdbcType="VARCHAR" property="parentId" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="level" jdbcType="INTEGER" property="level" />
|
||||
<result column="pos" jdbcType="INTEGER" property="pos" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -73,8 +73,8 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, create_time, update_time, update_user, create_user, `name`, protocol, parent_id,
|
||||
project_id, `level`, pos
|
||||
id, `name`, protocol, parent_id, project_id, `level`, pos, create_time, update_time,
|
||||
update_user, create_user
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiDefinitionModuleExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -107,14 +107,14 @@
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.api.domain.ApiDefinitionModule">
|
||||
insert into api_definition_module (id, create_time, update_time,
|
||||
update_user, create_user, `name`,
|
||||
protocol, parent_id, project_id,
|
||||
`level`, pos)
|
||||
values (#{id,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{updateUser,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
|
||||
#{level,jdbcType=INTEGER}, #{pos,jdbcType=INTEGER})
|
||||
insert into api_definition_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>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiDefinitionModule">
|
||||
insert into api_definition_module
|
||||
@ -122,18 +122,6 @@
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
@ -152,23 +140,23 @@
|
||||
<if test="pos != null">
|
||||
pos,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -187,6 +175,18 @@
|
||||
<if test="pos != null">
|
||||
#{pos,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiDefinitionModuleExample" resultType="java.lang.Long">
|
||||
@ -201,18 +201,6 @@
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -231,6 +219,18 @@
|
||||
<if test="record.pos != null">
|
||||
pos = #{record.pos,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@ -239,16 +239,16 @@
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update api_definition_module
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,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}
|
||||
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}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -256,18 +256,6 @@
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.api.domain.ApiDefinitionModule">
|
||||
update api_definition_module
|
||||
<set>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -286,21 +274,92 @@
|
||||
<if test="pos != null">
|
||||
pos = #{pos,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.api.domain.ApiDefinitionModule">
|
||||
update api_definition_module
|
||||
set create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
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}
|
||||
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>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_definition_module
|
||||
(id, `name`, protocol, parent_id, project_id, `level`, pos, create_time, update_time,
|
||||
update_user, create_user)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{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})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_definition_module (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'protocol'.toString() == column.value">
|
||||
#{item.protocol,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'parent_id'.toString() == column.value">
|
||||
#{item.parentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'level'.toString() == column.value">
|
||||
#{item.level,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'pos'.toString() == column.value">
|
||||
#{item.pos,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_user'.toString() == column.value">
|
||||
#{item.updateUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -33,4 +33,8 @@ public interface ApiDefinitionSwaggerMapper {
|
||||
int updateByPrimaryKeyWithBLOBs(ApiDefinitionSwagger record);
|
||||
|
||||
int updateByPrimaryKey(ApiDefinitionSwagger record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiDefinitionSwagger> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiDefinitionSwagger> list, @Param("selective") ApiDefinitionSwagger.Column ... selective);
|
||||
}
|
@ -301,4 +301,52 @@
|
||||
version_id = #{versionId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_definition_swagger
|
||||
(id, swagger_url, module_id, module_path, `mode`, project_id, version_id, config)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.swaggerUrl,jdbcType=VARCHAR}, #{item.moduleId,jdbcType=VARCHAR},
|
||||
#{item.modulePath,jdbcType=VARCHAR}, #{item.mode,jdbcType=BIT}, #{item.projectId,jdbcType=VARCHAR},
|
||||
#{item.versionId,jdbcType=VARCHAR}, #{item.config,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_definition_swagger (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'swagger_url'.toString() == column.value">
|
||||
#{item.swaggerUrl,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'module_id'.toString() == column.value">
|
||||
#{item.moduleId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'module_path'.toString() == column.value">
|
||||
#{item.modulePath,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'mode'.toString() == column.value">
|
||||
#{item.mode,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'version_id'.toString() == column.value">
|
||||
#{item.versionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'config'.toString() == column.value">
|
||||
#{item.config,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiEnvironmentConfigMapper {
|
||||
int updateByPrimaryKeySelective(ApiEnvironmentConfig record);
|
||||
|
||||
int updateByPrimaryKey(ApiEnvironmentConfig record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiEnvironmentConfig> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiEnvironmentConfig> list, @Param("selective") ApiEnvironmentConfig.Column ... selective);
|
||||
}
|
@ -208,4 +208,42 @@
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_environment_config
|
||||
(id, create_time, update_time, create_user, environment_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT},
|
||||
#{item.createUser,jdbcType=VARCHAR}, #{item.environmentId,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_environment_config (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'environment_id'.toString() == column.value">
|
||||
#{item.environmentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -31,4 +31,8 @@ public interface ApiReportBlobMapper {
|
||||
int updateByPrimaryKeySelective(ApiReportBlob record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ApiReportBlob record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiReportBlob> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiReportBlob> list, @Param("selective") ApiReportBlob.Column ... selective);
|
||||
}
|
@ -223,4 +223,39 @@
|
||||
console = #{console,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_report_blob
|
||||
(id, content, config, console)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.content,jdbcType=LONGVARBINARY}, #{item.config,jdbcType=LONGVARBINARY},
|
||||
#{item.console,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_report_blob (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'content'.toString() == column.value">
|
||||
#{item.content,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
<if test="'config'.toString() == column.value">
|
||||
#{item.config,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
<if test="'console'.toString() == column.value">
|
||||
#{item.console,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiReportMapper {
|
||||
int updateByPrimaryKeySelective(ApiReport record);
|
||||
|
||||
int updateByPrimaryKey(ApiReport record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiReport> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiReport> list, @Param("selective") ApiReport.Column ... selective);
|
||||
}
|
@ -415,4 +415,88 @@
|
||||
integrated = #{integrated,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_report
|
||||
(id, `name`, resource_id, create_time, update_time, create_user, update_user, deleted,
|
||||
`status`, start_time, end_time, run_mode, pool_id, trigger_mode, version_id, project_id,
|
||||
integrated_report_id, integrated)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.resourceId,jdbcType=VARCHAR},
|
||||
#{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR},
|
||||
#{item.updateUser,jdbcType=VARCHAR}, #{item.deleted,jdbcType=BIT}, #{item.status,jdbcType=VARCHAR},
|
||||
#{item.startTime,jdbcType=BIGINT}, #{item.endTime,jdbcType=BIGINT}, #{item.runMode,jdbcType=VARCHAR},
|
||||
#{item.poolId,jdbcType=VARCHAR}, #{item.triggerMode,jdbcType=VARCHAR}, #{item.versionId,jdbcType=VARCHAR},
|
||||
#{item.projectId,jdbcType=VARCHAR}, #{item.integratedReportId,jdbcType=VARCHAR},
|
||||
#{item.integrated,jdbcType=BIT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_report (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'resource_id'.toString() == column.value">
|
||||
#{item.resourceId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'update_user'.toString() == column.value">
|
||||
#{item.updateUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'deleted'.toString() == column.value">
|
||||
#{item.deleted,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'status'.toString() == column.value">
|
||||
#{item.status,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'start_time'.toString() == column.value">
|
||||
#{item.startTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'end_time'.toString() == column.value">
|
||||
#{item.endTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'run_mode'.toString() == column.value">
|
||||
#{item.runMode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'pool_id'.toString() == column.value">
|
||||
#{item.poolId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'trigger_mode'.toString() == column.value">
|
||||
#{item.triggerMode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'version_id'.toString() == column.value">
|
||||
#{item.versionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'integrated_report_id'.toString() == column.value">
|
||||
#{item.integratedReportId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'integrated'.toString() == column.value">
|
||||
#{item.integrated,jdbcType=BIT}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -31,4 +31,8 @@ public interface ApiScenarioBlobMapper {
|
||||
int updateByPrimaryKeySelective(ApiScenarioBlob record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ApiScenarioBlob record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenarioBlob> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenarioBlob> list, @Param("selective") ApiScenarioBlob.Column ... selective);
|
||||
}
|
@ -191,4 +191,32 @@
|
||||
set content = #{content,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario_blob
|
||||
(id, content)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.content,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario_blob (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'content'.toString() == column.value">
|
||||
#{item.content,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiScenarioEnvironmentMapper {
|
||||
int updateByPrimaryKeySelective(ApiScenarioEnvironment record);
|
||||
|
||||
int updateByPrimaryKey(ApiScenarioEnvironment record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenarioEnvironment> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenarioEnvironment> list, @Param("selective") ApiScenarioEnvironment.Column ... selective);
|
||||
}
|
@ -208,4 +208,43 @@
|
||||
environment_group_id = #{environmentGroupId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario_environment
|
||||
(id, api_scenario_id, project_id, environment_id, environment_group_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.apiScenarioId,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR},
|
||||
#{item.environmentId,jdbcType=VARCHAR}, #{item.environmentGroupId,jdbcType=VARCHAR}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario_environment (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'api_scenario_id'.toString() == column.value">
|
||||
#{item.apiScenarioId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'environment_id'.toString() == column.value">
|
||||
#{item.environmentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'environment_group_id'.toString() == column.value">
|
||||
#{item.environmentGroupId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -21,4 +21,8 @@ public interface ApiScenarioFollowerMapper {
|
||||
int updateByExampleSelective(@Param("record") ApiScenarioFollower record, @Param("example") ApiScenarioFollowerExample example);
|
||||
|
||||
int updateByExample(@Param("record") ApiScenarioFollower record, @Param("example") ApiScenarioFollowerExample example);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenarioFollower> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenarioFollower> list, @Param("selective") ApiScenarioFollower.Column ... selective);
|
||||
}
|
@ -142,4 +142,32 @@
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario_follower
|
||||
(api_scenario_id, user_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.apiScenarioId,jdbcType=VARCHAR}, #{item.userId,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario_follower (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'api_scenario_id'.toString() == column.value">
|
||||
#{item.apiScenarioId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'user_id'.toString() == column.value">
|
||||
#{item.userId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiScenarioMapper {
|
||||
int updateByPrimaryKeySelective(ApiScenario record);
|
||||
|
||||
int updateByPrimaryKey(ApiScenario record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenario> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenario> list, @Param("selective") ApiScenario.Column ... selective);
|
||||
}
|
@ -4,18 +4,13 @@
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiScenario">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="delete_time" jdbcType="BIGINT" property="deleteTime" />
|
||||
<result column="delete_user" jdbcType="VARCHAR" property="deleteUser" />
|
||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
<result column="level" jdbcType="VARCHAR" property="level" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="principal" jdbcType="VARCHAR" property="principal" />
|
||||
<result column="step_total" jdbcType="INTEGER" property="stepTotal" />
|
||||
<result column="pass_rate" jdbcType="BIGINT" property="passRate" />
|
||||
<result column="report_status" jdbcType="VARCHAR" property="reportStatus" />
|
||||
<result column="last_report_status" jdbcType="VARCHAR" property="lastReportStatus" />
|
||||
<result column="last_report_id" jdbcType="VARCHAR" property="lastReportId" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="custom_num" jdbcType="VARCHAR" property="customNum" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
@ -25,11 +20,16 @@
|
||||
<result column="latest" jdbcType="BIT" property="latest" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="api_scenario_module_id" jdbcType="VARCHAR" property="apiScenarioModuleId" />
|
||||
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="module_path" jdbcType="VARCHAR" property="modulePath" />
|
||||
<result column="tags" jdbcType="VARCHAR" property="tags" />
|
||||
<result column="grouped" jdbcType="BIT" property="grouped" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="delete_time" jdbcType="BIGINT" property="deleteTime" />
|
||||
<result column="delete_user" jdbcType="VARCHAR" property="deleteUser" />
|
||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -90,10 +90,10 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, create_user, create_time, delete_time, delete_user, update_user, update_time,
|
||||
`level`, `status`, principal, step_total, pass_rate, report_status, num, custom_num,
|
||||
deleted, pos, version_id, ref_id, latest, project_id, api_scenario_module_id, report_id,
|
||||
description, module_path, tags, grouped
|
||||
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
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiScenarioExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -126,26 +126,26 @@
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.api.domain.ApiScenario">
|
||||
insert into api_scenario (id, `name`, create_user,
|
||||
create_time, delete_time, delete_user,
|
||||
update_user, update_time, `level`,
|
||||
insert into api_scenario (id, `name`, `level`,
|
||||
`status`, principal, step_total,
|
||||
pass_rate, report_status, num,
|
||||
custom_num, deleted, pos,
|
||||
version_id, ref_id, latest,
|
||||
project_id, api_scenario_module_id, report_id,
|
||||
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)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{deleteTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR},
|
||||
#{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}, #{level,jdbcType=VARCHAR},
|
||||
grouped, create_user, create_time,
|
||||
delete_time, delete_user, update_user,
|
||||
update_time)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR}, #{stepTotal,jdbcType=INTEGER},
|
||||
#{passRate,jdbcType=BIGINT}, #{reportStatus,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
|
||||
#{customNum,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT}, #{pos,jdbcType=BIGINT},
|
||||
#{versionId,jdbcType=VARCHAR}, #{refId,jdbcType=VARCHAR}, #{latest,jdbcType=BIT},
|
||||
#{projectId,jdbcType=VARCHAR}, #{apiScenarioModuleId,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
|
||||
#{passRate,jdbcType=BIGINT}, #{lastReportStatus,jdbcType=VARCHAR}, #{lastReportId,jdbcType=VARCHAR},
|
||||
#{num,jdbcType=INTEGER}, #{customNum,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT},
|
||||
#{pos,jdbcType=BIGINT}, #{versionId,jdbcType=VARCHAR}, #{refId,jdbcType=VARCHAR},
|
||||
#{latest,jdbcType=BIT}, #{projectId,jdbcType=VARCHAR}, #{apiScenarioModuleId,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{tags,jdbcType=VARCHAR},
|
||||
#{grouped,jdbcType=BIT})
|
||||
#{grouped,jdbcType=BIT}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{deleteTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR},
|
||||
#{updateTime,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiScenario">
|
||||
insert into api_scenario
|
||||
@ -156,24 +156,6 @@
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="deleteTime != null">
|
||||
delete_time,
|
||||
</if>
|
||||
<if test="deleteUser != null">
|
||||
delete_user,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="level != null">
|
||||
`level`,
|
||||
</if>
|
||||
@ -189,8 +171,11 @@
|
||||
<if test="passRate != null">
|
||||
pass_rate,
|
||||
</if>
|
||||
<if test="reportStatus != null">
|
||||
report_status,
|
||||
<if test="lastReportStatus != null">
|
||||
last_report_status,
|
||||
</if>
|
||||
<if test="lastReportId != null">
|
||||
last_report_id,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
@ -219,9 +204,6 @@
|
||||
<if test="apiScenarioModuleId != null">
|
||||
api_scenario_module_id,
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
report_id,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
@ -234,6 +216,24 @@
|
||||
<if test="grouped != null">
|
||||
grouped,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="deleteTime != null">
|
||||
delete_time,
|
||||
</if>
|
||||
<if test="deleteUser != null">
|
||||
delete_user,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@ -242,24 +242,6 @@
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteTime != null">
|
||||
#{deleteTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteUser != null">
|
||||
#{deleteUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="level != null">
|
||||
#{level,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -275,8 +257,11 @@
|
||||
<if test="passRate != null">
|
||||
#{passRate,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="reportStatus != null">
|
||||
#{reportStatus,jdbcType=VARCHAR},
|
||||
<if test="lastReportStatus != null">
|
||||
#{lastReportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastReportId != null">
|
||||
#{lastReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
@ -305,9 +290,6 @@
|
||||
<if test="apiScenarioModuleId != null">
|
||||
#{apiScenarioModuleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
#{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -320,6 +302,24 @@
|
||||
<if test="grouped != null">
|
||||
#{grouped,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteTime != null">
|
||||
#{deleteTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteUser != null">
|
||||
#{deleteUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiScenarioExample" resultType="java.lang.Long">
|
||||
@ -337,24 +337,6 @@
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.deleteTime != null">
|
||||
delete_time = #{record.deleteTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.deleteUser != null">
|
||||
delete_user = #{record.deleteUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.level != null">
|
||||
`level` = #{record.level,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -370,8 +352,11 @@
|
||||
<if test="record.passRate != null">
|
||||
pass_rate = #{record.passRate,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.reportStatus != null">
|
||||
report_status = #{record.reportStatus,jdbcType=VARCHAR},
|
||||
<if test="record.lastReportStatus != null">
|
||||
last_report_status = #{record.lastReportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.lastReportId != null">
|
||||
last_report_id = #{record.lastReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
@ -400,9 +385,6 @@
|
||||
<if test="record.apiScenarioModuleId != null">
|
||||
api_scenario_module_id = #{record.apiScenarioModuleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.reportId != null">
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -415,6 +397,24 @@
|
||||
<if test="record.grouped != null">
|
||||
grouped = #{record.grouped,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.deleteTime != null">
|
||||
delete_time = #{record.deleteTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.deleteUser != null">
|
||||
delete_user = #{record.deleteUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@ -424,18 +424,13 @@
|
||||
update api_scenario
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
delete_time = #{record.deleteTime,jdbcType=BIGINT},
|
||||
delete_user = #{record.deleteUser,jdbcType=VARCHAR},
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
`level` = #{record.level,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
principal = #{record.principal,jdbcType=VARCHAR},
|
||||
step_total = #{record.stepTotal,jdbcType=INTEGER},
|
||||
pass_rate = #{record.passRate,jdbcType=BIGINT},
|
||||
report_status = #{record.reportStatus,jdbcType=VARCHAR},
|
||||
last_report_status = #{record.lastReportStatus,jdbcType=VARCHAR},
|
||||
last_report_id = #{record.lastReportId,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
custom_num = #{record.customNum,jdbcType=VARCHAR},
|
||||
deleted = #{record.deleted,jdbcType=BIT},
|
||||
@ -445,11 +440,16 @@
|
||||
latest = #{record.latest,jdbcType=BIT},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
api_scenario_module_id = #{record.apiScenarioModuleId,jdbcType=VARCHAR},
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
grouped = #{record.grouped,jdbcType=BIT}
|
||||
grouped = #{record.grouped,jdbcType=BIT},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
delete_time = #{record.deleteTime,jdbcType=BIGINT},
|
||||
delete_user = #{record.deleteUser,jdbcType=VARCHAR},
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -460,24 +460,6 @@
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteTime != null">
|
||||
delete_time = #{deleteTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteUser != null">
|
||||
delete_user = #{deleteUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="level != null">
|
||||
`level` = #{level,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -493,8 +475,11 @@
|
||||
<if test="passRate != null">
|
||||
pass_rate = #{passRate,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="reportStatus != null">
|
||||
report_status = #{reportStatus,jdbcType=VARCHAR},
|
||||
<if test="lastReportStatus != null">
|
||||
last_report_status = #{lastReportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastReportId != null">
|
||||
last_report_id = #{lastReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
@ -523,9 +508,6 @@
|
||||
<if test="apiScenarioModuleId != null">
|
||||
api_scenario_module_id = #{apiScenarioModuleId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="reportId != null">
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@ -538,24 +520,37 @@
|
||||
<if test="grouped != null">
|
||||
grouped = #{grouped,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteTime != null">
|
||||
delete_time = #{deleteTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteUser != null">
|
||||
delete_user = #{deleteUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.api.domain.ApiScenario">
|
||||
update api_scenario
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
delete_time = #{deleteTime,jdbcType=BIGINT},
|
||||
delete_user = #{deleteUser,jdbcType=VARCHAR},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
`level` = #{level,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
principal = #{principal,jdbcType=VARCHAR},
|
||||
step_total = #{stepTotal,jdbcType=INTEGER},
|
||||
pass_rate = #{passRate,jdbcType=BIGINT},
|
||||
report_status = #{reportStatus,jdbcType=VARCHAR},
|
||||
last_report_status = #{lastReportStatus,jdbcType=VARCHAR},
|
||||
last_report_id = #{lastReportId,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
custom_num = #{customNum,jdbcType=VARCHAR},
|
||||
deleted = #{deleted,jdbcType=BIT},
|
||||
@ -565,11 +560,134 @@
|
||||
latest = #{latest,jdbcType=BIT},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
api_scenario_module_id = #{apiScenarioModuleId,jdbcType=VARCHAR},
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
grouped = #{grouped,jdbcType=BIT}
|
||||
grouped = #{grouped,jdbcType=BIT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
delete_time = #{deleteTime,jdbcType=BIGINT},
|
||||
delete_user = #{deleteUser,jdbcType=VARCHAR},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario
|
||||
(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)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.level,jdbcType=VARCHAR},
|
||||
#{item.status,jdbcType=VARCHAR}, #{item.principal,jdbcType=VARCHAR}, #{item.stepTotal,jdbcType=INTEGER},
|
||||
#{item.passRate,jdbcType=BIGINT}, #{item.lastReportStatus,jdbcType=VARCHAR}, #{item.lastReportId,jdbcType=VARCHAR},
|
||||
#{item.num,jdbcType=INTEGER}, #{item.customNum,jdbcType=VARCHAR}, #{item.deleted,jdbcType=BIT},
|
||||
#{item.pos,jdbcType=BIGINT}, #{item.versionId,jdbcType=VARCHAR}, #{item.refId,jdbcType=VARCHAR},
|
||||
#{item.latest,jdbcType=BIT}, #{item.projectId,jdbcType=VARCHAR}, #{item.apiScenarioModuleId,jdbcType=VARCHAR},
|
||||
#{item.description,jdbcType=VARCHAR}, #{item.modulePath,jdbcType=VARCHAR}, #{item.tags,jdbcType=VARCHAR},
|
||||
#{item.grouped,jdbcType=BIT}, #{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
||||
#{item.deleteTime,jdbcType=BIGINT}, #{item.deleteUser,jdbcType=VARCHAR}, #{item.updateUser,jdbcType=VARCHAR},
|
||||
#{item.updateTime,jdbcType=BIGINT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'level'.toString() == column.value">
|
||||
#{item.level,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'status'.toString() == column.value">
|
||||
#{item.status,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'principal'.toString() == column.value">
|
||||
#{item.principal,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'step_total'.toString() == column.value">
|
||||
#{item.stepTotal,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'pass_rate'.toString() == column.value">
|
||||
#{item.passRate,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'last_report_status'.toString() == column.value">
|
||||
#{item.lastReportStatus,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'last_report_id'.toString() == column.value">
|
||||
#{item.lastReportId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'num'.toString() == column.value">
|
||||
#{item.num,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'custom_num'.toString() == column.value">
|
||||
#{item.customNum,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'deleted'.toString() == column.value">
|
||||
#{item.deleted,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'pos'.toString() == column.value">
|
||||
#{item.pos,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'version_id'.toString() == column.value">
|
||||
#{item.versionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'ref_id'.toString() == column.value">
|
||||
#{item.refId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'latest'.toString() == column.value">
|
||||
#{item.latest,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'api_scenario_module_id'.toString() == column.value">
|
||||
#{item.apiScenarioModuleId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'description'.toString() == column.value">
|
||||
#{item.description,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'module_path'.toString() == column.value">
|
||||
#{item.modulePath,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'tags'.toString() == column.value">
|
||||
#{item.tags,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'grouped'.toString() == column.value">
|
||||
#{item.grouped,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'delete_time'.toString() == column.value">
|
||||
#{item.deleteTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'delete_user'.toString() == column.value">
|
||||
#{item.deleteUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'update_user'.toString() == column.value">
|
||||
#{item.updateUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiScenarioModuleMapper {
|
||||
int updateByPrimaryKeySelective(ApiScenarioModule record);
|
||||
|
||||
int updateByPrimaryKey(ApiScenarioModule record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenarioModule> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenarioModule> list, @Param("selective") ApiScenarioModule.Column ... selective);
|
||||
}
|
@ -288,4 +288,60 @@
|
||||
parent_id = #{parentId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario_module
|
||||
(id, `name`, `level`, pos, create_time, update_time, update_user, create_user, project_id,
|
||||
parent_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,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}, #{item.projectId,jdbcType=VARCHAR},
|
||||
#{item.parentId,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario_module (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'level'.toString() == column.value">
|
||||
#{item.level,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'pos'.toString() == column.value">
|
||||
#{item.pos,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_user'.toString() == column.value">
|
||||
#{item.updateUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'parent_id'.toString() == column.value">
|
||||
#{item.parentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiScenarioReferenceMapper {
|
||||
int updateByPrimaryKeySelective(ApiScenarioReference record);
|
||||
|
||||
int updateByPrimaryKey(ApiScenarioReference record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenarioReference> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenarioReference> list, @Param("selective") ApiScenarioReference.Column ... selective);
|
||||
}
|
@ -240,4 +240,50 @@
|
||||
data_type = #{dataType,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario_reference
|
||||
(id, api_scenario_id, create_time, create_user, reference_id, reference_type, data_type
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.apiScenarioId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
||||
#{item.createUser,jdbcType=VARCHAR}, #{item.referenceId,jdbcType=VARCHAR}, #{item.referenceType,jdbcType=VARCHAR},
|
||||
#{item.dataType,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario_reference (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'api_scenario_id'.toString() == column.value">
|
||||
#{item.apiScenarioId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'reference_id'.toString() == column.value">
|
||||
#{item.referenceId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'reference_type'.toString() == column.value">
|
||||
#{item.referenceType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'data_type'.toString() == column.value">
|
||||
#{item.dataType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -33,4 +33,8 @@ public interface ApiScenarioReportDetailMapper {
|
||||
int updateByPrimaryKeyWithBLOBs(ApiScenarioReportDetail record);
|
||||
|
||||
int updateByPrimaryKey(ApiScenarioReportDetail record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenarioReportDetail> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenarioReportDetail> list, @Param("selective") ApiScenarioReportDetail.Column ... selective);
|
||||
}
|
@ -428,4 +428,78 @@
|
||||
code = #{code,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario_report_detail
|
||||
(id, report_id, resource_id, start_time, `status`, request_time, assertions_total,
|
||||
pass_assertions_total, fake_code, request_name, environment_id, project_id, error_total,
|
||||
code, content)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.reportId,jdbcType=VARCHAR}, #{item.resourceId,jdbcType=VARCHAR},
|
||||
#{item.startTime,jdbcType=BIGINT}, #{item.status,jdbcType=VARCHAR}, #{item.requestTime,jdbcType=BIGINT},
|
||||
#{item.assertionsTotal,jdbcType=BIGINT}, #{item.passAssertionsTotal,jdbcType=BIGINT},
|
||||
#{item.fakeCode,jdbcType=VARCHAR}, #{item.requestName,jdbcType=VARCHAR}, #{item.environmentId,jdbcType=VARCHAR},
|
||||
#{item.projectId,jdbcType=VARCHAR}, #{item.errorTotal,jdbcType=INTEGER}, #{item.code,jdbcType=VARCHAR},
|
||||
#{item.content,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario_report_detail (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'report_id'.toString() == column.value">
|
||||
#{item.reportId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'resource_id'.toString() == column.value">
|
||||
#{item.resourceId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'start_time'.toString() == column.value">
|
||||
#{item.startTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'status'.toString() == column.value">
|
||||
#{item.status,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'request_time'.toString() == column.value">
|
||||
#{item.requestTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'assertions_total'.toString() == column.value">
|
||||
#{item.assertionsTotal,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'pass_assertions_total'.toString() == column.value">
|
||||
#{item.passAssertionsTotal,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'fake_code'.toString() == column.value">
|
||||
#{item.fakeCode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'request_name'.toString() == column.value">
|
||||
#{item.requestName,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'environment_id'.toString() == column.value">
|
||||
#{item.environmentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'error_total'.toString() == column.value">
|
||||
#{item.errorTotal,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'code'.toString() == column.value">
|
||||
#{item.code,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'content'.toString() == column.value">
|
||||
#{item.content,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -31,4 +31,8 @@ public interface ApiScenarioReportLogMapper {
|
||||
int updateByPrimaryKeySelective(ApiScenarioReportLog record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ApiScenarioReportLog record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenarioReportLog> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenarioReportLog> list, @Param("selective") ApiScenarioReportLog.Column ... selective);
|
||||
}
|
@ -191,4 +191,32 @@
|
||||
set console = #{console,jdbcType=LONGVARBINARY}
|
||||
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario_report_log
|
||||
(report_id, console)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.reportId,jdbcType=VARCHAR}, #{item.console,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario_report_log (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'report_id'.toString() == column.value">
|
||||
#{item.reportId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'console'.toString() == column.value">
|
||||
#{item.console,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiScenarioReportMapper {
|
||||
int updateByPrimaryKeySelective(ApiScenarioReport record);
|
||||
|
||||
int updateByPrimaryKey(ApiScenarioReport record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenarioReport> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenarioReport> list, @Param("selective") ApiScenarioReport.Column ... selective);
|
||||
}
|
@ -415,4 +415,88 @@
|
||||
scenario_id = #{scenarioId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario_report
|
||||
(id, `name`, create_time, create_user, delete_time, delete_user, deleted, update_user,
|
||||
update_time, pass_rate, `status`, trigger_mode, run_mode, pool_id, version_id,
|
||||
integrated, project_id, scenario_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
||||
#{item.createUser,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=BIGINT}, #{item.deleteUser,jdbcType=VARCHAR},
|
||||
#{item.deleted,jdbcType=BIT}, #{item.updateUser,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=BIGINT},
|
||||
#{item.passRate,jdbcType=BIGINT}, #{item.status,jdbcType=VARCHAR}, #{item.triggerMode,jdbcType=VARCHAR},
|
||||
#{item.runMode,jdbcType=VARCHAR}, #{item.poolId,jdbcType=VARCHAR}, #{item.versionId,jdbcType=VARCHAR},
|
||||
#{item.integrated,jdbcType=BIT}, #{item.projectId,jdbcType=VARCHAR}, #{item.scenarioId,jdbcType=VARCHAR}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario_report (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'delete_time'.toString() == column.value">
|
||||
#{item.deleteTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'delete_user'.toString() == column.value">
|
||||
#{item.deleteUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'deleted'.toString() == column.value">
|
||||
#{item.deleted,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'update_user'.toString() == column.value">
|
||||
#{item.updateUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'pass_rate'.toString() == column.value">
|
||||
#{item.passRate,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'status'.toString() == column.value">
|
||||
#{item.status,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'trigger_mode'.toString() == column.value">
|
||||
#{item.triggerMode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'run_mode'.toString() == column.value">
|
||||
#{item.runMode,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'pool_id'.toString() == column.value">
|
||||
#{item.poolId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'version_id'.toString() == column.value">
|
||||
#{item.versionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'integrated'.toString() == column.value">
|
||||
#{item.integrated,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'scenario_id'.toString() == column.value">
|
||||
#{item.scenarioId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -31,4 +31,8 @@ public interface ApiScenarioReportStructureMapper {
|
||||
int updateByPrimaryKeySelective(ApiScenarioReportStructure record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ApiScenarioReportStructure record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiScenarioReportStructure> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiScenarioReportStructure> list, @Param("selective") ApiScenarioReportStructure.Column ... selective);
|
||||
}
|
@ -191,4 +191,32 @@
|
||||
set resource_tree = #{resourceTree,jdbcType=LONGVARBINARY}
|
||||
where report_id = #{reportId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_scenario_report_structure
|
||||
(report_id, resource_tree)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.reportId,jdbcType=VARCHAR}, #{item.resourceTree,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_scenario_report_structure (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'report_id'.toString() == column.value">
|
||||
#{item.reportId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'resource_tree'.toString() == column.value">
|
||||
#{item.resourceTree,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -33,4 +33,8 @@ public interface ApiSyncConfigMapper {
|
||||
int updateByPrimaryKeyWithBLOBs(ApiSyncConfig record);
|
||||
|
||||
int updateByPrimaryKey(ApiSyncConfig record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiSyncConfig> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiSyncConfig> list, @Param("selective") ApiSyncConfig.Column ... selective);
|
||||
}
|
@ -321,4 +321,57 @@
|
||||
notice_enable = #{noticeEnable,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_sync_config
|
||||
(id, resource_id, resource_type, hide, notify_case_creator, notify_scenario_creator,
|
||||
sync_enable, notice_enable, rule_config)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.resourceId,jdbcType=VARCHAR}, #{item.resourceType,jdbcType=VARCHAR},
|
||||
#{item.hide,jdbcType=BIT}, #{item.notifyCaseCreator,jdbcType=BIT}, #{item.notifyScenarioCreator,jdbcType=BIT},
|
||||
#{item.syncEnable,jdbcType=BIT}, #{item.noticeEnable,jdbcType=BIT}, #{item.ruleConfig,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_sync_config (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'resource_id'.toString() == column.value">
|
||||
#{item.resourceId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'resource_type'.toString() == column.value">
|
||||
#{item.resourceType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'hide'.toString() == column.value">
|
||||
#{item.hide,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'notify_case_creator'.toString() == column.value">
|
||||
#{item.notifyCaseCreator,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'notify_scenario_creator'.toString() == column.value">
|
||||
#{item.notifyScenarioCreator,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'sync_enable'.toString() == column.value">
|
||||
#{item.syncEnable,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'notice_enable'.toString() == column.value">
|
||||
#{item.noticeEnable,jdbcType=BIT}
|
||||
</if>
|
||||
<if test="'rule_config'.toString() == column.value">
|
||||
#{item.ruleConfig,jdbcType=LONGVARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -31,4 +31,8 @@ public interface ApiTestCaseBlobMapper {
|
||||
int updateByPrimaryKeySelective(ApiTestCaseBlob record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ApiTestCaseBlob record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiTestCaseBlob> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiTestCaseBlob> list, @Param("selective") ApiTestCaseBlob.Column ... selective);
|
||||
}
|
@ -191,4 +191,32 @@
|
||||
set request = #{request,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_test_case_blob
|
||||
(id, request)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.request,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_test_case_blob (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'request'.toString() == column.value">
|
||||
#{item.request,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -21,4 +21,8 @@ public interface ApiTestCaseFollowerMapper {
|
||||
int updateByExampleSelective(@Param("record") ApiTestCaseFollower record, @Param("example") ApiTestCaseFollowerExample example);
|
||||
|
||||
int updateByExample(@Param("record") ApiTestCaseFollower record, @Param("example") ApiTestCaseFollowerExample example);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiTestCaseFollower> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiTestCaseFollower> list, @Param("selective") ApiTestCaseFollower.Column ... selective);
|
||||
}
|
@ -142,4 +142,32 @@
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_test_case_follower
|
||||
(case_id, user_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.caseId,jdbcType=VARCHAR}, #{item.userId,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_test_case_follower (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'case_id'.toString() == column.value">
|
||||
#{item.caseId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'user_id'.toString() == column.value">
|
||||
#{item.userId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface ApiTestCaseMapper {
|
||||
int updateByPrimaryKeySelective(ApiTestCase record);
|
||||
|
||||
int updateByPrimaryKey(ApiTestCase record);
|
||||
|
||||
int batchInsert(@Param("list") List<ApiTestCase> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ApiTestCase> list, @Param("selective") ApiTestCase.Column ... selective);
|
||||
}
|
@ -4,6 +4,18 @@
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.api.domain.ApiTestCase">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="priority" jdbcType="VARCHAR" property="priority" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="tags" jdbcType="VARCHAR" property="tags" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="last_report_status" jdbcType="VARCHAR" property="lastReportStatus" />
|
||||
<result column="last_report_id" jdbcType="VARCHAR" property="lastReportId" />
|
||||
<result column="pos" jdbcType="BIGINT" property="pos" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="api_definition_id" jdbcType="VARCHAR" property="apiDefinitionId" />
|
||||
<result column="version_id" jdbcType="VARCHAR" property="versionId" />
|
||||
<result column="principal" jdbcType="VARCHAR" property="principal" />
|
||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
@ -11,20 +23,6 @@
|
||||
<result column="delete_time" jdbcType="BIGINT" property="deleteTime" />
|
||||
<result column="delete_user" jdbcType="VARCHAR" property="deleteUser" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="priority" jdbcType="VARCHAR" property="priority" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="tags" jdbcType="VARCHAR" property="tags" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="api_report_status" jdbcType="VARCHAR" property="apiReportStatus" />
|
||||
<result column="api_report_id" jdbcType="VARCHAR" property="apiReportId" />
|
||||
<result column="pos" jdbcType="BIGINT" property="pos" />
|
||||
<result column="sync_enable" jdbcType="BIT" property="syncEnable" />
|
||||
<result column="sync_time" jdbcType="BIGINT" property="syncTime" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="api_definition_id" jdbcType="VARCHAR" property="apiDefinitionId" />
|
||||
<result column="version_id" jdbcType="VARCHAR" property="versionId" />
|
||||
<result column="principal" jdbcType="VARCHAR" property="principal" />
|
||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -85,9 +83,9 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, create_time, create_user, update_time, update_user, delete_time, delete_user,
|
||||
deleted, priority, num, tags, `status`, api_report_status, api_report_id, pos, sync_enable,
|
||||
sync_time, project_id, api_definition_id, version_id, principal, environment_id
|
||||
id, `name`, priority, num, tags, `status`, last_report_status, last_report_id, pos,
|
||||
project_id, api_definition_id, version_id, principal, environment_id, create_time,
|
||||
create_user, update_time, update_user, delete_time, delete_user, deleted
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.api.domain.ApiTestCaseExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -120,22 +118,22 @@
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.api.domain.ApiTestCase">
|
||||
insert into api_test_case (id, `name`, create_time,
|
||||
create_user, update_time, update_user,
|
||||
delete_time, delete_user, deleted,
|
||||
priority, num, tags,
|
||||
`status`, api_report_status, api_report_id,
|
||||
pos, sync_enable, sync_time,
|
||||
insert into api_test_case (id, `name`, priority,
|
||||
num, tags, `status`,
|
||||
last_report_status, last_report_id, pos,
|
||||
project_id, api_definition_id, version_id,
|
||||
principal, environment_id)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{createUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}, #{updateUser,jdbcType=VARCHAR},
|
||||
#{deleteTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT},
|
||||
#{priority,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, #{tags,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{apiReportStatus,jdbcType=VARCHAR}, #{apiReportId,jdbcType=VARCHAR},
|
||||
#{pos,jdbcType=BIGINT}, #{syncEnable,jdbcType=BIT}, #{syncTime,jdbcType=BIGINT},
|
||||
principal, environment_id, create_time,
|
||||
create_user, update_time, update_user,
|
||||
delete_time, delete_user, deleted
|
||||
)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{priority,jdbcType=VARCHAR},
|
||||
#{num,jdbcType=INTEGER}, #{tags,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{lastReportStatus,jdbcType=VARCHAR}, #{lastReportId,jdbcType=VARCHAR}, #{pos,jdbcType=BIGINT},
|
||||
#{projectId,jdbcType=VARCHAR}, #{apiDefinitionId,jdbcType=VARCHAR}, #{versionId,jdbcType=VARCHAR},
|
||||
#{principal,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR})
|
||||
#{principal,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{createUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT}, #{updateUser,jdbcType=VARCHAR},
|
||||
#{deleteTime,jdbcType=BIGINT}, #{deleteUser,jdbcType=VARCHAR}, #{deleted,jdbcType=BIT}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.api.domain.ApiTestCase">
|
||||
insert into api_test_case
|
||||
@ -146,6 +144,42 @@
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="priority != null">
|
||||
priority,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="lastReportStatus != null">
|
||||
last_report_status,
|
||||
</if>
|
||||
<if test="lastReportId != null">
|
||||
last_report_id,
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
pos,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="apiDefinitionId != null">
|
||||
api_definition_id,
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
version_id,
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
principal,
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
@ -167,48 +201,6 @@
|
||||
<if test="deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
<if test="priority != null">
|
||||
priority,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="apiReportStatus != null">
|
||||
api_report_status,
|
||||
</if>
|
||||
<if test="apiReportId != null">
|
||||
api_report_id,
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
pos,
|
||||
</if>
|
||||
<if test="syncEnable != null">
|
||||
sync_enable,
|
||||
</if>
|
||||
<if test="syncTime != null">
|
||||
sync_time,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="apiDefinitionId != null">
|
||||
api_definition_id,
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
version_id,
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
principal,
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@ -217,6 +209,42 @@
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="priority != null">
|
||||
#{priority,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
#{tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastReportStatus != null">
|
||||
#{lastReportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastReportId != null">
|
||||
#{lastReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
#{pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiDefinitionId != null">
|
||||
#{apiDefinitionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
#{versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
#{principal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
#{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -238,48 +266,6 @@
|
||||
<if test="deleted != null">
|
||||
#{deleted,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="priority != null">
|
||||
#{priority,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
#{tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiReportStatus != null">
|
||||
#{apiReportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiReportId != null">
|
||||
#{apiReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
#{pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="syncEnable != null">
|
||||
#{syncEnable,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="syncTime != null">
|
||||
#{syncTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiDefinitionId != null">
|
||||
#{apiDefinitionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
#{versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
#{principal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
#{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.api.domain.ApiTestCaseExample" resultType="java.lang.Long">
|
||||
@ -297,6 +283,42 @@
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.priority != null">
|
||||
priority = #{record.priority,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.tags != null">
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.lastReportStatus != null">
|
||||
last_report_status = #{record.lastReportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.lastReportId != null">
|
||||
last_report_id = #{record.lastReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.pos != null">
|
||||
pos = #{record.pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.apiDefinitionId != null">
|
||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.versionId != null">
|
||||
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.principal != null">
|
||||
principal = #{record.principal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.environmentId != null">
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -318,48 +340,6 @@
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.priority != null">
|
||||
priority = #{record.priority,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.tags != null">
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.apiReportStatus != null">
|
||||
api_report_status = #{record.apiReportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.apiReportId != null">
|
||||
api_report_id = #{record.apiReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.pos != null">
|
||||
pos = #{record.pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.syncEnable != null">
|
||||
sync_enable = #{record.syncEnable,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.syncTime != null">
|
||||
sync_time = #{record.syncTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.apiDefinitionId != null">
|
||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.versionId != null">
|
||||
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.principal != null">
|
||||
principal = #{record.principal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.environmentId != null">
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@ -369,27 +349,25 @@
|
||||
update api_test_case
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
priority = #{record.priority,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
last_report_status = #{record.lastReportStatus,jdbcType=VARCHAR},
|
||||
last_report_id = #{record.lastReportId,jdbcType=VARCHAR},
|
||||
pos = #{record.pos,jdbcType=BIGINT},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||
principal = #{record.principal,jdbcType=VARCHAR},
|
||||
environment_id = #{record.environmentId,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},
|
||||
delete_time = #{record.deleteTime,jdbcType=BIGINT},
|
||||
delete_user = #{record.deleteUser,jdbcType=VARCHAR},
|
||||
deleted = #{record.deleted,jdbcType=BIT},
|
||||
priority = #{record.priority,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
tags = #{record.tags,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
api_report_status = #{record.apiReportStatus,jdbcType=VARCHAR},
|
||||
api_report_id = #{record.apiReportId,jdbcType=VARCHAR},
|
||||
pos = #{record.pos,jdbcType=BIGINT},
|
||||
sync_enable = #{record.syncEnable,jdbcType=BIT},
|
||||
sync_time = #{record.syncTime,jdbcType=BIGINT},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||
version_id = #{record.versionId,jdbcType=VARCHAR},
|
||||
principal = #{record.principal,jdbcType=VARCHAR},
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR}
|
||||
deleted = #{record.deleted,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -400,6 +378,42 @@
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="priority != null">
|
||||
priority = #{priority,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastReportStatus != null">
|
||||
last_report_status = #{lastReportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lastReportId != null">
|
||||
last_report_id = #{lastReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
pos = #{pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiDefinitionId != null">
|
||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
version_id = #{versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
principal = #{principal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -421,75 +435,125 @@
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="priority != null">
|
||||
priority = #{priority,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiReportStatus != null">
|
||||
api_report_status = #{apiReportStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiReportId != null">
|
||||
api_report_id = #{apiReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pos != null">
|
||||
pos = #{pos,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="syncEnable != null">
|
||||
sync_enable = #{syncEnable,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="syncTime != null">
|
||||
sync_time = #{syncTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="apiDefinitionId != null">
|
||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="versionId != null">
|
||||
version_id = #{versionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
principal = #{principal,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environmentId != null">
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.api.domain.ApiTestCase">
|
||||
update api_test_case
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
priority = #{priority,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
last_report_status = #{lastReportStatus,jdbcType=VARCHAR},
|
||||
last_report_id = #{lastReportId,jdbcType=VARCHAR},
|
||||
pos = #{pos,jdbcType=BIGINT},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||
version_id = #{versionId,jdbcType=VARCHAR},
|
||||
principal = #{principal,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
delete_time = #{deleteTime,jdbcType=BIGINT},
|
||||
delete_user = #{deleteUser,jdbcType=VARCHAR},
|
||||
deleted = #{deleted,jdbcType=BIT},
|
||||
priority = #{priority,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
tags = #{tags,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
api_report_status = #{apiReportStatus,jdbcType=VARCHAR},
|
||||
api_report_id = #{apiReportId,jdbcType=VARCHAR},
|
||||
pos = #{pos,jdbcType=BIGINT},
|
||||
sync_enable = #{syncEnable,jdbcType=BIT},
|
||||
sync_time = #{syncTime,jdbcType=BIGINT},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||
version_id = #{versionId,jdbcType=VARCHAR},
|
||||
principal = #{principal,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR}
|
||||
deleted = #{deleted,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into api_test_case
|
||||
(id, `name`, priority, num, tags, `status`, last_report_status, last_report_id, pos,
|
||||
project_id, api_definition_id, version_id, principal, environment_id, create_time,
|
||||
create_user, update_time, update_user, delete_time, delete_user, deleted)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.priority,jdbcType=VARCHAR},
|
||||
#{item.num,jdbcType=INTEGER}, #{item.tags,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR},
|
||||
#{item.lastReportStatus,jdbcType=VARCHAR}, #{item.lastReportId,jdbcType=VARCHAR},
|
||||
#{item.pos,jdbcType=BIGINT}, #{item.projectId,jdbcType=VARCHAR}, #{item.apiDefinitionId,jdbcType=VARCHAR},
|
||||
#{item.versionId,jdbcType=VARCHAR}, #{item.principal,jdbcType=VARCHAR}, #{item.environmentId,jdbcType=VARCHAR},
|
||||
#{item.createTime,jdbcType=BIGINT}, #{item.createUser,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=BIGINT},
|
||||
#{item.updateUser,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=BIGINT}, #{item.deleteUser,jdbcType=VARCHAR},
|
||||
#{item.deleted,jdbcType=BIT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into api_test_case (
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.escapedColumnName}
|
||||
</foreach>
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
<if test="'id'.toString() == column.value">
|
||||
#{item.id,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'priority'.toString() == column.value">
|
||||
#{item.priority,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'num'.toString() == column.value">
|
||||
#{item.num,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="'tags'.toString() == column.value">
|
||||
#{item.tags,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'status'.toString() == column.value">
|
||||
#{item.status,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'last_report_status'.toString() == column.value">
|
||||
#{item.lastReportStatus,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'last_report_id'.toString() == column.value">
|
||||
#{item.lastReportId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'pos'.toString() == column.value">
|
||||
#{item.pos,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'api_definition_id'.toString() == column.value">
|
||||
#{item.apiDefinitionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'version_id'.toString() == column.value">
|
||||
#{item.versionId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'principal'.toString() == column.value">
|
||||
#{item.principal,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'environment_id'.toString() == column.value">
|
||||
#{item.environmentId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'create_user'.toString() == column.value">
|
||||
#{item.createUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_user'.toString() == column.value">
|
||||
#{item.updateUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'delete_time'.toString() == column.value">
|
||||
#{item.deleteTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'delete_user'.toString() == column.value">
|
||||
#{item.deleteUser,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'deleted'.toString() == column.value">
|
||||
#{item.deleted,jdbcType=BIT}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -1,63 +1,474 @@
|
||||
-- set innodb lock wait timeout
|
||||
SET SESSION innodb_lock_wait_timeout = 7200;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS api_definition(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口pk' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '修改时间' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
||||
`delete_user` VARCHAR(50) COMMENT '删除人' ,
|
||||
`delete_time` BIGINT COMMENT '删除时间' ,
|
||||
`deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '删除状态' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '接口名称' ,
|
||||
`method` VARCHAR(50) NOT NULL COMMENT '接口类型' ,
|
||||
`protocol` VARCHAR(20) NOT NULL COMMENT '接口协议' ,
|
||||
`path` VARCHAR(255) DEFAULT '' COMMENT '接口路径-只有HTTP协议有值' ,
|
||||
`module_path` VARCHAR(1000) COMMENT '模块全路径-用于导入处理' ,
|
||||
`status` VARCHAR(50) NOT NULL COMMENT '接口状态/进行中/已完成' ,
|
||||
`module_id` VARCHAR(50) DEFAULT 'NONE' COMMENT '模块fk' ,
|
||||
`num` INT COMMENT '自定义id' ,
|
||||
`tags` VARCHAR(1000) COMMENT '标签' ,
|
||||
`pos` BIGINT NOT NULL COMMENT '自定义排序' ,
|
||||
`sync_enable` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否启用同步' ,
|
||||
`sync_time` BIGINT COMMENT '同步开始时间' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`environment_id` VARCHAR(50) COMMENT '环境fk' ,
|
||||
`latest` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否为最新版本 0:否,1:是' ,
|
||||
`version_id` VARCHAR(50) COMMENT '版本fk' ,
|
||||
`ref_id` VARCHAR(50) COMMENT '版本引用fk' ,
|
||||
`description` VARCHAR(500) COMMENT '描述' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口定义';
|
||||
DROP TABLE IF EXISTS api_definition;
|
||||
CREATE TABLE api_definition(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口pk' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '接口名称' ,
|
||||
`protocol` VARCHAR(20) NOT NULL COMMENT '接口协议' ,
|
||||
`module_path` VARCHAR(1000) COMMENT '模块全路径-用于导入处理' ,
|
||||
`status` VARCHAR(50) NOT NULL COMMENT '接口状态/进行中/已完成' ,
|
||||
`module_id` VARCHAR(50) DEFAULT 'NONE' COMMENT '模块fk' ,
|
||||
`num` INT COMMENT '自定义id' ,
|
||||
`tags` VARCHAR(500) COMMENT '标签' ,
|
||||
`pos` BIGINT NOT NULL COMMENT '自定义排序' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`environment_id` VARCHAR(50) COMMENT '环境fk' ,
|
||||
`latest` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否为最新版本 0:否,1:是' ,
|
||||
`version_id` VARCHAR(50) COMMENT '版本fk' ,
|
||||
`ref_id` VARCHAR(50) COMMENT '版本引用fk' ,
|
||||
`description` VARCHAR(500) COMMENT '描述' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '修改时间' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
||||
`delete_user` VARCHAR(50) COMMENT '删除人' ,
|
||||
`delete_time` BIGINT COMMENT '删除时间' ,
|
||||
`deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '删除状态' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口定义';
|
||||
|
||||
|
||||
CREATE INDEX idx_project_id ON api_definition(project_id);
|
||||
CREATE INDEX idx_module_id ON api_definition(module_id);
|
||||
CREATE INDEX idx_ref_id ON api_definition(ref_id);
|
||||
CREATE INDEX idx_version_id ON api_definition(version_id);
|
||||
CREATE INDEX idx_method ON api_definition(method);
|
||||
CREATE INDEX idx_status ON api_definition(status);
|
||||
CREATE INDEX idx_pos ON api_definition(pos);
|
||||
CREATE INDEX idx_protocol ON api_definition(protocol);
|
||||
CREATE INDEX idx_create_time ON api_definition(create_time);
|
||||
CREATE INDEX idx_create_user ON api_definition(create_user);
|
||||
CREATE INDEX idx_name ON api_definition(name);
|
||||
CREATE INDEX idx_path ON api_definition(path);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS api_definition_blob(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口fk/ 一对一关系' ,
|
||||
`request` LONGBLOB COMMENT '请求内容' ,
|
||||
`response` LONGBLOB COMMENT '响应内容' ,
|
||||
`remark` BLOB COMMENT '备注' ,
|
||||
PRIMARY KEY (id)
|
||||
DROP TABLE IF EXISTS api_environment_config;
|
||||
CREATE TABLE api_environment_config(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '修改时间' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '用户fk' ,
|
||||
`environment_id` VARCHAR(50) NOT NULL COMMENT '环境fk' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口定义详情内容';
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口定义公共部分环境-建议干掉这个功能';
|
||||
|
||||
DROP TABLE IF EXISTS api_report;
|
||||
CREATE TABLE api_report(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口结果报告pk' ,
|
||||
`name` VARCHAR(200) NOT NULL COMMENT '接口报告名称' ,
|
||||
`resource_id` VARCHAR(50) NOT NULL COMMENT '资源fk/api_definition_id/api_test_case_id' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '修改时间' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人fk' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
||||
`deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '删除状态' ,
|
||||
`status` VARCHAR(50) NOT NULL DEFAULT 'Pending' COMMENT '结果状态' ,
|
||||
`start_time` BIGINT COMMENT '接口开始执行时间' ,
|
||||
`end_time` BIGINT COMMENT '接口执行结束时间' ,
|
||||
`run_mode` VARCHAR(20) NOT NULL COMMENT '执行模块/API/CASE/API_PLAN' ,
|
||||
`pool_id` VARCHAR(50) NOT NULL COMMENT '资源池fk' ,
|
||||
`trigger_mode` VARCHAR(50) NOT NULL COMMENT '触发模式/手动/批量/定时任务/JENKINS' ,
|
||||
`version_id` VARCHAR(50) COMMENT '版本fk' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`integrated_report_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '集成报告id/api_scenario_report_id' ,
|
||||
`integrated` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否为集成报告,默认否' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = 'API/CASE执行结果';
|
||||
|
||||
|
||||
CREATE INDEX idx_integrated ON api_report(integrated);
|
||||
CREATE INDEX idx_update_time ON api_report(update_time);
|
||||
CREATE INDEX idx_project_id ON api_report(project_id);
|
||||
CREATE INDEX idx_resource_id ON api_report(resource_id);
|
||||
CREATE INDEX idx_status ON api_report(status);
|
||||
CREATE INDEX idx_create_user ON api_report(create_user);
|
||||
|
||||
DROP TABLE IF EXISTS api_definition_follower;
|
||||
CREATE TABLE api_definition_follower(
|
||||
`api_definition_id` VARCHAR(50) NOT NULL COMMENT '接口fk' ,
|
||||
`user_id` VARCHAR(50) NOT NULL COMMENT '关注人/用户fk' ,
|
||||
PRIMARY KEY (api_definition_id,user_id)
|
||||
)ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口定义关注人';
|
||||
|
||||
DROP TABLE IF EXISTS api_definition_module;
|
||||
CREATE TABLE api_definition_module(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口模块pk' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '模块名称' ,
|
||||
`protocol` VARCHAR(64) NOT NULL COMMENT '协议' ,
|
||||
`parent_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '父级fk' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`level` INT NOT NULL DEFAULT 1 COMMENT '树节点级别' ,
|
||||
`pos` INT NOT NULL COMMENT '排序' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '修改时间' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口模块';
|
||||
|
||||
|
||||
CREATE INDEX idx_project_id ON api_definition_module(project_id);
|
||||
CREATE INDEX idx_protocol ON api_definition_module(protocol);
|
||||
CREATE INDEX idx_pos ON api_definition_module(pos);
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario;
|
||||
CREATE TABLE api_scenario(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '场景名称' ,
|
||||
`level` VARCHAR(10) NOT NULL COMMENT '场景级别/P0/P1等' ,
|
||||
`status` VARCHAR(20) NOT NULL COMMENT '场景状态/未规划/已完成 等' ,
|
||||
`principal` VARCHAR(50) NOT NULL COMMENT '责任人/用户fk' ,
|
||||
`step_total` INT NOT NULL DEFAULT 0 COMMENT '场景步骤总数' ,
|
||||
`pass_rate` BIGINT NOT NULL DEFAULT 0 COMMENT '通过率' ,
|
||||
`last_report_status` VARCHAR(50) COMMENT '最后一次执行的结果状态' ,
|
||||
`last_report_id` VARCHAR(50) COMMENT '最后一次执行的报告fk' ,
|
||||
`num` INT COMMENT '编号' ,
|
||||
`custom_num` VARCHAR(50) COMMENT '自定义id' ,
|
||||
`deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '删除状态' ,
|
||||
`pos` BIGINT NOT NULL COMMENT '自定义排序' ,
|
||||
`version_id` VARCHAR(50) COMMENT '版本fk' ,
|
||||
`ref_id` VARCHAR(50) COMMENT '引用资源fk' ,
|
||||
`latest` BIT(1) DEFAULT 0 COMMENT '是否为最新版本 0:否,1:是' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`api_scenario_module_id` VARCHAR(50) COMMENT '场景模块fk' ,
|
||||
`description` VARCHAR(500) COMMENT '描述信息' ,
|
||||
`module_path` VARCHAR(1000) COMMENT '模块全路径/用于导入模块创建' ,
|
||||
`tags` VARCHAR(1000) COMMENT '标签' ,
|
||||
`grouped` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否为环境组' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`delete_time` BIGINT COMMENT '删除时间' ,
|
||||
`delete_user` VARCHAR(50) COMMENT '删除人' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '更新人' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '场景';
|
||||
|
||||
|
||||
CREATE INDEX idx_api_scenario_module_id ON api_scenario(api_scenario_module_id);
|
||||
CREATE INDEX idx_ref_id ON api_scenario(ref_id);
|
||||
CREATE INDEX idx_version_id ON api_scenario(version_id);
|
||||
CREATE INDEX idx_project_id ON api_scenario(project_id);
|
||||
CREATE INDEX idx_status ON api_scenario(status);
|
||||
CREATE INDEX idx_report_status ON api_scenario(last_report_status);
|
||||
CREATE INDEX idx_create_time ON api_scenario(create_time);
|
||||
CREATE INDEX idx_update_time ON api_scenario(update_time);
|
||||
CREATE INDEX idx_create_user ON api_scenario(create_user);
|
||||
CREATE INDEX idx_num ON api_scenario(num);
|
||||
CREATE INDEX idx_level ON api_scenario(level);
|
||||
CREATE INDEX idx_name ON api_scenario(name);
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario_follower;
|
||||
CREATE TABLE api_scenario_follower(
|
||||
`api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' ,
|
||||
`user_id` VARCHAR(50) NOT NULL COMMENT '关注人/用户fk' ,
|
||||
PRIMARY KEY (api_scenario_id,user_id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '关注记录';
|
||||
|
||||
|
||||
CREATE INDEX uk_api_scenario_id_follow_id ON api_scenario_follower(api_scenario_id,user_id);
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario_module;
|
||||
CREATE TABLE api_scenario_module(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '场景模块pk' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '模块名称' ,
|
||||
`level` INT NOT NULL DEFAULT 1 COMMENT '模块级别' ,
|
||||
`pos` INT NOT NULL COMMENT '排序' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '更新人' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`parent_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '父级fk' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '场景模块';
|
||||
|
||||
|
||||
CREATE INDEX idx_project_id ON api_scenario_module(project_id);
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario_reference;
|
||||
CREATE TABLE api_scenario_reference(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '引用关系pk' ,
|
||||
`api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`reference_id` VARCHAR(50) NOT NULL COMMENT '引用步骤fk' ,
|
||||
`reference_type` VARCHAR(20) COMMENT '引用步骤类型/REF/COPY' ,
|
||||
`data_type` VARCHAR(20) COMMENT '步骤类型/CASE/API' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '场景步骤引用CASE关系记录';
|
||||
|
||||
|
||||
CREATE INDEX idx_api_scenario_id ON api_scenario_reference(api_scenario_id);
|
||||
CREATE INDEX idx_reference_id ON api_scenario_reference(reference_id);
|
||||
CREATE INDEX idx_create_user ON api_scenario_reference(create_user);
|
||||
CREATE INDEX idx_reference_type ON api_scenario_reference(reference_type);
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario_report;
|
||||
CREATE TABLE api_scenario_report(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '场景报告pk' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '报告名称' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`delete_time` BIGINT COMMENT '删除时间' ,
|
||||
`delete_user` VARCHAR(50) COMMENT '删除人' ,
|
||||
`deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '删除标识' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
|
||||
`pass_rate` BIGINT COMMENT '通过率' ,
|
||||
`status` VARCHAR(20) NOT NULL DEFAULT 'Pending' COMMENT '报告状态/SUCCESS/ERROR' ,
|
||||
`trigger_mode` VARCHAR(20) NOT NULL COMMENT '触发方式' ,
|
||||
`run_mode` VARCHAR(20) NOT NULL COMMENT '执行模式' ,
|
||||
`pool_id` VARCHAR(50) NOT NULL COMMENT '资源池' ,
|
||||
`version_id` VARCHAR(50) COMMENT '版本fk' ,
|
||||
`integrated` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否是集成报告' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '场景报告';
|
||||
|
||||
|
||||
CREATE INDEX idx_project_id ON api_scenario_report(project_id);
|
||||
CREATE INDEX idx_scenario_id ON api_scenario_report(scenario_id);
|
||||
CREATE INDEX idx_trigger_mode ON api_scenario_report(trigger_mode);
|
||||
CREATE INDEX idx_run_mode ON api_scenario_report(run_mode);
|
||||
CREATE INDEX idx_status ON api_scenario_report(status);
|
||||
CREATE INDEX idx_update_time ON api_scenario_report(update_time);
|
||||
CREATE INDEX idx_create_user ON api_scenario_report(create_user);
|
||||
CREATE INDEX idx_name ON api_scenario_report(name);
|
||||
CREATE INDEX idx_pool_id ON api_scenario_report(pool_id);
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario_report_detail;
|
||||
CREATE TABLE api_scenario_report_detail(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
|
||||
`report_id` VARCHAR(50) NOT NULL COMMENT '报告fk' ,
|
||||
`resource_id` VARCHAR(50) NOT NULL COMMENT '场景中各个步骤请求唯一标识' ,
|
||||
`start_time` BIGINT COMMENT '开始时间' ,
|
||||
`status` VARCHAR(20) COMMENT '结果状态' ,
|
||||
`request_time` BIGINT COMMENT '单个请求步骤时间' ,
|
||||
`assertions_total` BIGINT COMMENT '总断言数' ,
|
||||
`pass_assertions_total` BIGINT COMMENT '失败断言数' ,
|
||||
`fake_code` VARCHAR(200) COMMENT '误报编号' ,
|
||||
`request_name` VARCHAR(500) COMMENT '请求名称' ,
|
||||
`environment_id` VARCHAR(50) COMMENT '环境fk' ,
|
||||
`project_id` VARCHAR(50) COMMENT '项目fk' ,
|
||||
`error_total` INT COMMENT '失败总数' ,
|
||||
`code` VARCHAR(500) COMMENT '请求响应码' ,
|
||||
`content` LONGBLOB COMMENT '执行结果' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '场景报告步骤结果';
|
||||
|
||||
|
||||
CREATE INDEX idx_report_id ON api_scenario_report_detail(report_id);
|
||||
CREATE INDEX idx_resource_id ON api_scenario_report_detail(resource_id);
|
||||
CREATE INDEX idx_project_id ON api_scenario_report_detail(project_id);
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario_report_structure;
|
||||
CREATE TABLE api_scenario_report_structure(
|
||||
`report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' ,
|
||||
`resource_tree` LONGBLOB COMMENT '资源步骤结构树' ,
|
||||
PRIMARY KEY (report_id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '场景报告结构';
|
||||
|
||||
DROP TABLE IF EXISTS api_sync_config;
|
||||
CREATE TABLE api_sync_config(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '' ,
|
||||
`resource_id` VARCHAR(50) NOT NULL COMMENT 'API/CASE 来源fk' ,
|
||||
`resource_type` VARCHAR(50) NOT NULL COMMENT '来源类型/API/CASE' ,
|
||||
`hide` BIT(1) DEFAULT 0 COMMENT '是否隐藏' ,
|
||||
`rule_config` LONGTEXT COMMENT '同步规则' ,
|
||||
`notify_case_creator` BIT(1) NOT NULL DEFAULT 1 COMMENT '是否通知用例创建人' ,
|
||||
`notify_scenario_creator` BIT(1) NOT NULL DEFAULT 1 COMMENT '是否通知场景创建人' ,
|
||||
`sync_enable` BIT(1) NOT NULL DEFAULT 0 COMMENT '是否同步用例' ,
|
||||
`notice_enable` BIT(1) DEFAULT 0 COMMENT '是否发送通知' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口同步用例配置';
|
||||
|
||||
|
||||
CREATE INDEX idx_resource_id ON api_sync_config(resource_id);
|
||||
|
||||
DROP TABLE IF EXISTS api_test_case;
|
||||
CREATE TABLE api_test_case(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口用例pk' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '接口用例名称' ,
|
||||
`priority` VARCHAR(50) NOT NULL COMMENT '用例等级' ,
|
||||
`num` INT COMMENT '接口用例编号id' ,
|
||||
`tags` VARCHAR(1000) COMMENT '标签' ,
|
||||
`status` VARCHAR(20) NOT NULL COMMENT '用例状态' ,
|
||||
`last_report_status` VARCHAR(20) COMMENT '最新执行结果状态' ,
|
||||
`last_report_id` VARCHAR(50) COMMENT '最后执行结果报告fk' ,
|
||||
`pos` BIGINT NOT NULL COMMENT '自定义排序' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`api_definition_id` VARCHAR(50) NOT NULL COMMENT '接口fk' ,
|
||||
`version_id` VARCHAR(50) COMMENT '版本fk' ,
|
||||
`principal` VARCHAR(50) NOT NULL COMMENT '责任人' ,
|
||||
`environment_id` VARCHAR(50) COMMENT '环境fk' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '更新人' ,
|
||||
`delete_time` BIGINT COMMENT '删除时间' ,
|
||||
`delete_user` VARCHAR(50) COMMENT '删除人' ,
|
||||
`deleted` BIT(1) NOT NULL DEFAULT 0 COMMENT '删除标识' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口用例';
|
||||
|
||||
|
||||
CREATE INDEX idx_api_definition_id ON api_test_case(api_definition_id);
|
||||
CREATE INDEX idx_project_id ON api_test_case(project_id);
|
||||
CREATE INDEX idx_version_id ON api_test_case(version_id);
|
||||
CREATE INDEX idx_principal ON api_test_case(principal);
|
||||
CREATE INDEX idx_priority ON api_test_case(priority);
|
||||
CREATE INDEX idx_create_time ON api_test_case(create_time);
|
||||
CREATE INDEX idx_update_time ON api_test_case(update_time);
|
||||
CREATE INDEX idx_create_user ON api_test_case(create_user);
|
||||
CREATE INDEX idx_name ON api_test_case(name);
|
||||
|
||||
DROP TABLE IF EXISTS api_test_case_follower;
|
||||
CREATE TABLE api_test_case_follower(
|
||||
`case_id` VARCHAR(50) NOT NULL COMMENT '用例fk' ,
|
||||
`user_id` VARCHAR(50) NOT NULL COMMENT '关注人/用户fk' ,
|
||||
PRIMARY KEY (case_id,user_id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口用例关注人';
|
||||
|
||||
DROP TABLE IF EXISTS api_definition_mock;
|
||||
CREATE TABLE api_definition_mock(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'mock pk' ,
|
||||
`api_path` VARCHAR(500) COMMENT '接口路径' ,
|
||||
`api_method` VARCHAR(50) COMMENT '接口类型' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '修改时间' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`name` VARCHAR(200) NOT NULL COMMENT 'mock 名称' ,
|
||||
`tags` VARCHAR(500) COMMENT '自定义标签' ,
|
||||
`enable` BIT(1) NOT NULL DEFAULT 1 COMMENT '启用/禁用' ,
|
||||
`expect_num` VARCHAR(50) NOT NULL COMMENT 'mock编号' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`api_definition_id` VARCHAR(50) NOT NULL COMMENT '接口fk' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = 'mock 配置-暂留';
|
||||
|
||||
|
||||
CREATE INDEX idx_api_definition_id ON api_definition_mock(api_definition_id);
|
||||
CREATE INDEX idx_project_id ON api_definition_mock(project_id);
|
||||
|
||||
DROP TABLE IF EXISTS api_definition_mock_config;
|
||||
CREATE TABLE api_definition_mock_config(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口mock pk' ,
|
||||
`request` LONGBLOB COMMENT '请求内容' ,
|
||||
`response` LONGBLOB COMMENT '响应内容' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = 'mock期望值配置-暂留';
|
||||
|
||||
DROP TABLE IF EXISTS api_definition_swagger;
|
||||
CREATE TABLE api_definition_swagger(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '主键' ,
|
||||
`swagger_url` VARCHAR(500) NOT NULL COMMENT 'url地址' ,
|
||||
`module_id` VARCHAR(50) COMMENT '模块fk' ,
|
||||
`module_path` VARCHAR(1000) COMMENT '模块路径' ,
|
||||
`config` BLOB COMMENT '鉴权配置信息' ,
|
||||
`mode` BIT(1) DEFAULT 0 COMMENT '导入模式/覆盖/不覆盖' ,
|
||||
`project_id` VARCHAR(50) COMMENT '项目fk' ,
|
||||
`version_id` VARCHAR(50) COMMENT '导入版本' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '定时同步配置';
|
||||
|
||||
|
||||
CREATE INDEX idx_project_id ON api_definition_swagger(project_id);
|
||||
|
||||
DROP TABLE IF EXISTS api_definition_blob;
|
||||
CREATE TABLE api_definition_blob(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口fk/ 一对一关系' ,
|
||||
`request` LONGBLOB COMMENT '请求内容' ,
|
||||
`response` LONGBLOB COMMENT '响应内容' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口定义详情内容';
|
||||
|
||||
DROP TABLE IF EXISTS api_report_blob;
|
||||
CREATE TABLE api_report_blob(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口报告fk' ,
|
||||
`content` LONGBLOB COMMENT '结果内容详情' ,
|
||||
`config` BLOB COMMENT '执行环境配置' ,
|
||||
`console` BLOB COMMENT '执行过程日志' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = 'API/CASE执行结果详情';
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario_blob;
|
||||
CREATE TABLE api_scenario_blob(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '场景pk' ,
|
||||
`content` LONGBLOB COMMENT '场景步骤内容' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '场景步骤详情';
|
||||
|
||||
DROP TABLE IF EXISTS api_test_case_blob;
|
||||
CREATE TABLE api_test_case_blob(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '接口用例pk' ,
|
||||
`request` LONGBLOB COMMENT '请求内容' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '接口用例详情';
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario_report_log;
|
||||
CREATE TABLE api_scenario_report_log(
|
||||
`report_id` VARCHAR(50) NOT NULL COMMENT '请求资源 id' ,
|
||||
`console` LONGBLOB COMMENT '执行日志' ,
|
||||
PRIMARY KEY (report_id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '场景报告过程日志';
|
||||
|
||||
DROP TABLE IF EXISTS api_scenario_environment;
|
||||
CREATE TABLE api_scenario_environment(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '场景环境pk' ,
|
||||
`api_scenario_id` VARCHAR(50) NOT NULL COMMENT '场景fk' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目fk' ,
|
||||
`environment_id` VARCHAR(50) COMMENT '环境fk' ,
|
||||
`environment_group_id` VARCHAR(50) COMMENT '环境组fk' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '场景环境';
|
||||
|
||||
|
||||
CREATE INDEX idx_api_scenario_id ON api_scenario_environment(api_scenario_id);
|
||||
CREATE INDEX idx_project_id ON api_scenario_environment(project_id);
|
||||
CREATE INDEX idx_environment_id ON api_scenario_environment(environment_id);
|
||||
|
||||
-- set innodb lock wait timeout to default
|
||||
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
@ -30,14 +30,6 @@ public class APIDefinitionService {
|
||||
if (StringUtils.isNotBlank(request.getName())) {
|
||||
criteria.andNameLike("%" + request.getName() + "%");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(request.getPath())) {
|
||||
criteria.andPathEqualTo(request.getPath());
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(request.getMethod())) {
|
||||
criteria.andMethodEqualTo(request.getMethod());
|
||||
}
|
||||
if (StringUtils.isNotBlank(request.getProtocol())) {
|
||||
criteria.andProtocolEqualTo(request.getProtocol());
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
|
||||
<generatorConfiguration>
|
||||
<!--配置数据库连接的位置-->
|
||||
<properties url="file:///opt/metersphere/conf/metersphere.properties"/>
|
||||
<properties url="file:///opt/metersphere/conf/metersphere-v3.properties"/>
|
||||
<!-- 设置mysql驱动路径 -->
|
||||
<!--<classPathEntry location="/Users/liuruibin/.m2/repository/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar"/>-->
|
||||
<!-- 此处指定生成针对MyBatis3的DAO -->
|
||||
@ -72,28 +72,28 @@
|
||||
<!--要生成的数据库表 -->
|
||||
<table tableName="api_definition"/>
|
||||
<table tableName="api_definition_blob"/>
|
||||
<table tableName="api_definition_module"/>
|
||||
<table tableName="api_environment_config"/>
|
||||
<table tableName="api_definition_follower"/>
|
||||
<table tableName="api_definition_mock"/>
|
||||
<table tableName="api_definition_mock_config"/>
|
||||
<table tableName="api_definition_module"/>
|
||||
<table tableName="api_definition_swagger"/>
|
||||
<table tableName="api_environment_config"/>
|
||||
<table tableName="api_report"/>
|
||||
<table tableName="api_report_blob"/>
|
||||
<table tableName="api_definition_follower"/>
|
||||
<table tableName="api_test_case"/>
|
||||
<table tableName="api_test_case_blob"/>
|
||||
<table tableName="api_test_case_follower"/>
|
||||
<table tableName="api_scenario"/>
|
||||
<table tableName="api_scenario_environment"/>
|
||||
<table tableName="api_scenario_blob"/>
|
||||
<table tableName="api_scenario_environment"/>
|
||||
<table tableName="api_scenario_follower"/>
|
||||
<table tableName="api_scenario_module"/>
|
||||
<table tableName="api_scenario_reference"/>
|
||||
<table tableName="api_scenario_report"/>
|
||||
<table tableName="api_scenario_report_detail"/>
|
||||
<table tableName="api_scenario_report_structure"/>
|
||||
<table tableName="api_scenario_report_log"/>
|
||||
<table tableName="api_scenario_report_structure"/>
|
||||
<table tableName="api_sync_config"/>
|
||||
<table tableName="api_test_case"/>
|
||||
<table tableName="api_test_case_blob"/>
|
||||
<table tableName="api_test_case_follower"/>
|
||||
|
||||
</context>
|
||||
</generatorConfiguration>
|
||||
|
@ -61,12 +61,9 @@ public class ApiDefinitionControllerTests {
|
||||
request.setUpdateTime(System.currentTimeMillis());
|
||||
request.setProjectId("test-project-id");
|
||||
request.setName("test-api-name");
|
||||
request.setMethod("test-api-method");
|
||||
request.setPath("test-api-path");
|
||||
request.setProtocol("test-api-protocol");
|
||||
request.setPos(1l);
|
||||
request.setLatest(true);
|
||||
request.setSyncEnable(true);
|
||||
request.setStatus("test-api-status");
|
||||
request.setVersionId("test-api-version");
|
||||
request.setDeleted(false);
|
||||
@ -95,12 +92,9 @@ public class ApiDefinitionControllerTests {
|
||||
request.setUpdateTime(System.currentTimeMillis());
|
||||
request.setProjectId("test-project-id");
|
||||
request.setName("test-api-name");
|
||||
request.setMethod("test-api-method");
|
||||
request.setPath("test-api-path");
|
||||
request.setProtocol("test-api-protocol");
|
||||
request.setPos(1l);
|
||||
request.setLatest(true);
|
||||
request.setSyncEnable(true);
|
||||
request.setStatus("test-api-status");
|
||||
request.setVersionId("test-api-version");
|
||||
request.setDeleted(false);
|
||||
|
Loading…
Reference in New Issue
Block a user