mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-29 18:48:13 +08:00
refactor: 环境管理domain
This commit is contained in:
parent
7e2015a13e
commit
cac7df5543
@ -1,11 +1,16 @@
|
||||
package io.metersphere.sdk.domain;
|
||||
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.metersphere.validation.groups.Created;
|
||||
import io.metersphere.validation.groups.Updated;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Data
|
||||
public class Environment implements Serializable {
|
||||
@Schema(description = "环境ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ -23,38 +28,94 @@ public class Environment implements Serializable {
|
||||
@Size(min = 1, max = 50, message = "{environment.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "协议")
|
||||
private String protocol;
|
||||
|
||||
@Schema(description = "")
|
||||
private String socket;
|
||||
|
||||
@Schema(description = "域名/IP")
|
||||
private String domain;
|
||||
|
||||
@Schema(description = "端口")
|
||||
private Integer port;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "全局变量")
|
||||
private String variables;
|
||||
|
||||
@Schema(description = "请求头")
|
||||
private String headers;
|
||||
|
||||
@Schema(description = "Config Data (JSON format)")
|
||||
private String config;
|
||||
|
||||
@Schema(description = "hosts")
|
||||
private String hosts;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
updateUser("update_user", "updateUser", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package io.metersphere.sdk.domain;
|
||||
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EnvironmentBlob implements Serializable {
|
||||
@Schema(description = "环境ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{environment_blob.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{environment_blob.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "Config Data (JSON format)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "{environment_blob.config.not_blank}", groups = {Created.class})
|
||||
private byte[] config;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "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();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,270 @@
|
||||
package io.metersphere.sdk.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EnvironmentBlobExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public EnvironmentBlobExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -314,276 +314,6 @@ public class EnvironmentExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolIsNull() {
|
||||
addCriterion("protocol is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolIsNotNull() {
|
||||
addCriterion("protocol is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolEqualTo(String value) {
|
||||
addCriterion("protocol =", value, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolNotEqualTo(String value) {
|
||||
addCriterion("protocol <>", value, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolGreaterThan(String value) {
|
||||
addCriterion("protocol >", value, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("protocol >=", value, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolLessThan(String value) {
|
||||
addCriterion("protocol <", value, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolLessThanOrEqualTo(String value) {
|
||||
addCriterion("protocol <=", value, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolLike(String value) {
|
||||
addCriterion("protocol like", value, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolNotLike(String value) {
|
||||
addCriterion("protocol not like", value, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolIn(List<String> values) {
|
||||
addCriterion("protocol in", values, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolNotIn(List<String> values) {
|
||||
addCriterion("protocol not in", values, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolBetween(String value1, String value2) {
|
||||
addCriterion("protocol between", value1, value2, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProtocolNotBetween(String value1, String value2) {
|
||||
addCriterion("protocol not between", value1, value2, "protocol");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketIsNull() {
|
||||
addCriterion("socket is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketIsNotNull() {
|
||||
addCriterion("socket is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketEqualTo(String value) {
|
||||
addCriterion("socket =", value, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketNotEqualTo(String value) {
|
||||
addCriterion("socket <>", value, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketGreaterThan(String value) {
|
||||
addCriterion("socket >", value, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("socket >=", value, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketLessThan(String value) {
|
||||
addCriterion("socket <", value, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketLessThanOrEqualTo(String value) {
|
||||
addCriterion("socket <=", value, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketLike(String value) {
|
||||
addCriterion("socket like", value, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketNotLike(String value) {
|
||||
addCriterion("socket not like", value, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketIn(List<String> values) {
|
||||
addCriterion("socket in", values, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketNotIn(List<String> values) {
|
||||
addCriterion("socket not in", values, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketBetween(String value1, String value2) {
|
||||
addCriterion("socket between", value1, value2, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSocketNotBetween(String value1, String value2) {
|
||||
addCriterion("socket not between", value1, value2, "socket");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainIsNull() {
|
||||
addCriterion("`domain` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainIsNotNull() {
|
||||
addCriterion("`domain` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainEqualTo(String value) {
|
||||
addCriterion("`domain` =", value, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainNotEqualTo(String value) {
|
||||
addCriterion("`domain` <>", value, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainGreaterThan(String value) {
|
||||
addCriterion("`domain` >", value, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`domain` >=", value, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainLessThan(String value) {
|
||||
addCriterion("`domain` <", value, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainLessThanOrEqualTo(String value) {
|
||||
addCriterion("`domain` <=", value, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainLike(String value) {
|
||||
addCriterion("`domain` like", value, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainNotLike(String value) {
|
||||
addCriterion("`domain` not like", value, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainIn(List<String> values) {
|
||||
addCriterion("`domain` in", values, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainNotIn(List<String> values) {
|
||||
addCriterion("`domain` not in", values, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainBetween(String value1, String value2) {
|
||||
addCriterion("`domain` between", value1, value2, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDomainNotBetween(String value1, String value2) {
|
||||
addCriterion("`domain` not between", value1, value2, "domain");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortIsNull() {
|
||||
addCriterion("port is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortIsNotNull() {
|
||||
addCriterion("port is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortEqualTo(Integer value) {
|
||||
addCriterion("port =", value, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortNotEqualTo(Integer value) {
|
||||
addCriterion("port <>", value, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortGreaterThan(Integer value) {
|
||||
addCriterion("port >", value, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("port >=", value, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortLessThan(Integer value) {
|
||||
addCriterion("port <", value, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("port <=", value, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortIn(List<Integer> values) {
|
||||
addCriterion("port in", values, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortNotIn(List<Integer> values) {
|
||||
addCriterion("port not in", values, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortBetween(Integer value1, Integer value2) {
|
||||
addCriterion("port between", value1, value2, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPortNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("port not between", value1, value2, "port");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateUserIsNull() {
|
||||
addCriterion("create_user is null");
|
||||
return (Criteria) this;
|
||||
@ -654,6 +384,76 @@ public class EnvironmentExample {
|
||||
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 andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
@ -4,6 +4,8 @@ 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
|
||||
@ -18,10 +20,10 @@ public class EnvironmentGroup implements Serializable {
|
||||
@Size(min = 1, max = 255, message = "{environment_group.name.length_range}", groups = {Created.class, Updated.class})
|
||||
private String name;
|
||||
|
||||
@Schema(description = "所属组织", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{environment_group.organization_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{environment_group.organization_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String organizationId;
|
||||
@Schema(description = "所属项目id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{environment_group.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{environment_group.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "环境组描述")
|
||||
private String description;
|
||||
@ -29,6 +31,9 @@ public class EnvironmentGroup implements Serializable {
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@ -36,4 +41,82 @@ public class EnvironmentGroup implements Serializable {
|
||||
private Long updateTime;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
name("name", "name", "VARCHAR", true),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
description("description", "description", "VARCHAR", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
updateUser("update_user", "updateUser", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", 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();
|
||||
}
|
||||
}
|
||||
}
|
@ -244,73 +244,73 @@ public class EnvironmentGroupExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdIsNull() {
|
||||
addCriterion("organization_id is null");
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdIsNotNull() {
|
||||
addCriterion("organization_id is not null");
|
||||
public Criteria andProjectIdIsNotNull() {
|
||||
addCriterion("project_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdEqualTo(String value) {
|
||||
addCriterion("organization_id =", value, "organizationId");
|
||||
public Criteria andProjectIdEqualTo(String value) {
|
||||
addCriterion("project_id =", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdNotEqualTo(String value) {
|
||||
addCriterion("organization_id <>", value, "organizationId");
|
||||
public Criteria andProjectIdNotEqualTo(String value) {
|
||||
addCriterion("project_id <>", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdGreaterThan(String value) {
|
||||
addCriterion("organization_id >", value, "organizationId");
|
||||
public Criteria andProjectIdGreaterThan(String value) {
|
||||
addCriterion("project_id >", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("organization_id >=", value, "organizationId");
|
||||
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project_id >=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdLessThan(String value) {
|
||||
addCriterion("organization_id <", value, "organizationId");
|
||||
public Criteria andProjectIdLessThan(String value) {
|
||||
addCriterion("project_id <", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("organization_id <=", value, "organizationId");
|
||||
public Criteria andProjectIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("project_id <=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdLike(String value) {
|
||||
addCriterion("organization_id like", value, "organizationId");
|
||||
public Criteria andProjectIdLike(String value) {
|
||||
addCriterion("project_id like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdNotLike(String value) {
|
||||
addCriterion("organization_id not like", value, "organizationId");
|
||||
public Criteria andProjectIdNotLike(String value) {
|
||||
addCriterion("project_id not like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdIn(List<String> values) {
|
||||
addCriterion("organization_id in", values, "organizationId");
|
||||
public Criteria andProjectIdIn(List<String> values) {
|
||||
addCriterion("project_id in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdNotIn(List<String> values) {
|
||||
addCriterion("organization_id not in", values, "organizationId");
|
||||
public Criteria andProjectIdNotIn(List<String> values) {
|
||||
addCriterion("project_id not in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdBetween(String value1, String value2) {
|
||||
addCriterion("organization_id between", value1, value2, "organizationId");
|
||||
public Criteria andProjectIdBetween(String value1, String value2) {
|
||||
addCriterion("project_id between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andOrganizationIdNotBetween(String value1, String value2) {
|
||||
addCriterion("organization_id not between", value1, value2, "organizationId");
|
||||
public Criteria andProjectIdNotBetween(String value1, String value2) {
|
||||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
@ -454,6 +454,76 @@ public class EnvironmentGroupExample {
|
||||
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 andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
@ -1,26 +0,0 @@
|
||||
package io.metersphere.sdk.domain;
|
||||
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EnvironmentGroupProject implements Serializable {
|
||||
@Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{environment_group_project.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{environment_group_project.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "环境组id")
|
||||
private String environmentGroupId;
|
||||
|
||||
@Schema(description = "环境ID")
|
||||
private String environmentId;
|
||||
|
||||
@Schema(description = "项目id")
|
||||
private String projectId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
package io.metersphere.sdk.domain;
|
||||
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class EnvironmentGroupRelation implements Serializable {
|
||||
@Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{environment_group_relation.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{environment_group_relation.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "环境组id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{environment_group_relation.environment_group_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{environment_group_relation.environment_group_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String environmentGroupId;
|
||||
|
||||
@Schema(description = "环境ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{environment_group_relation.environment_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{environment_group_relation.environment_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String environmentId;
|
||||
|
||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{environment_group_relation.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{environment_group_relation.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
environmentGroupId("environment_group_id", "environmentGroupId", "VARCHAR", false),
|
||||
environmentId("environment_id", "environmentId", "VARCHAR", false),
|
||||
projectId("project_id", "projectId", "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();
|
||||
}
|
||||
}
|
||||
}
|
@ -3,14 +3,14 @@ package io.metersphere.sdk.domain;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class EnvironmentGroupProjectExample {
|
||||
public class EnvironmentGroupRelationExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public EnvironmentGroupProjectExample() {
|
||||
public EnvironmentGroupRelationExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
@ -0,0 +1,116 @@
|
||||
package io.metersphere.sdk.domain;
|
||||
|
||||
import io.metersphere.validation.groups.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ProjectParameters implements Serializable {
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{project_parameters.id.not_blank}", groups = {Updated.class})
|
||||
@Size(min = 1, max = 50, message = "{project_parameters.id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String id;
|
||||
|
||||
@Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "{project_parameters.project_id.not_blank}", groups = {Created.class})
|
||||
@Size(min = 1, max = 50, message = "{project_parameters.project_id.length_range}", groups = {Created.class, Updated.class})
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
private String createUser;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
private String updateUser;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@Schema(description = "参数配置")
|
||||
private byte[] parameters;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public enum Column {
|
||||
id("id", "id", "VARCHAR", false),
|
||||
projectId("project_id", "projectId", "VARCHAR", false),
|
||||
createUser("create_user", "createUser", "VARCHAR", false),
|
||||
updateUser("update_user", "updateUser", "VARCHAR", false),
|
||||
createTime("create_time", "createTime", "BIGINT", false),
|
||||
updateTime("update_time", "updateTime", "BIGINT", false),
|
||||
parameters("parameters", "parameters", "LONGVARBINARY", true);
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,600 @@
|
||||
package io.metersphere.sdk.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ProjectParametersExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public ProjectParametersExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNotNull() {
|
||||
addCriterion("project_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdEqualTo(String value) {
|
||||
addCriterion("project_id =", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotEqualTo(String value) {
|
||||
addCriterion("project_id <>", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThan(String value) {
|
||||
addCriterion("project_id >", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("project_id >=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThan(String value) {
|
||||
addCriterion("project_id <", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("project_id <=", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdLike(String value) {
|
||||
addCriterion("project_id like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotLike(String value) {
|
||||
addCriterion("project_id not like", value, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIn(List<String> values) {
|
||||
addCriterion("project_id in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotIn(List<String> values) {
|
||||
addCriterion("project_id not in", values, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdBetween(String value1, String value2) {
|
||||
addCriterion("project_id between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdNotBetween(String value1, String value2) {
|
||||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria 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 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 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 static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package io.metersphere.sdk.mapper;
|
||||
|
||||
import io.metersphere.sdk.domain.EnvironmentBlob;
|
||||
import io.metersphere.sdk.domain.EnvironmentBlobExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface EnvironmentBlobMapper {
|
||||
long countByExample(EnvironmentBlobExample example);
|
||||
|
||||
int deleteByExample(EnvironmentBlobExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(EnvironmentBlob record);
|
||||
|
||||
int insertSelective(EnvironmentBlob record);
|
||||
|
||||
List<EnvironmentBlob> selectByExampleWithBLOBs(EnvironmentBlobExample example);
|
||||
|
||||
List<EnvironmentBlob> selectByExample(EnvironmentBlobExample example);
|
||||
|
||||
EnvironmentBlob selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") EnvironmentBlob record, @Param("example") EnvironmentBlobExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") EnvironmentBlob record, @Param("example") EnvironmentBlobExample example);
|
||||
|
||||
int updateByExample(@Param("record") EnvironmentBlob record, @Param("example") EnvironmentBlobExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(EnvironmentBlob record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(EnvironmentBlob record);
|
||||
|
||||
int batchInsert(@Param("list") List<EnvironmentBlob> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<EnvironmentBlob> list, @Param("selective") EnvironmentBlob.Column ... selective);
|
||||
}
|
@ -0,0 +1,222 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.sdk.mapper.EnvironmentBlobMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.sdk.domain.EnvironmentBlob">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.sdk.domain.EnvironmentBlob">
|
||||
<result column="config" jdbcType="LONGVARBINARY" property="config" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.sdk.domain.EnvironmentBlobExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from environment_blob
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.metersphere.sdk.domain.EnvironmentBlobExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from environment_blob
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from environment_blob
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from environment_blob
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.sdk.domain.EnvironmentBlobExample">
|
||||
delete from environment_blob
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.sdk.domain.EnvironmentBlob">
|
||||
insert into environment_blob (id, config)
|
||||
values (#{id,jdbcType=VARCHAR}, #{config,jdbcType=LONGVARBINARY})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.sdk.domain.EnvironmentBlob">
|
||||
insert into environment_blob
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.sdk.domain.EnvironmentBlobExample" resultType="java.lang.Long">
|
||||
select count(*) from environment_blob
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update environment_blob
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.config != null">
|
||||
config = #{record.config,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update environment_blob
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
config = #{record.config,jdbcType=LONGVARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update environment_blob
|
||||
set id = #{record.id,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.sdk.domain.EnvironmentBlob">
|
||||
update environment_blob
|
||||
<set>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.sdk.domain.EnvironmentBlob">
|
||||
update environment_blob
|
||||
set config = #{config,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into environment_blob
|
||||
(id, config)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.config,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into environment_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="'config'.toString() == column.value">
|
||||
#{item.config,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -27,4 +27,8 @@ public interface EnvironmentGroupMapper {
|
||||
int updateByPrimaryKeySelective(EnvironmentGroup record);
|
||||
|
||||
int updateByPrimaryKey(EnvironmentGroup record);
|
||||
|
||||
int batchInsert(@Param("list") List<EnvironmentGroup> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<EnvironmentGroup> list, @Param("selective") EnvironmentGroup.Column ... selective);
|
||||
}
|
@ -4,9 +4,10 @@
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.sdk.domain.EnvironmentGroup">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
</resultMap>
|
||||
@ -69,7 +70,7 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, organization_id, description, create_user, create_time, update_time
|
||||
id, `name`, project_id, description, create_user, update_user, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.sdk.domain.EnvironmentGroupExample" resultMap="BaseResultMap">
|
||||
select
|
||||
@ -102,12 +103,12 @@
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.sdk.domain.EnvironmentGroup">
|
||||
insert into environment_group (id, `name`, organization_id,
|
||||
description, create_user, create_time,
|
||||
update_time)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT})
|
||||
insert into environment_group (id, `name`, project_id,
|
||||
description, create_user, update_user,
|
||||
create_time, update_time)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.sdk.domain.EnvironmentGroup">
|
||||
insert into environment_group
|
||||
@ -118,8 +119,8 @@
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
organization_id,
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
@ -127,6 +128,9 @@
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
@ -141,8 +145,8 @@
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
#{organizationId,jdbcType=VARCHAR},
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
@ -150,6 +154,9 @@
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -173,8 +180,8 @@
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.organizationId != null">
|
||||
organization_id = #{record.organizationId,jdbcType=VARCHAR},
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
@ -182,6 +189,9 @@
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -197,9 +207,10 @@
|
||||
update environment_group
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
organization_id = #{record.organizationId,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
@ -212,8 +223,8 @@
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
organization_id = #{organizationId,jdbcType=VARCHAR},
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
@ -221,6 +232,9 @@
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
@ -233,11 +247,61 @@
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.sdk.domain.EnvironmentGroup">
|
||||
update environment_group
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
organization_id = #{organizationId,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into environment_group
|
||||
(id, `name`, project_id, description, create_user, update_user, create_time, update_time
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR},
|
||||
#{item.description,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR}, #{item.updateUser,jdbcType=VARCHAR},
|
||||
#{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into environment_group (
|
||||
<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="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'description'.toString() == column.value">
|
||||
#{item.description,jdbcType=VARCHAR}
|
||||
</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="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -1,30 +0,0 @@
|
||||
package io.metersphere.sdk.mapper;
|
||||
|
||||
import io.metersphere.sdk.domain.EnvironmentGroupProject;
|
||||
import io.metersphere.sdk.domain.EnvironmentGroupProjectExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface EnvironmentGroupProjectMapper {
|
||||
long countByExample(EnvironmentGroupProjectExample example);
|
||||
|
||||
int deleteByExample(EnvironmentGroupProjectExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(EnvironmentGroupProject record);
|
||||
|
||||
int insertSelective(EnvironmentGroupProject record);
|
||||
|
||||
List<EnvironmentGroupProject> selectByExample(EnvironmentGroupProjectExample example);
|
||||
|
||||
EnvironmentGroupProject selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") EnvironmentGroupProject record, @Param("example") EnvironmentGroupProjectExample example);
|
||||
|
||||
int updateByExample(@Param("record") EnvironmentGroupProject record, @Param("example") EnvironmentGroupProjectExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(EnvironmentGroupProject record);
|
||||
|
||||
int updateByPrimaryKey(EnvironmentGroupProject record);
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package io.metersphere.sdk.mapper;
|
||||
|
||||
import io.metersphere.sdk.domain.EnvironmentGroupRelation;
|
||||
import io.metersphere.sdk.domain.EnvironmentGroupRelationExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface EnvironmentGroupRelationMapper {
|
||||
long countByExample(EnvironmentGroupRelationExample example);
|
||||
|
||||
int deleteByExample(EnvironmentGroupRelationExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(EnvironmentGroupRelation record);
|
||||
|
||||
int insertSelective(EnvironmentGroupRelation record);
|
||||
|
||||
List<EnvironmentGroupRelation> selectByExample(EnvironmentGroupRelationExample example);
|
||||
|
||||
EnvironmentGroupRelation selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") EnvironmentGroupRelation record, @Param("example") EnvironmentGroupRelationExample example);
|
||||
|
||||
int updateByExample(@Param("record") EnvironmentGroupRelation record, @Param("example") EnvironmentGroupRelationExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(EnvironmentGroupRelation record);
|
||||
|
||||
int updateByPrimaryKey(EnvironmentGroupRelation record);
|
||||
|
||||
int batchInsert(@Param("list") List<EnvironmentGroupRelation> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<EnvironmentGroupRelation> list, @Param("selective") EnvironmentGroupRelation.Column ... selective);
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.sdk.mapper.EnvironmentGroupProjectMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.sdk.domain.EnvironmentGroupProject">
|
||||
<mapper namespace="io.metersphere.sdk.mapper.EnvironmentGroupRelationMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.sdk.domain.EnvironmentGroupRelation">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="environment_group_id" jdbcType="VARCHAR" property="environmentGroupId" />
|
||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||
@ -68,13 +68,13 @@
|
||||
<sql id="Base_Column_List">
|
||||
id, environment_group_id, environment_id, project_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.sdk.domain.EnvironmentGroupProjectExample" resultMap="BaseResultMap">
|
||||
<select id="selectByExample" parameterType="io.metersphere.sdk.domain.EnvironmentGroupRelationExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from environment_group_project
|
||||
from environment_group_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
@ -85,27 +85,27 @@
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from environment_group_project
|
||||
from environment_group_relation
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from environment_group_project
|
||||
delete from environment_group_relation
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.sdk.domain.EnvironmentGroupProjectExample">
|
||||
delete from environment_group_project
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.sdk.domain.EnvironmentGroupRelationExample">
|
||||
delete from environment_group_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.sdk.domain.EnvironmentGroupProject">
|
||||
insert into environment_group_project (id, environment_group_id, environment_id,
|
||||
<insert id="insert" parameterType="io.metersphere.sdk.domain.EnvironmentGroupRelation">
|
||||
insert into environment_group_relation (id, environment_group_id, environment_id,
|
||||
project_id)
|
||||
values (#{id,jdbcType=VARCHAR}, #{environmentGroupId,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR},
|
||||
#{projectId,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.sdk.domain.EnvironmentGroupProject">
|
||||
insert into environment_group_project
|
||||
<insert id="insertSelective" parameterType="io.metersphere.sdk.domain.EnvironmentGroupRelation">
|
||||
insert into environment_group_relation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
@ -135,14 +135,14 @@
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.sdk.domain.EnvironmentGroupProjectExample" resultType="java.lang.Long">
|
||||
select count(*) from environment_group_project
|
||||
<select id="countByExample" parameterType="io.metersphere.sdk.domain.EnvironmentGroupRelationExample" resultType="java.lang.Long">
|
||||
select count(*) from environment_group_relation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update environment_group_project
|
||||
update environment_group_relation
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
@ -162,7 +162,7 @@
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update environment_group_project
|
||||
update environment_group_relation
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
environment_group_id = #{record.environmentGroupId,jdbcType=VARCHAR},
|
||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||
@ -171,8 +171,8 @@
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.sdk.domain.EnvironmentGroupProject">
|
||||
update environment_group_project
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.sdk.domain.EnvironmentGroupRelation">
|
||||
update environment_group_relation
|
||||
<set>
|
||||
<if test="environmentGroupId != null">
|
||||
environment_group_id = #{environmentGroupId,jdbcType=VARCHAR},
|
||||
@ -186,11 +186,46 @@
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.sdk.domain.EnvironmentGroupProject">
|
||||
update environment_group_project
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.sdk.domain.EnvironmentGroupRelation">
|
||||
update environment_group_relation
|
||||
set environment_group_id = #{environmentGroupId,jdbcType=VARCHAR},
|
||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into environment_group_relation
|
||||
(id, environment_group_id, environment_id, project_id)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.environmentGroupId,jdbcType=VARCHAR}, #{item.environmentId,jdbcType=VARCHAR},
|
||||
#{item.projectId,jdbcType=VARCHAR})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into environment_group_relation (
|
||||
<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="'environment_group_id'.toString() == column.value">
|
||||
#{item.environmentGroupId,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>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -16,21 +16,19 @@ public interface EnvironmentMapper {
|
||||
|
||||
int insertSelective(Environment record);
|
||||
|
||||
List<Environment> selectByExampleWithBLOBs(EnvironmentExample example);
|
||||
|
||||
List<Environment> selectByExample(EnvironmentExample example);
|
||||
|
||||
Environment selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") Environment record, @Param("example") EnvironmentExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") Environment record, @Param("example") EnvironmentExample example);
|
||||
|
||||
int updateByExample(@Param("record") Environment record, @Param("example") EnvironmentExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(Environment record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(Environment record);
|
||||
|
||||
int updateByPrimaryKey(Environment record);
|
||||
|
||||
int batchInsert(@Param("list") List<Environment> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<Environment> list, @Param("selective") Environment.Column ... selective);
|
||||
}
|
@ -5,20 +5,11 @@
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
|
||||
<result column="socket" jdbcType="VARCHAR" property="socket" />
|
||||
<result column="domain" jdbcType="VARCHAR" property="domain" />
|
||||
<result column="port" jdbcType="INTEGER" property="port" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.sdk.domain.Environment">
|
||||
<result column="variables" jdbcType="LONGVARCHAR" property="variables" />
|
||||
<result column="headers" jdbcType="LONGVARCHAR" property="headers" />
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config" />
|
||||
<result column="hosts" jdbcType="LONGVARCHAR" property="hosts" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
@ -78,28 +69,8 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, project_id, protocol, socket, `domain`, port, create_user, create_time,
|
||||
update_time
|
||||
id, `name`, project_id, create_user, update_user, create_time, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
`variables`, headers, config, `hosts`
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.sdk.domain.EnvironmentExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from environment
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.metersphere.sdk.domain.EnvironmentExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
@ -114,11 +85,9 @@
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from environment
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
@ -134,15 +103,11 @@
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.sdk.domain.Environment">
|
||||
insert into environment (id, `name`, project_id,
|
||||
protocol, socket, `domain`,
|
||||
port, create_user, create_time,
|
||||
update_time, `variables`, headers,
|
||||
config, `hosts`)
|
||||
create_user, update_user, create_time,
|
||||
update_time)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=VARCHAR}, #{socket,jdbcType=VARCHAR}, #{domain,jdbcType=VARCHAR},
|
||||
#{port,jdbcType=INTEGER}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{variables,jdbcType=LONGVARCHAR}, #{headers,jdbcType=LONGVARCHAR},
|
||||
#{config,jdbcType=LONGVARCHAR}, #{hosts,jdbcType=LONGVARCHAR})
|
||||
#{createUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.sdk.domain.Environment">
|
||||
insert into environment
|
||||
@ -156,39 +121,18 @@
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
protocol,
|
||||
</if>
|
||||
<if test="socket != null">
|
||||
socket,
|
||||
</if>
|
||||
<if test="domain != null">
|
||||
`domain`,
|
||||
</if>
|
||||
<if test="port != null">
|
||||
port,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="variables != null">
|
||||
`variables`,
|
||||
</if>
|
||||
<if test="headers != null">
|
||||
headers,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
<if test="hosts != null">
|
||||
`hosts`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@ -200,39 +144,18 @@
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
#{protocol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="socket != null">
|
||||
#{socket,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="domain != null">
|
||||
#{domain,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="port != null">
|
||||
#{port,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="variables != null">
|
||||
#{variables,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="headers != null">
|
||||
#{headers,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="hosts != null">
|
||||
#{hosts,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.sdk.domain.EnvironmentExample" resultType="java.lang.Long">
|
||||
@ -253,74 +176,30 @@
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.protocol != null">
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.socket != null">
|
||||
socket = #{record.socket,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.domain != null">
|
||||
`domain` = #{record.domain,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.port != null">
|
||||
port = #{record.port,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user = #{record.updateUser,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.variables != null">
|
||||
`variables` = #{record.variables,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.headers != null">
|
||||
headers = #{record.headers,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.config != null">
|
||||
config = #{record.config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.hosts != null">
|
||||
`hosts` = #{record.hosts,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update environment
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
socket = #{record.socket,jdbcType=VARCHAR},
|
||||
`domain` = #{record.domain,jdbcType=VARCHAR},
|
||||
port = #{record.port,jdbcType=INTEGER},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
`variables` = #{record.variables,jdbcType=LONGVARCHAR},
|
||||
headers = #{record.headers,jdbcType=LONGVARCHAR},
|
||||
config = #{record.config,jdbcType=LONGVARCHAR},
|
||||
`hosts` = #{record.hosts,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update environment
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||
socket = #{record.socket,jdbcType=VARCHAR},
|
||||
`domain` = #{record.domain,jdbcType=VARCHAR},
|
||||
port = #{record.port,jdbcType=INTEGER},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
@ -336,70 +215,74 @@
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="protocol != null">
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="socket != null">
|
||||
socket = #{socket,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="domain != null">
|
||||
`domain` = #{domain,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="port != null">
|
||||
port = #{port,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="variables != null">
|
||||
`variables` = #{variables,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="headers != null">
|
||||
headers = #{headers,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="hosts != null">
|
||||
`hosts` = #{hosts,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.sdk.domain.Environment">
|
||||
update environment
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
socket = #{socket,jdbcType=VARCHAR},
|
||||
`domain` = #{domain,jdbcType=VARCHAR},
|
||||
port = #{port,jdbcType=INTEGER},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
`variables` = #{variables,jdbcType=LONGVARCHAR},
|
||||
headers = #{headers,jdbcType=LONGVARCHAR},
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
`hosts` = #{hosts,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.sdk.domain.Environment">
|
||||
update environment
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
protocol = #{protocol,jdbcType=VARCHAR},
|
||||
socket = #{socket,jdbcType=VARCHAR},
|
||||
`domain` = #{domain,jdbcType=VARCHAR},
|
||||
port = #{port,jdbcType=INTEGER},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into environment
|
||||
(id, `name`, project_id, create_user, update_user, create_time, update_time)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR},
|
||||
#{item.createUser,jdbcType=VARCHAR}, #{item.updateUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
||||
#{item.updateTime,jdbcType=BIGINT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into 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="'name'.toString() == column.value">
|
||||
#{item.name,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</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="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -0,0 +1,40 @@
|
||||
package io.metersphere.sdk.mapper;
|
||||
|
||||
import io.metersphere.sdk.domain.ProjectParameters;
|
||||
import io.metersphere.sdk.domain.ProjectParametersExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface ProjectParametersMapper {
|
||||
long countByExample(ProjectParametersExample example);
|
||||
|
||||
int deleteByExample(ProjectParametersExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(ProjectParameters record);
|
||||
|
||||
int insertSelective(ProjectParameters record);
|
||||
|
||||
List<ProjectParameters> selectByExampleWithBLOBs(ProjectParametersExample example);
|
||||
|
||||
List<ProjectParameters> selectByExample(ProjectParametersExample example);
|
||||
|
||||
ProjectParameters selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") ProjectParameters record, @Param("example") ProjectParametersExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") ProjectParameters record, @Param("example") ProjectParametersExample example);
|
||||
|
||||
int updateByExample(@Param("record") ProjectParameters record, @Param("example") ProjectParametersExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(ProjectParameters record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(ProjectParameters record);
|
||||
|
||||
int updateByPrimaryKey(ProjectParameters record);
|
||||
|
||||
int batchInsert(@Param("list") List<ProjectParameters> list);
|
||||
|
||||
int batchInsertSelective(@Param("list") List<ProjectParameters> list, @Param("selective") ProjectParameters.Column ... selective);
|
||||
}
|
@ -0,0 +1,333 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.sdk.mapper.ProjectParametersMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.sdk.domain.ProjectParameters">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||
<result column="update_user" jdbcType="VARCHAR" property="updateUser" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.sdk.domain.ProjectParameters">
|
||||
<result column="parameters" jdbcType="LONGVARBINARY" property="parameters" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, project_id, create_user, update_user, create_time, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
`parameters`
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.sdk.domain.ProjectParametersExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from project_parameters
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.metersphere.sdk.domain.ProjectParametersExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from project_parameters
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from project_parameters
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from project_parameters
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.sdk.domain.ProjectParametersExample">
|
||||
delete from project_parameters
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.sdk.domain.ProjectParameters">
|
||||
insert into project_parameters (id, project_id, create_user,
|
||||
update_user, create_time, update_time,
|
||||
`parameters`)
|
||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||
#{updateUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{parameters,jdbcType=LONGVARBINARY})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.sdk.domain.ProjectParameters">
|
||||
insert into project_parameters
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user,
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="parameters != null">
|
||||
`parameters`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
#{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
#{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="parameters != null">
|
||||
#{parameters,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.sdk.domain.ProjectParametersExample" resultType="java.lang.Long">
|
||||
select count(*) from project_parameters
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update project_parameters
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUser != null">
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateUser != null">
|
||||
update_user = #{record.updateUser,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.parameters != null">
|
||||
`parameters` = #{record.parameters,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update project_parameters
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
`parameters` = #{record.parameters,jdbcType=LONGVARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update project_parameters
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||
update_user = #{record.updateUser,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.sdk.domain.ProjectParameters">
|
||||
update project_parameters
|
||||
<set>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUser != null">
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateUser != null">
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="parameters != null">
|
||||
`parameters` = #{parameters,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.sdk.domain.ProjectParameters">
|
||||
update project_parameters
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
`parameters` = #{parameters,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.sdk.domain.ProjectParameters">
|
||||
update project_parameters
|
||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||
create_user = #{createUser,jdbcType=VARCHAR},
|
||||
update_user = #{updateUser,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
insert into project_parameters
|
||||
(id, project_id, create_user, update_user, create_time, update_time, `parameters`
|
||||
)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.id,jdbcType=VARCHAR}, #{item.projectId,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR},
|
||||
#{item.updateUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.updateTime,jdbcType=BIGINT},
|
||||
#{item.parameters,jdbcType=LONGVARBINARY})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective" parameterType="map">
|
||||
insert into project_parameters (
|
||||
<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="'project_id'.toString() == column.value">
|
||||
#{item.projectId,jdbcType=VARCHAR}
|
||||
</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="'create_time'.toString() == column.value">
|
||||
#{item.createTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'update_time'.toString() == column.value">
|
||||
#{item.updateTime,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="'parameters'.toString() == column.value">
|
||||
#{item.parameters,jdbcType=LONGVARBINARY}
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -38,5 +38,83 @@ CREATE TABLE operation_log_blob(
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '操作日志内容详情';
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS environment(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '环境ID' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '环境名称' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
||||
`create_time` BIGINT 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_project_id ON environment(project_id);
|
||||
CREATE INDEX idx_name ON environment(name);
|
||||
CREATE INDEX idx_create_time ON environment(create_time);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS environment_blob(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '环境ID' ,
|
||||
`config` LONGBLOB NOT NULL COMMENT 'Config Data (JSON format)' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '环境配置';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS environment_group(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '环境组id' ,
|
||||
`name` VARCHAR(255) NOT NULL COMMENT '环境组名' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '所属项目id' ,
|
||||
`description` VARCHAR(500) COMMENT '环境组描述' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
||||
`create_time` BIGINT 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_name ON environment_group(name);
|
||||
CREATE INDEX idx_project_id ON environment_group(project_id);
|
||||
CREATE INDEX idx_create_user ON environment_group(create_user);
|
||||
CREATE INDEX idx_create_time ON environment_group(create_time);
|
||||
CREATE INDEX idx_update_time ON environment_group(update_time);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS environment_group_relation(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '' ,
|
||||
`environment_group_id` VARCHAR(50) NOT NULL COMMENT '环境组id' ,
|
||||
`environment_id` VARCHAR(50) NOT NULL COMMENT '环境ID' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目id' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '环境组关联关系';
|
||||
|
||||
CREATE INDEX idx_environment_group_id ON environment_group_relation(environment_group_id);
|
||||
CREATE INDEX idx_environment_id ON environment_group_relation(environment_id);
|
||||
CREATE INDEX idx_project_id ON environment_group_relation(project_id);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS project_parameters(
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'ID' ,
|
||||
`project_id` VARCHAR(50) NOT NULL COMMENT '项目ID' ,
|
||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||
`update_user` VARCHAR(50) NOT NULL COMMENT '修改人' ,
|
||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||
`update_time` BIGINT NOT NULL COMMENT '更新时间' ,
|
||||
`parameters` LONGBLOB COMMENT '参数配置' ,
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT = '项目级参数';
|
||||
|
||||
CREATE INDEX idx_project_id ON project_parameters(project_id);
|
||||
|
||||
|
||||
|
||||
-- set innodb lock wait timeout to default
|
||||
SET SESSION innodb_lock_wait_timeout = DEFAULT;
|
Loading…
Reference in New Issue
Block a user