diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomField.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomField.java index 5dcd8b67aa..816358a94d 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomField.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomField.java @@ -51,6 +51,13 @@ public class CustomField implements Serializable { @Schema(description = "创建人") private String createUser; + @Schema(description = "项目字段所关联的组织字段ID") + private String refId; + + @Schema(description = "是否需要手动输入选项key", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{custom_field.enable_option_key.not_blank}", groups = {Created.class}) + private Boolean enableOptionKey; + @Schema(description = "组织或项目ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{custom_field.scope_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{custom_field.scope_id.length_range}", groups = {Created.class, Updated.class}) @@ -69,6 +76,8 @@ public class CustomField implements Serializable { createTime("create_time", "createTime", "BIGINT", false), updateTime("update_time", "updateTime", "BIGINT", false), createUser("create_user", "createUser", "VARCHAR", false), + refId("ref_id", "refId", "VARCHAR", false), + enableOptionKey("enable_option_key", "enableOptionKey", "BIT", false), scopeId("scope_id", "scopeId", "VARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldExample.java index 6cda76b3c6..b6148aef65 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/CustomFieldExample.java @@ -774,6 +774,136 @@ public class CustomFieldExample { return (Criteria) this; } + public Criteria andRefIdIsNull() { + addCriterion("ref_id is null"); + return (Criteria) this; + } + + public Criteria andRefIdIsNotNull() { + addCriterion("ref_id is not null"); + return (Criteria) this; + } + + public Criteria andRefIdEqualTo(String value) { + addCriterion("ref_id =", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotEqualTo(String value) { + addCriterion("ref_id <>", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThan(String value) { + addCriterion("ref_id >", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThanOrEqualTo(String value) { + addCriterion("ref_id >=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThan(String value) { + addCriterion("ref_id <", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThanOrEqualTo(String value) { + addCriterion("ref_id <=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLike(String value) { + addCriterion("ref_id like", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotLike(String value) { + addCriterion("ref_id not like", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdIn(List values) { + addCriterion("ref_id in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotIn(List values) { + addCriterion("ref_id not in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdBetween(String value1, String value2) { + addCriterion("ref_id between", value1, value2, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotBetween(String value1, String value2) { + addCriterion("ref_id not between", value1, value2, "refId"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyIsNull() { + addCriterion("enable_option_key is null"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyIsNotNull() { + addCriterion("enable_option_key is not null"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyEqualTo(Boolean value) { + addCriterion("enable_option_key =", value, "enableOptionKey"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyNotEqualTo(Boolean value) { + addCriterion("enable_option_key <>", value, "enableOptionKey"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyGreaterThan(Boolean value) { + addCriterion("enable_option_key >", value, "enableOptionKey"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyGreaterThanOrEqualTo(Boolean value) { + addCriterion("enable_option_key >=", value, "enableOptionKey"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyLessThan(Boolean value) { + addCriterion("enable_option_key <", value, "enableOptionKey"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyLessThanOrEqualTo(Boolean value) { + addCriterion("enable_option_key <=", value, "enableOptionKey"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyIn(List values) { + addCriterion("enable_option_key in", values, "enableOptionKey"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyNotIn(List values) { + addCriterion("enable_option_key not in", values, "enableOptionKey"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyBetween(Boolean value1, Boolean value2) { + addCriterion("enable_option_key between", value1, value2, "enableOptionKey"); + return (Criteria) this; + } + + public Criteria andEnableOptionKeyNotBetween(Boolean value1, Boolean value2) { + addCriterion("enable_option_key not between", value1, value2, "enableOptionKey"); + return (Criteria) this; + } + public Criteria andScopeIdIsNull() { addCriterion("scope_id is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OrganizationParameter.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OrganizationParameter.java new file mode 100644 index 0000000000..d8ee896a8c --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OrganizationParameter.java @@ -0,0 +1,100 @@ +package io.metersphere.system.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 OrganizationParameter implements Serializable { + @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{organization_parameter.organization_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{organization_parameter.organization_id.length_range}", groups = {Created.class, Updated.class}) + private String organizationId; + + @Schema(description = "配置项", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{organization_parameter.param_key.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{organization_parameter.param_key.length_range}", groups = {Created.class, Updated.class}) + private String paramKey; + + @Schema(description = "配置值") + private String paramValue; + + private static final long serialVersionUID = 1L; + + public enum Column { + organizationId("organization_id", "organizationId", "VARCHAR", false), + paramKey("param_key", "paramKey", "VARCHAR", false), + paramValue("param_value", "paramValue", "VARCHAR", false); + + private static final String BEGINNING_DELIMITER = "`"; + + private static final String ENDING_DELIMITER = "`"; + + private final String column; + + private final boolean isColumnNameDelimited; + + private final String javaProperty; + + private final String jdbcType; + + public String value() { + return this.column; + } + + public String getValue() { + return this.column; + } + + public String getJavaProperty() { + return this.javaProperty; + } + + public String getJdbcType() { + return this.jdbcType; + } + + Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) { + this.column = column; + this.javaProperty = javaProperty; + this.jdbcType = jdbcType; + this.isColumnNameDelimited = isColumnNameDelimited; + } + + public String desc() { + return this.getEscapedColumnName() + " DESC"; + } + + public String asc() { + return this.getEscapedColumnName() + " ASC"; + } + + public static Column[] excludes(Column ... excludes) { + ArrayList columns = new ArrayList<>(Arrays.asList(Column.values())); + if (excludes != null && excludes.length > 0) { + columns.removeAll(new ArrayList<>(Arrays.asList(excludes))); + } + return columns.toArray(new Column[]{}); + } + + public static Column[] all() { + return Column.values(); + } + + public String getEscapedColumnName() { + if (this.isColumnNameDelimited) { + return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString(); + } else { + return this.column; + } + } + + public String getAliasedEscapedColumnName() { + return this.getEscapedColumnName(); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OrganizationParameterExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OrganizationParameterExample.java new file mode 100644 index 0000000000..84fafe90cf --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OrganizationParameterExample.java @@ -0,0 +1,410 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class OrganizationParameterExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public OrganizationParameterExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andOrganizationIdIsNull() { + addCriterion("organization_id is null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNotNull() { + addCriterion("organization_id is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdEqualTo(String value) { + addCriterion("organization_id =", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotEqualTo(String value) { + addCriterion("organization_id <>", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThan(String value) { + addCriterion("organization_id >", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThanOrEqualTo(String value) { + addCriterion("organization_id >=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThan(String value) { + addCriterion("organization_id <", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThanOrEqualTo(String value) { + addCriterion("organization_id <=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLike(String value) { + addCriterion("organization_id like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotLike(String value) { + addCriterion("organization_id not like", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIn(List values) { + addCriterion("organization_id in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("organization_id not in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdBetween(String value1, String value2) { + addCriterion("organization_id between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotBetween(String value1, String value2) { + addCriterion("organization_id not between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andParamKeyIsNull() { + addCriterion("param_key is null"); + return (Criteria) this; + } + + public Criteria andParamKeyIsNotNull() { + addCriterion("param_key is not null"); + return (Criteria) this; + } + + public Criteria andParamKeyEqualTo(String value) { + addCriterion("param_key =", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyNotEqualTo(String value) { + addCriterion("param_key <>", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyGreaterThan(String value) { + addCriterion("param_key >", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyGreaterThanOrEqualTo(String value) { + addCriterion("param_key >=", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyLessThan(String value) { + addCriterion("param_key <", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyLessThanOrEqualTo(String value) { + addCriterion("param_key <=", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyLike(String value) { + addCriterion("param_key like", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyNotLike(String value) { + addCriterion("param_key not like", value, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyIn(List values) { + addCriterion("param_key in", values, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyNotIn(List values) { + addCriterion("param_key not in", values, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyBetween(String value1, String value2) { + addCriterion("param_key between", value1, value2, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamKeyNotBetween(String value1, String value2) { + addCriterion("param_key not between", value1, value2, "paramKey"); + return (Criteria) this; + } + + public Criteria andParamValueIsNull() { + addCriterion("param_value is null"); + return (Criteria) this; + } + + public Criteria andParamValueIsNotNull() { + addCriterion("param_value is not null"); + return (Criteria) this; + } + + public Criteria andParamValueEqualTo(String value) { + addCriterion("param_value =", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueNotEqualTo(String value) { + addCriterion("param_value <>", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueGreaterThan(String value) { + addCriterion("param_value >", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueGreaterThanOrEqualTo(String value) { + addCriterion("param_value >=", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueLessThan(String value) { + addCriterion("param_value <", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueLessThanOrEqualTo(String value) { + addCriterion("param_value <=", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueLike(String value) { + addCriterion("param_value like", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueNotLike(String value) { + addCriterion("param_value not like", value, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueIn(List values) { + addCriterion("param_value in", values, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueNotIn(List values) { + addCriterion("param_value not in", values, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueBetween(String value1, String value2) { + addCriterion("param_value between", value1, value2, "paramValue"); + return (Criteria) this; + } + + public Criteria andParamValueNotBetween(String value1, String value2) { + addCriterion("param_value not between", value1, value2, "paramValue"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Template.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Template.java index 57c573078e..749cbc0c35 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Template.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Template.java @@ -50,6 +50,13 @@ public class Template implements Serializable { @NotNull(message = "{template.enable_third_part.not_blank}", groups = {Created.class}) private Boolean enableThirdPart; + @Schema(description = "是否是默认模板", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "{template.enable_default.not_blank}", groups = {Created.class}) + private Boolean enableDefault; + + @Schema(description = "项目模板所关联的组织模板ID") + private String refId; + @Schema(description = "使用场景", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{template.scene.not_blank}", groups = {Created.class}) @Size(min = 1, max = 30, message = "{template.scene.length_range}", groups = {Created.class, Updated.class}) @@ -68,6 +75,8 @@ public class Template implements Serializable { scopeType("scope_type", "scopeType", "VARCHAR", false), scopeId("scope_id", "scopeId", "VARCHAR", false), enableThirdPart("enable_third_part", "enableThirdPart", "BIT", false), + enableDefault("enable_default", "enableDefault", "BIT", false), + refId("ref_id", "refId", "VARCHAR", false), scene("scene", "scene", "VARCHAR", false); private static final String BEGINNING_DELIMITER = "`"; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateExample.java index 3afd16ffe4..86d1d22ecd 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/TemplateExample.java @@ -764,6 +764,136 @@ public class TemplateExample { return (Criteria) this; } + public Criteria andEnableDefaultIsNull() { + addCriterion("enable_default is null"); + return (Criteria) this; + } + + public Criteria andEnableDefaultIsNotNull() { + addCriterion("enable_default is not null"); + return (Criteria) this; + } + + public Criteria andEnableDefaultEqualTo(Boolean value) { + addCriterion("enable_default =", value, "enableDefault"); + return (Criteria) this; + } + + public Criteria andEnableDefaultNotEqualTo(Boolean value) { + addCriterion("enable_default <>", value, "enableDefault"); + return (Criteria) this; + } + + public Criteria andEnableDefaultGreaterThan(Boolean value) { + addCriterion("enable_default >", value, "enableDefault"); + return (Criteria) this; + } + + public Criteria andEnableDefaultGreaterThanOrEqualTo(Boolean value) { + addCriterion("enable_default >=", value, "enableDefault"); + return (Criteria) this; + } + + public Criteria andEnableDefaultLessThan(Boolean value) { + addCriterion("enable_default <", value, "enableDefault"); + return (Criteria) this; + } + + public Criteria andEnableDefaultLessThanOrEqualTo(Boolean value) { + addCriterion("enable_default <=", value, "enableDefault"); + return (Criteria) this; + } + + public Criteria andEnableDefaultIn(List values) { + addCriterion("enable_default in", values, "enableDefault"); + return (Criteria) this; + } + + public Criteria andEnableDefaultNotIn(List values) { + addCriterion("enable_default not in", values, "enableDefault"); + return (Criteria) this; + } + + public Criteria andEnableDefaultBetween(Boolean value1, Boolean value2) { + addCriterion("enable_default between", value1, value2, "enableDefault"); + return (Criteria) this; + } + + public Criteria andEnableDefaultNotBetween(Boolean value1, Boolean value2) { + addCriterion("enable_default not between", value1, value2, "enableDefault"); + return (Criteria) this; + } + + public Criteria andRefIdIsNull() { + addCriterion("ref_id is null"); + return (Criteria) this; + } + + public Criteria andRefIdIsNotNull() { + addCriterion("ref_id is not null"); + return (Criteria) this; + } + + public Criteria andRefIdEqualTo(String value) { + addCriterion("ref_id =", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotEqualTo(String value) { + addCriterion("ref_id <>", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThan(String value) { + addCriterion("ref_id >", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThanOrEqualTo(String value) { + addCriterion("ref_id >=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThan(String value) { + addCriterion("ref_id <", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThanOrEqualTo(String value) { + addCriterion("ref_id <=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLike(String value) { + addCriterion("ref_id like", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotLike(String value) { + addCriterion("ref_id not like", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdIn(List values) { + addCriterion("ref_id in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotIn(List values) { + addCriterion("ref_id not in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdBetween(String value1, String value2) { + addCriterion("ref_id between", value1, value2, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotBetween(String value1, String value2) { + addCriterion("ref_id not between", value1, value2, "refId"); + return (Criteria) this; + } + public Criteria andSceneIsNull() { addCriterion("scene is null"); return (Criteria) this; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.xml index 43d443acc3..01696087c9 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/CustomFieldMapper.xml @@ -12,6 +12,8 @@ + + @@ -74,7 +76,7 @@ id, `name`, scene, `type`, remark, internal, scope_type, create_time, update_time, - create_user, scope_id + create_user, ref_id, enable_option_key, scope_id + select + + distinct + + + from organization_parameter + + + + + order by ${orderByClause} + + + + + delete from organization_parameter + where organization_id = #{organizationId,jdbcType=VARCHAR} + and param_key = #{paramKey,jdbcType=VARCHAR} + + + delete from organization_parameter + + + + + + insert into organization_parameter (organization_id, param_key, param_value + ) + values (#{organizationId,jdbcType=VARCHAR}, #{paramKey,jdbcType=VARCHAR}, #{paramValue,jdbcType=VARCHAR} + ) + + + insert into organization_parameter + + + organization_id, + + + param_key, + + + param_value, + + + + + #{organizationId,jdbcType=VARCHAR}, + + + #{paramKey,jdbcType=VARCHAR}, + + + #{paramValue,jdbcType=VARCHAR}, + + + + + + update organization_parameter + + + organization_id = #{record.organizationId,jdbcType=VARCHAR}, + + + param_key = #{record.paramKey,jdbcType=VARCHAR}, + + + param_value = #{record.paramValue,jdbcType=VARCHAR}, + + + + + + + + update organization_parameter + set organization_id = #{record.organizationId,jdbcType=VARCHAR}, + param_key = #{record.paramKey,jdbcType=VARCHAR}, + param_value = #{record.paramValue,jdbcType=VARCHAR} + + + + + + update organization_parameter + + + param_value = #{paramValue,jdbcType=VARCHAR}, + + + where organization_id = #{organizationId,jdbcType=VARCHAR} + and param_key = #{paramKey,jdbcType=VARCHAR} + + + update organization_parameter + set param_value = #{paramValue,jdbcType=VARCHAR} + where organization_id = #{organizationId,jdbcType=VARCHAR} + and param_key = #{paramKey,jdbcType=VARCHAR} + + + insert into organization_parameter + (organization_id, param_key, param_value) + values + + (#{item.organizationId,jdbcType=VARCHAR}, #{item.paramKey,jdbcType=VARCHAR}, #{item.paramValue,jdbcType=VARCHAR} + ) + + + + insert into organization_parameter ( + + ${column.escapedColumnName} + + ) + values + + ( + + + #{item.organizationId,jdbcType=VARCHAR} + + + #{item.paramKey,jdbcType=VARCHAR} + + + #{item.paramValue,jdbcType=VARCHAR} + + + ) + + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateMapper.xml index 8422057d13..311b8da9c1 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/TemplateMapper.xml @@ -12,6 +12,8 @@ + + @@ -74,7 +76,7 @@ id, `name`, remark, internal, update_time, create_time, create_user, scope_type, - scope_id, enable_third_part, scene + scope_id, enable_third_part, enable_default, ref_id, scene