diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/Project.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/Project.java index a0f3528edb..637db22bb0 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/Project.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/Project.java @@ -14,8 +14,8 @@ public class Project implements Serializable { private String id; @Schema(title = "工作空间ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{project.workspace_id.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 50, message = "{project.workspace_id.length_range}", groups = {Created.class, Updated.class}) + @NotBlank(message = "{project.organization_id.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 50, message = "{project.organization_id.length_range}", groups = {Created.class, Updated.class}) private String workspaceId; @Schema(title = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExample.java b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExample.java index 30d59e4926..af4b0ac3e0 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/project/domain/ProjectExample.java @@ -175,72 +175,72 @@ public class ProjectExample { } public Criteria andWorkspaceIdIsNull() { - addCriterion("workspace_id is null"); + addCriterion("organization_id is null"); return (Criteria) this; } public Criteria andWorkspaceIdIsNotNull() { - addCriterion("workspace_id is not null"); + addCriterion("organization_id is not null"); return (Criteria) this; } public Criteria andWorkspaceIdEqualTo(String value) { - addCriterion("workspace_id =", value, "workspaceId"); + addCriterion("organization_id =", value, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdNotEqualTo(String value) { - addCriterion("workspace_id <>", value, "workspaceId"); + addCriterion("organization_id <>", value, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdGreaterThan(String value) { - addCriterion("workspace_id >", value, "workspaceId"); + addCriterion("organization_id >", value, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { - addCriterion("workspace_id >=", value, "workspaceId"); + addCriterion("organization_id >=", value, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdLessThan(String value) { - addCriterion("workspace_id <", value, "workspaceId"); + addCriterion("organization_id <", value, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { - addCriterion("workspace_id <=", value, "workspaceId"); + addCriterion("organization_id <=", value, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdLike(String value) { - addCriterion("workspace_id like", value, "workspaceId"); + addCriterion("organization_id like", value, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdNotLike(String value) { - addCriterion("workspace_id not like", value, "workspaceId"); + addCriterion("organization_id not like", value, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdIn(List values) { - addCriterion("workspace_id in", values, "workspaceId"); + addCriterion("organization_id in", values, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdNotIn(List values) { - addCriterion("workspace_id not in", values, "workspaceId"); + addCriterion("organization_id not in", values, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdBetween(String value1, String value2) { - addCriterion("workspace_id between", value1, value2, "workspaceId"); + addCriterion("organization_id between", value1, value2, "workspaceId"); return (Criteria) this; } public Criteria andWorkspaceIdNotBetween(String value1, String value2) { - addCriterion("workspace_id not between", value1, value2, "workspaceId"); + addCriterion("organization_id not between", value1, value2, "workspaceId"); return (Criteria) this; } diff --git a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.xml index 54ef0068f5..54398ff08c 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/project/mapper/ProjectMapper.xml @@ -3,7 +3,7 @@ - + @@ -70,7 +70,7 @@ - id, workspace_id, `name`, description, create_time, update_time, create_user, system_id + id, organization_id, `name`, description, create_time, update_time, create_user, system_id select @@ -102,10 +102,10 @@ - insert into environment_group (id, `name`, workspace_id, + insert into environment_group (id, `name`, organization_id, description, create_user, create_time, update_time) - values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}) @@ -118,8 +118,8 @@ `name`, - - workspace_id, + + organization_id, description, @@ -141,8 +141,8 @@ #{name,jdbcType=VARCHAR}, - - #{workspaceId,jdbcType=VARCHAR}, + + #{organizationId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, @@ -173,8 +173,8 @@ `name` = #{record.name,jdbcType=VARCHAR}, - - workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + + organization_id = #{record.organizationId,jdbcType=VARCHAR}, description = #{record.description,jdbcType=VARCHAR}, @@ -197,7 +197,7 @@ update environment_group set id = #{record.id,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR}, - workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + organization_id = #{record.organizationId,jdbcType=VARCHAR}, description = #{record.description,jdbcType=VARCHAR}, create_user = #{record.createUser,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, @@ -212,8 +212,8 @@ `name` = #{name,jdbcType=VARCHAR}, - - workspace_id = #{workspaceId,jdbcType=VARCHAR}, + + organization_id = #{organizationId,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR}, @@ -233,7 +233,7 @@ update environment_group set `name` = #{name,jdbcType=VARCHAR}, - workspace_id = #{workspaceId,jdbcType=VARCHAR}, + organization_id = #{organizationId,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR}, create_user = #{createUser,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Organization.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Organization.java new file mode 100644 index 0000000000..cebb87bd7c --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Organization.java @@ -0,0 +1,34 @@ +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 lombok.Data; + +@Data +public class Organization implements Serializable { + @Schema(title = "工作空间ID", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{organization.id.not_blank}", groups = {Updated.class}) + @Size(min = 1, max = 50, message = "{organization.id.length_range}", groups = {Created.class, Updated.class}) + private String id; + + @Schema(title = "工作空间名称", requiredMode = Schema.RequiredMode.REQUIRED) + @NotBlank(message = "{organization.name.not_blank}", groups = {Created.class}) + @Size(min = 1, max = 100, message = "{organization.name.length_range}", groups = {Created.class, Updated.class}) + private String name; + + @Schema(title = "描述") + private String description; + + @Schema(title = "创建时间") + private Long createTime; + + @Schema(title = "更新时间") + private Long updateTime; + + @Schema(title = "创建人") + private String createUser; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/OrganizationExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OrganizationExample.java new file mode 100644 index 0000000000..f045a9d505 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/OrganizationExample.java @@ -0,0 +1,600 @@ +package io.metersphere.system.domain; + +import java.util.ArrayList; +import java.util.List; + +public class OrganizationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public OrganizationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(String value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(String value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(String value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(String value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(String value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(String value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLike(String value) { + addCriterion("id like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotLike(String value) { + addCriterion("id not like", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(String value1, String value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(String value1, String value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNull() { + addCriterion("create_user is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIsNotNull() { + addCriterion("create_user is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserEqualTo(String value) { + addCriterion("create_user =", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotEqualTo(String value) { + addCriterion("create_user <>", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThan(String value) { + addCriterion("create_user >", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserGreaterThanOrEqualTo(String value) { + addCriterion("create_user >=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThan(String value) { + addCriterion("create_user <", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLessThanOrEqualTo(String value) { + addCriterion("create_user <=", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserLike(String value) { + addCriterion("create_user like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotLike(String value) { + addCriterion("create_user not like", value, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserIn(List values) { + addCriterion("create_user in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotIn(List values) { + addCriterion("create_user not in", values, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserBetween(String value1, String value2) { + addCriterion("create_user between", value1, value2, "createUser"); + return (Criteria) this; + } + + public Criteria andCreateUserNotBetween(String value1, String value2) { + addCriterion("create_user not between", value1, value2, "createUser"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java index 745e54b240..20f07b2624 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Quota.java @@ -29,8 +29,8 @@ public class Quota implements Serializable { @Schema(title = "资源池列表") private String resourcePool; - @Schema(title = "工作空间ID") - private String workspaceId; + @Schema(title = "组织ID") + private String organizationId; @Schema(title = "是否使用默认值") private Boolean useDefault; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/QuotaExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/QuotaExample.java index 13e2673567..1a75b24eb4 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/QuotaExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/QuotaExample.java @@ -485,73 +485,73 @@ public class QuotaExample { return (Criteria) this; } - public Criteria andWorkspaceIdIsNull() { - addCriterion("workspace_id is null"); + public Criteria andOrganizationIdIsNull() { + addCriterion("organization_id is null"); return (Criteria) this; } - public Criteria andWorkspaceIdIsNotNull() { - addCriterion("workspace_id is not null"); + public Criteria andOrganizationIdIsNotNull() { + addCriterion("organization_id is not null"); return (Criteria) this; } - public Criteria andWorkspaceIdEqualTo(String value) { - addCriterion("workspace_id =", value, "workspaceId"); + public Criteria andOrganizationIdEqualTo(String value) { + addCriterion("organization_id =", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdNotEqualTo(String value) { - addCriterion("workspace_id <>", value, "workspaceId"); + public Criteria andOrganizationIdNotEqualTo(String value) { + addCriterion("organization_id <>", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdGreaterThan(String value) { - addCriterion("workspace_id >", value, "workspaceId"); + public Criteria andOrganizationIdGreaterThan(String value) { + addCriterion("organization_id >", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { - addCriterion("workspace_id >=", value, "workspaceId"); + public Criteria andOrganizationIdGreaterThanOrEqualTo(String value) { + addCriterion("organization_id >=", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdLessThan(String value) { - addCriterion("workspace_id <", value, "workspaceId"); + public Criteria andOrganizationIdLessThan(String value) { + addCriterion("organization_id <", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { - addCriterion("workspace_id <=", value, "workspaceId"); + public Criteria andOrganizationIdLessThanOrEqualTo(String value) { + addCriterion("organization_id <=", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdLike(String value) { - addCriterion("workspace_id like", value, "workspaceId"); + public Criteria andOrganizationIdLike(String value) { + addCriterion("organization_id like", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdNotLike(String value) { - addCriterion("workspace_id not like", value, "workspaceId"); + public Criteria andOrganizationIdNotLike(String value) { + addCriterion("organization_id not like", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdIn(List values) { - addCriterion("workspace_id in", values, "workspaceId"); + public Criteria andOrganizationIdIn(List values) { + addCriterion("organization_id in", values, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdNotIn(List values) { - addCriterion("workspace_id not in", values, "workspaceId"); + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("organization_id not in", values, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdBetween(String value1, String value2) { - addCriterion("workspace_id between", value1, value2, "workspaceId"); + public Criteria andOrganizationIdBetween(String value1, String value2) { + addCriterion("organization_id between", value1, value2, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdNotBetween(String value1, String value2) { - addCriterion("workspace_id not between", value1, value2, "workspaceId"); + public Criteria andOrganizationIdNotBetween(String value1, String value2) { + addCriterion("organization_id not between", value1, value2, "organizationId"); return (Criteria) this; } diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java index 426cf4cb0c..6101455965 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/Schedule.java @@ -21,7 +21,7 @@ public class Schedule implements Serializable { @Size(min = 1, max = 50, message = "{schedule.type.length_range}", groups = {Created.class, Updated.class}) private String type; - @Schema(title = "Schedule value", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "cron 表达式", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{schedule.value.not_blank}", groups = {Created.class}) @Size(min = 1, max = 255, message = "{schedule.value.length_range}", groups = {Created.class, Updated.class}) private String value; @@ -31,7 +31,7 @@ public class Schedule implements Serializable { @Size(min = 1, max = 64, message = "{schedule.job.length_range}", groups = {Created.class, Updated.class}) private String job; - @Schema(title = "Schedule Eable") + @Schema(title = "是否开启") private Boolean enable; @Schema(title = "") @@ -40,10 +40,10 @@ public class Schedule implements Serializable { @Schema(title = "创建人") private String createUser; - @Schema(title = "Create timestamp") + @Schema(title = "创建时间") private Long createTime; - @Schema(title = "Update timestamp") + @Schema(title = "更新时间") private Long updateTime; @Schema(title = "项目ID") diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java index 5132c051f1..3b23f6ad49 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegration.java @@ -18,8 +18,8 @@ public class ServiceIntegration implements Serializable { @Size(min = 1, max = 50, message = "{service_integration.platform.length_range}", groups = {Created.class, Updated.class}) private String platform; - @Schema(title = "工作空间ID") - private String workspaceId; + @Schema(title = "组织ID") + private String organizationId; @Schema(title = "", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "{service_integration.configuration.not_blank}", groups = {Created.class}) diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegrationExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegrationExample.java index d5ff61694e..d7ec827350 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegrationExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/ServiceIntegrationExample.java @@ -244,73 +244,73 @@ public class ServiceIntegrationExample { return (Criteria) this; } - public Criteria andWorkspaceIdIsNull() { - addCriterion("workspace_id is null"); + public Criteria andOrganizationIdIsNull() { + addCriterion("organization_id is null"); return (Criteria) this; } - public Criteria andWorkspaceIdIsNotNull() { - addCriterion("workspace_id is not null"); + public Criteria andOrganizationIdIsNotNull() { + addCriterion("organization_id is not null"); return (Criteria) this; } - public Criteria andWorkspaceIdEqualTo(String value) { - addCriterion("workspace_id =", value, "workspaceId"); + public Criteria andOrganizationIdEqualTo(String value) { + addCriterion("organization_id =", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdNotEqualTo(String value) { - addCriterion("workspace_id <>", value, "workspaceId"); + public Criteria andOrganizationIdNotEqualTo(String value) { + addCriterion("organization_id <>", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdGreaterThan(String value) { - addCriterion("workspace_id >", value, "workspaceId"); + public Criteria andOrganizationIdGreaterThan(String value) { + addCriterion("organization_id >", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { - addCriterion("workspace_id >=", value, "workspaceId"); + public Criteria andOrganizationIdGreaterThanOrEqualTo(String value) { + addCriterion("organization_id >=", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdLessThan(String value) { - addCriterion("workspace_id <", value, "workspaceId"); + public Criteria andOrganizationIdLessThan(String value) { + addCriterion("organization_id <", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { - addCriterion("workspace_id <=", value, "workspaceId"); + public Criteria andOrganizationIdLessThanOrEqualTo(String value) { + addCriterion("organization_id <=", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdLike(String value) { - addCriterion("workspace_id like", value, "workspaceId"); + public Criteria andOrganizationIdLike(String value) { + addCriterion("organization_id like", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdNotLike(String value) { - addCriterion("workspace_id not like", value, "workspaceId"); + public Criteria andOrganizationIdNotLike(String value) { + addCriterion("organization_id not like", value, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdIn(List values) { - addCriterion("workspace_id in", values, "workspaceId"); + public Criteria andOrganizationIdIn(List values) { + addCriterion("organization_id in", values, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdNotIn(List values) { - addCriterion("workspace_id not in", values, "workspaceId"); + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("organization_id not in", values, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdBetween(String value1, String value2) { - addCriterion("workspace_id between", value1, value2, "workspaceId"); + public Criteria andOrganizationIdBetween(String value1, String value2) { + addCriterion("organization_id between", value1, value2, "organizationId"); return (Criteria) this; } - public Criteria andWorkspaceIdNotBetween(String value1, String value2) { - addCriterion("workspace_id not between", value1, value2, "workspaceId"); + public Criteria andOrganizationIdNotBetween(String value1, String value2) { + addCriterion("organization_id not between", value1, value2, "organizationId"); return (Criteria) this; } } diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java index d8a3ed0165..5ab6f11b6e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/User.java @@ -40,8 +40,8 @@ public class User implements Serializable { @Schema(title = "语言") private String language; - @Schema(title = "当前工作空间ID") - private String lastWorkspaceId; + @Schema(title = "当前组织ID") + private String lastOrganizationId; @Schema(title = "手机号") private String phone; diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExample.java b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExample.java index 92cafae78e..69ea411050 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExample.java +++ b/backend/framework/domain/src/main/java/io/metersphere/system/domain/UserExample.java @@ -644,73 +644,73 @@ public class UserExample { return (Criteria) this; } - public Criteria andLastWorkspaceIdIsNull() { - addCriterion("last_workspace_id is null"); + public Criteria andLastOrganizationIdIsNull() { + addCriterion("last_organization_id is null"); return (Criteria) this; } - public Criteria andLastWorkspaceIdIsNotNull() { - addCriterion("last_workspace_id is not null"); + public Criteria andLastOrganizationIdIsNotNull() { + addCriterion("last_organization_id is not null"); return (Criteria) this; } - public Criteria andLastWorkspaceIdEqualTo(String value) { - addCriterion("last_workspace_id =", value, "lastWorkspaceId"); + public Criteria andLastOrganizationIdEqualTo(String value) { + addCriterion("last_organization_id =", value, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdNotEqualTo(String value) { - addCriterion("last_workspace_id <>", value, "lastWorkspaceId"); + public Criteria andLastOrganizationIdNotEqualTo(String value) { + addCriterion("last_organization_id <>", value, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdGreaterThan(String value) { - addCriterion("last_workspace_id >", value, "lastWorkspaceId"); + public Criteria andLastOrganizationIdGreaterThan(String value) { + addCriterion("last_organization_id >", value, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdGreaterThanOrEqualTo(String value) { - addCriterion("last_workspace_id >=", value, "lastWorkspaceId"); + public Criteria andLastOrganizationIdGreaterThanOrEqualTo(String value) { + addCriterion("last_organization_id >=", value, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdLessThan(String value) { - addCriterion("last_workspace_id <", value, "lastWorkspaceId"); + public Criteria andLastOrganizationIdLessThan(String value) { + addCriterion("last_organization_id <", value, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdLessThanOrEqualTo(String value) { - addCriterion("last_workspace_id <=", value, "lastWorkspaceId"); + public Criteria andLastOrganizationIdLessThanOrEqualTo(String value) { + addCriterion("last_organization_id <=", value, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdLike(String value) { - addCriterion("last_workspace_id like", value, "lastWorkspaceId"); + public Criteria andLastOrganizationIdLike(String value) { + addCriterion("last_organization_id like", value, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdNotLike(String value) { - addCriterion("last_workspace_id not like", value, "lastWorkspaceId"); + public Criteria andLastOrganizationIdNotLike(String value) { + addCriterion("last_organization_id not like", value, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdIn(List values) { - addCriterion("last_workspace_id in", values, "lastWorkspaceId"); + public Criteria andLastOrganizationIdIn(List values) { + addCriterion("last_organization_id in", values, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdNotIn(List values) { - addCriterion("last_workspace_id not in", values, "lastWorkspaceId"); + public Criteria andLastOrganizationIdNotIn(List values) { + addCriterion("last_organization_id not in", values, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdBetween(String value1, String value2) { - addCriterion("last_workspace_id between", value1, value2, "lastWorkspaceId"); + public Criteria andLastOrganizationIdBetween(String value1, String value2) { + addCriterion("last_organization_id between", value1, value2, "lastOrganizationId"); return (Criteria) this; } - public Criteria andLastWorkspaceIdNotBetween(String value1, String value2) { - addCriterion("last_workspace_id not between", value1, value2, "lastWorkspaceId"); + public Criteria andLastOrganizationIdNotBetween(String value1, String value2) { + addCriterion("last_organization_id not between", value1, value2, "lastOrganizationId"); return (Criteria) this; } diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OrganizationMapper.java b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OrganizationMapper.java new file mode 100644 index 0000000000..cfc09cdc72 --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OrganizationMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.system.mapper; + +import io.metersphere.system.domain.Organization; +import io.metersphere.system.domain.OrganizationExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface OrganizationMapper { + long countByExample(OrganizationExample example); + + int deleteByExample(OrganizationExample example); + + int deleteByPrimaryKey(String id); + + int insert(Organization record); + + int insertSelective(Organization record); + + List selectByExample(OrganizationExample example); + + Organization selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") Organization record, @Param("example") OrganizationExample example); + + int updateByExample(@Param("record") Organization record, @Param("example") OrganizationExample example); + + int updateByPrimaryKeySelective(Organization record); + + int updateByPrimaryKey(Organization record); +} \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OrganizationMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OrganizationMapper.xml new file mode 100644 index 0000000000..04391cfbba --- /dev/null +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/OrganizationMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, `name`, description, create_time, update_time, create_user + + + + + delete from organization + where id = #{id,jdbcType=VARCHAR} + + + delete from organization + + + + + + insert into organization (id, `name`, description, + create_time, update_time, create_user + ) + values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{createUser,jdbcType=VARCHAR} + ) + + + insert into organization + + + id, + + + `name`, + + + description, + + + create_time, + + + update_time, + + + create_user, + + + + + #{id,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{createUser,jdbcType=VARCHAR}, + + + + + + update organization + + + id = #{record.id,jdbcType=VARCHAR}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + create_user = #{record.createUser,jdbcType=VARCHAR}, + + + + + + + + update organization + set id = #{record.id,jdbcType=VARCHAR}, + `name` = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + create_user = #{record.createUser,jdbcType=VARCHAR} + + + + + + update organization + + + `name` = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + create_user = #{createUser,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update organization + set `name` = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + create_user = #{createUser,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.xml b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.xml index 84ccfc5975..cc6a0945d7 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.xml +++ b/backend/framework/domain/src/main/java/io/metersphere/system/mapper/QuotaMapper.xml @@ -8,7 +8,7 @@ - + @@ -76,7 +76,7 @@ - id, api, performance, max_threads, duration, resource_pool, workspace_id, use_default, + id, api, performance, max_threads, duration, resource_pool, organization_id, use_default, update_time, `member`, project, project_id, vum_total, vum_used @@ -111,12 +111,12 @@ insert into user (id, `name`, email, `password`, `status`, create_time, - update_time, `language`, last_workspace_id, + update_time, `language`, last_organization_id, phone, `source`, last_project_id, create_user) values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, - #{updateTime,jdbcType=BIGINT}, #{language,jdbcType=VARCHAR}, #{lastWorkspaceId,jdbcType=VARCHAR}, + #{updateTime,jdbcType=BIGINT}, #{language,jdbcType=VARCHAR}, #{lastOrganizationId,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{lastProjectId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}) @@ -147,8 +147,8 @@ `language`, - - last_workspace_id, + + last_organization_id, phone, @@ -188,8 +188,8 @@ #{language,jdbcType=VARCHAR}, - - #{lastWorkspaceId,jdbcType=VARCHAR}, + + #{lastOrganizationId,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, @@ -238,8 +238,8 @@ `language` = #{record.language,jdbcType=VARCHAR}, - - last_workspace_id = #{record.lastWorkspaceId,jdbcType=VARCHAR}, + + last_organization_id = #{record.lastOrganizationId,jdbcType=VARCHAR}, phone = #{record.phone,jdbcType=VARCHAR}, @@ -268,7 +268,7 @@ create_time = #{record.createTime,jdbcType=BIGINT}, update_time = #{record.updateTime,jdbcType=BIGINT}, `language` = #{record.language,jdbcType=VARCHAR}, - last_workspace_id = #{record.lastWorkspaceId,jdbcType=VARCHAR}, + last_organization_id = #{record.lastOrganizationId,jdbcType=VARCHAR}, phone = #{record.phone,jdbcType=VARCHAR}, `source` = #{record.source,jdbcType=VARCHAR}, last_project_id = #{record.lastProjectId,jdbcType=VARCHAR}, @@ -301,8 +301,8 @@ `language` = #{language,jdbcType=VARCHAR}, - - last_workspace_id = #{lastWorkspaceId,jdbcType=VARCHAR}, + + last_organization_id = #{lastOrganizationId,jdbcType=VARCHAR}, phone = #{phone,jdbcType=VARCHAR}, @@ -328,7 +328,7 @@ create_time = #{createTime,jdbcType=BIGINT}, update_time = #{updateTime,jdbcType=BIGINT}, `language` = #{language,jdbcType=VARCHAR}, - last_workspace_id = #{lastWorkspaceId,jdbcType=VARCHAR}, + last_organization_id = #{lastOrganizationId,jdbcType=VARCHAR}, phone = #{phone,jdbcType=VARCHAR}, `source` = #{source,jdbcType=VARCHAR}, last_project_id = #{lastProjectId,jdbcType=VARCHAR}, diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_11__system_ddl.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_11__system_ddl.sql index e09d39df9e..163ea424b1 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_11__system_ddl.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_11__system_ddl.sql @@ -204,23 +204,23 @@ CREATE TABLE IF NOT EXISTS `plugin` CREATE TABLE IF NOT EXISTS `quota` ( - `id` VARCHAR(50) NOT NULL, - `api` INT DEFAULT NULL COMMENT '接口数量', - `performance` INT DEFAULT NULL COMMENT '性能测试数量', - `max_threads` INT DEFAULT NULL COMMENT '最大并发数', - `duration` INT DEFAULT NULL COMMENT '最大执行时长', - `resource_pool` VARCHAR(1000) DEFAULT NULL COMMENT '资源池列表', - `workspace_id` VARCHAR(50) DEFAULT NULL COMMENT '工作空间ID', - `use_default` BIT(1) DEFAULT NULL COMMENT '是否使用默认值', - `update_time` BIGINT DEFAULT NULL COMMENT '更新时间', - `member` INT DEFAULT NULL COMMENT '成员数量限制', - `project` INT DEFAULT NULL COMMENT '项目数量限制', - `project_id` VARCHAR(50) DEFAULT NULL COMMENT '项目类型配额', - `vum_total` DECIMAL(10, 2) DEFAULT NULL COMMENT '总vum数', - `vum_used` DECIMAL(10, 2) DEFAULT NULL COMMENT '消耗的vum数', + `id` VARCHAR(50) NOT NULL, + `api` INT DEFAULT NULL COMMENT '接口数量', + `performance` INT DEFAULT NULL COMMENT '性能测试数量', + `max_threads` INT DEFAULT NULL COMMENT '最大并发数', + `duration` INT DEFAULT NULL COMMENT '最大执行时长', + `resource_pool` VARCHAR(1000) DEFAULT NULL COMMENT '资源池列表', + `organization_id` VARCHAR(50) DEFAULT NULL COMMENT '组织ID', + `use_default` BIT(1) DEFAULT NULL COMMENT '是否使用默认值', + `update_time` BIGINT DEFAULT NULL COMMENT '更新时间', + `member` INT DEFAULT NULL COMMENT '成员数量限制', + `project` INT DEFAULT NULL COMMENT '项目数量限制', + `project_id` VARCHAR(50) DEFAULT NULL COMMENT '项目类型配额', + `vum_total` DECIMAL(10, 2) DEFAULT NULL COMMENT '总vum数', + `vum_used` DECIMAL(10, 2) DEFAULT NULL COMMENT '消耗的vum数', PRIMARY KEY (`id`), KEY `idx_quota_project_id` (`project_id`), - KEY `idx_quota_workspace_id` (`workspace_id`) + KEY `idx_quota_organization_id` (`organization_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT ='配额'; @@ -242,7 +242,7 @@ CREATE TABLE IF NOT EXISTS `schedule` `create_time` BIGINT DEFAULT NULL COMMENT 'Create timestamp', `update_time` BIGINT DEFAULT NULL COMMENT 'Update timestamp', `project_id` VARCHAR(50) DEFAULT NULL COMMENT '项目ID', - `name` VARCHAR(100) DEFAULT NULL COMMENT '名称', + `name` VARCHAR(255) DEFAULT NULL COMMENT '名称', `config` VARCHAR(1000) DEFAULT NULL COMMENT '配置', PRIMARY KEY (`id`), KEY `idx_resource_id` (`resource_id`), @@ -263,12 +263,12 @@ CREATE TABLE IF NOT EXISTS `schedule` CREATE TABLE IF NOT EXISTS `service_integration` ( - `id` VARCHAR(50) NOT NULL, - `platform` VARCHAR(50) NOT NULL COMMENT '平台', - `configuration` BLOB NOT NULL, - `workspace_id` VARCHAR(50) DEFAULT NULL COMMENT '工作空间ID', + `id` VARCHAR(50) NOT NULL, + `platform` VARCHAR(50) NOT NULL COMMENT '平台', + `configuration` BLOB NOT NULL, + `organization_id` VARCHAR(50) DEFAULT NULL COMMENT '组织ID', PRIMARY KEY (`id`), - KEY `idx_workspace_id` (`workspace_id`) + KEY `idx_organization_id` (`organization_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT ='服务集成'; @@ -344,25 +344,25 @@ CREATE TABLE IF NOT EXISTS `test_resource_pool` CREATE TABLE IF NOT EXISTS `user` ( - `id` VARCHAR(50) NOT NULL COMMENT '用户ID', - `name` VARCHAR(255) NOT NULL COMMENT '用户名', - `email` VARCHAR(64) NOT NULL COMMENT '用户邮箱', - `password` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户密码', - `status` VARCHAR(50) NOT NULL COMMENT '用户状态,启用或禁用', - `create_time` BIGINT NOT NULL COMMENT '创建时间', - `update_time` BIGINT NOT NULL COMMENT '更新时间', - `language` VARCHAR(30) DEFAULT NULL COMMENT '语言', - `last_workspace_id` VARCHAR(50) DEFAULT NULL COMMENT '当前工作空间ID', - `phone` VARCHAR(50) DEFAULT NULL COMMENT '手机号', - `source` VARCHAR(50) NOT NULL COMMENT '来源:LOCAL OIDC CAS', - `last_project_id` VARCHAR(50) DEFAULT NULL COMMENT '当前项目ID', - `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', + `id` VARCHAR(50) NOT NULL COMMENT '用户ID', + `name` VARCHAR(255) NOT NULL COMMENT '用户名', + `email` VARCHAR(64) NOT NULL COMMENT '用户邮箱', + `password` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '用户密码', + `status` VARCHAR(50) NOT NULL COMMENT '用户状态,启用或禁用', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `update_time` BIGINT NOT NULL COMMENT '更新时间', + `language` VARCHAR(30) DEFAULT NULL COMMENT '语言', + `last_organization_id` VARCHAR(50) DEFAULT NULL COMMENT '当前组织ID', + `phone` VARCHAR(50) DEFAULT NULL COMMENT '手机号', + `source` VARCHAR(50) NOT NULL COMMENT '来源:LOCAL OIDC CAS', + `last_project_id` VARCHAR(50) DEFAULT NULL COMMENT '当前项目ID', + `create_user` VARCHAR(50) NOT NULL COMMENT '创建人', PRIMARY KEY (`id`), KEY `idx_name` (`name`), KEY `idx_email` (`email`), KEY `idx_create_time` (`create_time`), KEY `idx_update_time` (`update_time`), - KEY `idx_workspace_id` (`last_workspace_id`), + KEY `idx_organization_id` (`last_organization_id`), KEY `idx_project_id` (`last_project_id`), KEY `idx_create_user` (`create_user`) ) ENGINE = InnoDB @@ -378,7 +378,7 @@ CREATE TABLE IF NOT EXISTS `user_role_relation` `id` VARCHAR(50) NOT NULL COMMENT '用户组关系ID', `user_id` VARCHAR(50) NOT NULL COMMENT '用户ID', `role_id` VARCHAR(50) NOT NULL COMMENT '组ID', - `source_id` VARCHAR(50) NOT NULL COMMENT '工作空间或项目ID', + `source_id` VARCHAR(50) NOT NULL COMMENT '组织或项目ID', `create_time` BIGINT NOT NULL COMMENT '创建时间', `update_time` BIGINT NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`), @@ -428,13 +428,13 @@ CREATE TABLE IF NOT EXISTS `user_key` COLLATE = utf8mb4_general_ci COMMENT ='用户api key'; -- --- Table structure for table `workspace` +-- Table structure for table `organization` -- -CREATE TABLE IF NOT EXISTS `workspace` +CREATE TABLE IF NOT EXISTS `organization` ( - `id` VARCHAR(50) NOT NULL COMMENT '工作空间ID', - `name` VARCHAR(100) NOT NULL COMMENT '工作空间名称', + `id` VARCHAR(50) NOT NULL COMMENT '组织ID', + `name` VARCHAR(255) NOT NULL COMMENT '组织名称', `description` VARCHAR(500) DEFAULT NULL COMMENT '描述', `create_time` BIGINT NOT NULL COMMENT '创建时间', `update_time` BIGINT NOT NULL COMMENT '更新时间', @@ -446,7 +446,7 @@ CREATE TABLE IF NOT EXISTS `workspace` KEY `idx_update_time` (`update_time`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_general_ci COMMENT ='工作空间'; + COLLATE = utf8mb4_general_ci COMMENT ='组织'; -- -- Table structure for table `user_extend` diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_4__project_ddl.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_4__project_ddl.sql index 362e3ad8fb..d81eb77332 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_4__project_ddl.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_4__project_ddl.sql @@ -177,16 +177,16 @@ CREATE TABLE IF NOT EXISTS `file_module` CREATE TABLE IF NOT EXISTS `project` ( - `id` VARCHAR(50) NOT NULL COMMENT '项目ID', - `workspace_id` VARCHAR(50) NOT NULL COMMENT '工作空间ID', - `name` VARCHAR(255) NOT NULL COMMENT '项目名称', - `description` VARCHAR(500) DEFAULT NULL COMMENT '项目描述', - `create_time` BIGINT NOT NULL COMMENT '创建时间', - `update_time` BIGINT NOT NULL COMMENT '更新时间', - `create_user` VARCHAR(50) DEFAULT NULL COMMENT '创建人', - `system_id` VARCHAR(50) DEFAULT NULL, + `id` VARCHAR(50) NOT NULL COMMENT '项目ID', + `organization_id` VARCHAR(50) NOT NULL COMMENT '组织ID', + `name` VARCHAR(255) NOT NULL COMMENT '项目名称', + `description` VARCHAR(500) DEFAULT NULL COMMENT '项目描述', + `create_time` BIGINT NOT NULL COMMENT '创建时间', + `update_time` BIGINT NOT NULL COMMENT '更新时间', + `create_user` VARCHAR(50) DEFAULT NULL COMMENT '创建人', + `system_id` VARCHAR(50) DEFAULT NULL, PRIMARY KEY (`id`), - KEY `idx_workspace_id` (`workspace_id`), + KEY `idx_organization_id` (`organization_id`), KEY `idx_create_user` (`create_user`), KEY `idx_create_time` (`create_time`), KEY `idex_update_time` (`update_time`), diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/dml/V3.0.0_11_1__data.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/dml/V3.0.0_11_1__data.sql index ae17202763..30c1105f46 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/dml/V3.0.0_11_1__data.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/dml/V3.0.0_11_1__data.sql @@ -1,13 +1,13 @@ -- set innodb lock wait timeout SET SESSION innodb_lock_wait_timeout = 7200; --- 初始化工作空间 -INSERT INTO workspace (id, name, description, create_user, create_time, update_time) VALUES (uuid(), '默认工作空间', '系统默认创建的工作空间', 'admin', unix_timestamp() * 1000, unix_timestamp() * 1000); +-- 初始化组织 +INSERT INTO organization (id, name, description, create_user, create_time, update_time) VALUES (uuid(), '默认组织', '系统默认创建的组织', 'admin', unix_timestamp() * 1000, unix_timestamp() * 1000); -- 初始化项目 -INSERT INTO project (id, workspace_id, name, description, create_user, create_time, update_time) VALUES (uuid(), (SELECT id FROM workspace WHERE name LIKE '默认工作空间'), '默认项目', '系统默认创建的项目', 'admin', unix_timestamp() * 1000, unix_timestamp() * 1000); +INSERT INTO project (id, organization_id, name, description, create_user, create_time, update_time) VALUES (uuid(), (SELECT id FROM organization WHERE name LIKE '默认组织'), '默认项目', '系统默认创建的项目', 'admin', unix_timestamp() * 1000, unix_timestamp() * 1000); -- 初始化用户 -insert into user(id, name, email, password, status, create_time, update_time, language, last_workspace_id, phone, source, last_project_id, create_user) +insert into user(id, name, email, password, status, create_time, update_time, language, last_organization_id, phone, source, last_project_id, create_user) VALUES ('admin', 'Administrator', 'admin@metersphere.io', MD5('metersphere'), '1', UNIX_TIMESTAMP() * 1000, UNIX_TIMESTAMP() * 1000, NULL, NUll, '', 'LOCAL', NULL, 'admin'); -- 初始化用户组 @@ -15,9 +15,9 @@ INSERT INTO user_role (id, name, description, `system`, type, create_time, updat INSERT INTO user_role (id, name, description, `system`, type, create_time, update_time, create_user, scope_id) VALUES ('project_admin', '项目管理员(系统)', '项目管理员', 1, 'PROJECT', 1620674220004, 1620674220000, 'admin', 'global'); INSERT INTO user_role (id, name, description, `system`, type, create_time, update_time, create_user, scope_id) VALUES ('project_member', '项目成员(系统)', '项目成员', 1, 'PROJECT', 1620674220005, 1620674220000, 'admin', 'global'); INSERT INTO user_role (id, name, description, `system`, type, create_time, update_time, create_user, scope_id) VALUES ('read_only', '只读用户(系统)', '只读用户', 1, 'PROJECT', 1620674220006, 1620674220000, 'admin', 'global'); -INSERT INTO user_role (id, name, description, `system`, type, create_time, update_time, create_user, scope_id) VALUES ('super', '超级管理员(系统)', '拥有系统全部工作空间以及项目的操作权限', 1, 'SYSTEM', 1671008474000, 1671008474000, 'admin', 'system'); -INSERT INTO user_role (id, name, description, `system`, type, create_time, update_time, create_user, scope_id) VALUES ('ws_admin', '工作空间管理员(系统)', '工作空间管理员', 1, 'WORKSPACE', 1620674220007, 1620674220000, 'admin', 'global'); -INSERT INTO user_role (id, name, description, `system`, type, create_time, update_time, create_user, scope_id) VALUES ('ws_member', '工作空间成员(系统)', '工作空间成员', 1, 'WORKSPACE', 1620674220008, 1620674220000, 'admin', 'global'); +INSERT INTO user_role (id, name, description, `system`, type, create_time, update_time, create_user, scope_id) VALUES ('super', '超级管理员(系统)', '拥有系统全部组织以及项目的操作权限', 1, 'SYSTEM', 1671008474000, 1671008474000, 'admin', 'system'); +INSERT INTO user_role (id, name, description, `system`, type, create_time, update_time, create_user, scope_id) VALUES ('org_admin', '组织管理员(系统)', '组织管理员', 1, 'ORGANIZATION', 1620674220007, 1620674220000, 'admin', 'global'); +INSERT INTO user_role (id, name, description, `system`, type, create_time, update_time, create_user, scope_id) VALUES ('org_member', '组织成员(系统)', '组织成员', 1, 'ORGANIZATION', 1620674220008, 1620674220000, 'admin', 'global'); -- 初始化用户和组的关系 INSERT INTO user_role_relation (id, user_id, role_id, source_id, create_time, update_time) VALUES ('c3bb9b4f-46d8-4952-9681-8889974487d1', 'admin', 'super', 'system', 1684747668375, 1684747668375); @@ -59,54 +59,54 @@ INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('15bfd321-d812-46e5-a98f-3220e9515ad6', 'admin', 'PERSONAL_INFORMATION:READ+UI_SETTING', 'PERSONAL_INFORMATION'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('152ead91-a672-4753-904c-815a8d4602a3', 'admin', 'SYSTEM_ROLE:READ+DELETE', 'SYSTEM_ROLE'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('03a829ec-0306-4d92-9a4f-b451dc01617d', 'admin', 'SYSTEM_ROLE:READ+ADD', 'SYSTEM_ROLE'); --- 工作空间管理员权限 -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2ef69c80-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+DELETE_USER', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2ef68cda-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+ADD_USER', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2ef67aba-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+UPDATE_USER', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2eb8cdb1-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_QUOTA:READ+UPDATE', 'WORKSPACE_QUOTA'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2eb8bc41-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_QUOTA:READ', 'WORKSPACE_QUOTA'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2dde1a80-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'PERSONAL_INFORMATION:READ+UPDATE_PASSWORD', 'PERSONAL_INFORMATION'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2dde1a2e-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'PERSONAL_INFORMATION:READ+API_KEYS', 'PERSONAL_INFORMATION'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2dde19c9-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'PERSONAL_INFORMATION:READ+THIRD_ACCOUNT', 'PERSONAL_INFORMATION'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2dde18f5-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'PERSONAL_INFORMATION:READ+UPDATE', 'PERSONAL_INFORMATION'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2d140aab-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+DELETE_GROUP', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2d13f889-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+COPY_GROUP', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2d13e8c8-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+UPDATE_GROUP', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2d13d1c8-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+CREATE_GROUP', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2cea1857-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+UPLOAD_JAR', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caf4318-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_MESSAGE:READ+UPDATE', 'WORKSPACE_MESSAGE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caf15cd-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_MESSAGE:READ', 'WORKSPACE_MESSAGE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caf0246-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_SERVICE:READ+UPDATE', 'WORKSPACE_SERVICE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caed957-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_SERVICE:READ', 'WORKSPACE_SERVICE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b817d1d-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_OPERATING_LOG'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b816897-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+DELETE', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81585a-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+UPDATE', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b8146ea-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+EXPORT', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b812d70-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+IMPORT', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b811ba3-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+ADD', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b810b30-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+COPY', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80fb44-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80e844-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+UPDATE', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80d69a-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+DELETE', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80c5fe-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+ADD', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80b588-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80a580-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_TEMPLATE:READ+CASE_TEMPLATE', 'WORKSPACE_TEMPLATE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b8091ab-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_TEMPLATE:READ+ISSUE_TEMPLATE', 'WORKSPACE_TEMPLATE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b8081e3-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_TEMPLATE:READ', 'WORKSPACE_TEMPLATE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b806fbf-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_USER:READ+UPDATE', 'WORKSPACE_USER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80601c-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_USER:READ+DELETE', 'WORKSPACE_USER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b805052-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_USER:READ', 'WORKSPACE_USER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b802f2a-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_TEMPLATE:READ+CUSTOM', 'WORKSPACE_TEMPLATE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b801d1f-3bc6-11ed-9680-0242ac130008', 'ws_admin', 'WORKSPACE_USER:READ+ADD', 'WORKSPACE_USER'); --- 工作空间成员权限 -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2cea2a4c-3bc6-11ed-9680-0242ac130008', 'ws_member', 'WORKSPACE_PROJECT_MANAGER:READ+UPLOAD_JAR', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caf28b0-3bc6-11ed-9680-0242ac130008', 'ws_member', 'WORKSPACE_MESSAGE:READ', 'WORKSPACE_MESSAGE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caeef78-3bc6-11ed-9680-0242ac130008', 'ws_member', 'WORKSPACE_SERVICE:READ', 'WORKSPACE_SERVICE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81d869-3bc6-11ed-9680-0242ac130008', 'ws_member', 'WORKSPACE_OPERATING_LOG:READ', 'WORKSPACE_OPERATING_LOG'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81c48b-3bc6-11ed-9680-0242ac130008', 'ws_member', 'WORKSPACE_PROJECT_MANAGER:READ', 'WORKSPACE_PROJECT_MANAGER'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81b3ae-3bc6-11ed-9680-0242ac130008', 'ws_member', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_PROJECT_ENVIRONMENT'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81a16c-3bc6-11ed-9680-0242ac130008', 'ws_member', 'WORKSPACE_TEMPLATE:READ', 'WORKSPACE_TEMPLATE'); -INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b818ee7-3bc6-11ed-9680-0242ac130008', 'ws_member', 'WORKSPACE_USER:READ', 'WORKSPACE_USER'); +-- 组织管理员权限 +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2ef69c80-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_MANAGER:READ+DELETE_USER', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2ef68cda-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_MANAGER:READ+ADD_USER', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2ef67aba-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_MANAGER:READ+UPDATE_USER', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2eb8cdb1-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_QUOTA:READ+UPDATE', 'ORGANIZATION_QUOTA'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2eb8bc41-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_QUOTA:READ', 'ORGANIZATION_QUOTA'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2dde1a80-3bc6-11ed-9680-0242ac130008', 'org_admin', 'PERSONAL_INFORMATION:READ+UPDATE_PASSWORD', 'PERSONAL_INFORMATION'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2dde1a2e-3bc6-11ed-9680-0242ac130008', 'org_admin', 'PERSONAL_INFORMATION:READ+API_KEYS', 'PERSONAL_INFORMATION'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2dde19c9-3bc6-11ed-9680-0242ac130008', 'org_admin', 'PERSONAL_INFORMATION:READ+THIRD_ACCOUNT', 'PERSONAL_INFORMATION'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2dde18f5-3bc6-11ed-9680-0242ac130008', 'org_admin', 'PERSONAL_INFORMATION:READ+UPDATE', 'PERSONAL_INFORMATION'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2d140aab-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+DELETE_GROUP', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2d13f889-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+COPY_GROUP', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2d13e8c8-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+UPDATE_GROUP', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2d13d1c8-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+CREATE_GROUP', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2cea1857-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_MANAGER:READ+UPLOAD_JAR', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caf4318-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_MESSAGE:READ+UPDATE', 'ORGANIZATION_MESSAGE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caf15cd-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_MESSAGE:READ', 'ORGANIZATION_MESSAGE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caf0246-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_SERVICE:READ+UPDATE', 'ORGANIZATION_SERVICE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caed957-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_SERVICE:READ', 'ORGANIZATION_SERVICE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b817d1d-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_OPERATING_LOG:READ', 'ORGANIZATION_OPERATING_LOG'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b816897-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+DELETE', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81585a-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+UPDATE', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b8146ea-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+EXPORT', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b812d70-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+IMPORT', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b811ba3-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+ADD', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b810b30-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ+COPY', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80fb44-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80e844-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_MANAGER:READ+UPDATE', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80d69a-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_MANAGER:READ+DELETE', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80c5fe-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_MANAGER:READ+ADD', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80b588-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_PROJECT_MANAGER:READ', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80a580-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_TEMPLATE:READ+CASE_TEMPLATE', 'ORGANIZATION_TEMPLATE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b8091ab-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_TEMPLATE:READ+ISSUE_TEMPLATE', 'ORGANIZATION_TEMPLATE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b8081e3-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_TEMPLATE:READ', 'ORGANIZATION_TEMPLATE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b806fbf-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_USER:READ+UPDATE', 'ORGANIZATION_USER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b80601c-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_USER:READ+DELETE', 'ORGANIZATION_USER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b805052-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_USER:READ', 'ORGANIZATION_USER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b802f2a-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_TEMPLATE:READ+CUSTOM', 'ORGANIZATION_TEMPLATE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b801d1f-3bc6-11ed-9680-0242ac130008', 'org_admin', 'ORGANIZATION_USER:READ+ADD', 'ORGANIZATION_USER'); +-- 组织成员权限 +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2cea2a4c-3bc6-11ed-9680-0242ac130008', 'org_member', 'ORGANIZATION_PROJECT_MANAGER:READ+UPLOAD_JAR', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caf28b0-3bc6-11ed-9680-0242ac130008', 'org_member', 'ORGANIZATION_MESSAGE:READ', 'ORGANIZATION_MESSAGE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2caeef78-3bc6-11ed-9680-0242ac130008', 'org_member', 'ORGANIZATION_SERVICE:READ', 'ORGANIZATION_SERVICE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81d869-3bc6-11ed-9680-0242ac130008', 'org_member', 'ORGANIZATION_OPERATING_LOG:READ', 'ORGANIZATION_OPERATING_LOG'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81c48b-3bc6-11ed-9680-0242ac130008', 'org_member', 'ORGANIZATION_PROJECT_MANAGER:READ', 'ORGANIZATION_PROJECT_MANAGER'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81b3ae-3bc6-11ed-9680-0242ac130008', 'org_member', 'ORGANIZATION_PROJECT_ENVIRONMENT:READ', 'ORGANIZATION_PROJECT_ENVIRONMENT'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b81a16c-3bc6-11ed-9680-0242ac130008', 'org_member', 'ORGANIZATION_TEMPLATE:READ', 'ORGANIZATION_TEMPLATE'); +INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b818ee7-3bc6-11ed-9680-0242ac130008', 'org_member', 'ORGANIZATION_USER:READ', 'ORGANIZATION_USER'); -- set innodb lock wait timeout to default diff --git a/backend/framework/domain/src/main/resources/systemGeneratorConfig.xml b/backend/framework/domain/src/main/resources/systemGeneratorConfig.xml index a216518d6b..1059b441a4 100644 --- a/backend/framework/domain/src/main/resources/systemGeneratorConfig.xml +++ b/backend/framework/domain/src/main/resources/systemGeneratorConfig.xml @@ -90,7 +90,7 @@
-
+