build: workspace 改成 organization

This commit is contained in:
CaptainB 2023-06-07 17:27:17 +08:00 committed by 刘瑞斌
parent 7c043382ca
commit df3229b5cd
24 changed files with 238 additions and 1153 deletions

View File

@ -13,10 +13,10 @@ public class Project implements Serializable {
@Size(min = 1, max = 50, message = "{project.id.length_range}", groups = {Created.class, Updated.class}) @Size(min = 1, max = 50, message = "{project.id.length_range}", groups = {Created.class, Updated.class})
private String id; private String id;
@Schema(title = "工作空间ID", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{project.organization_id.not_blank}", groups = {Created.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}) @Size(min = 1, max = 50, message = "{project.organization_id.length_range}", groups = {Created.class, Updated.class})
private String workspaceId; private String organizationId;
@Schema(title = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(title = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{project.name.not_blank}", groups = {Created.class}) @NotBlank(message = "{project.name.not_blank}", groups = {Created.class})

View File

@ -174,73 +174,73 @@ public class ProjectExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdIsNull() { public Criteria andOrganizationIdIsNull() {
addCriterion("organization_id is null"); addCriterion("organization_id is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdIsNotNull() { public Criteria andOrganizationIdIsNotNull() {
addCriterion("organization_id is not null"); addCriterion("organization_id is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdEqualTo(String value) { public Criteria andOrganizationIdEqualTo(String value) {
addCriterion("organization_id =", value, "workspaceId"); addCriterion("organization_id =", value, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdNotEqualTo(String value) { public Criteria andOrganizationIdNotEqualTo(String value) {
addCriterion("organization_id <>", value, "workspaceId"); addCriterion("organization_id <>", value, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdGreaterThan(String value) { public Criteria andOrganizationIdGreaterThan(String value) {
addCriterion("organization_id >", value, "workspaceId"); addCriterion("organization_id >", value, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { public Criteria andOrganizationIdGreaterThanOrEqualTo(String value) {
addCriterion("organization_id >=", value, "workspaceId"); addCriterion("organization_id >=", value, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdLessThan(String value) { public Criteria andOrganizationIdLessThan(String value) {
addCriterion("organization_id <", value, "workspaceId"); addCriterion("organization_id <", value, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { public Criteria andOrganizationIdLessThanOrEqualTo(String value) {
addCriterion("organization_id <=", value, "workspaceId"); addCriterion("organization_id <=", value, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdLike(String value) { public Criteria andOrganizationIdLike(String value) {
addCriterion("organization_id like", value, "workspaceId"); addCriterion("organization_id like", value, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdNotLike(String value) { public Criteria andOrganizationIdNotLike(String value) {
addCriterion("organization_id not like", value, "workspaceId"); addCriterion("organization_id not like", value, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdIn(List<String> values) { public Criteria andOrganizationIdIn(List<String> values) {
addCriterion("organization_id in", values, "workspaceId"); addCriterion("organization_id in", values, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdNotIn(List<String> values) { public Criteria andOrganizationIdNotIn(List<String> values) {
addCriterion("organization_id not in", values, "workspaceId"); addCriterion("organization_id not in", values, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdBetween(String value1, String value2) { public Criteria andOrganizationIdBetween(String value1, String value2) {
addCriterion("organization_id between", value1, value2, "workspaceId"); addCriterion("organization_id between", value1, value2, "organizationId");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andWorkspaceIdNotBetween(String value1, String value2) { public Criteria andOrganizationIdNotBetween(String value1, String value2) {
addCriterion("organization_id not between", value1, value2, "workspaceId"); addCriterion("organization_id not between", value1, value2, "organizationId");
return (Criteria) this; return (Criteria) this;
} }

View File

@ -43,10 +43,10 @@ public class ProjectExtend implements Serializable {
private Boolean versionEnable; private Boolean versionEnable;
@Schema(title = "") @Schema(title = "")
private String issueConfig; private String apiTemplateId;
@Schema(title = "") @Schema(title = "")
private String apiTemplateId; private byte[] issueConfig;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -784,76 +784,6 @@ public class ProjectExtendExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIssueConfigIsNull() {
addCriterion("issue_config is null");
return (Criteria) this;
}
public Criteria andIssueConfigIsNotNull() {
addCriterion("issue_config is not null");
return (Criteria) this;
}
public Criteria andIssueConfigEqualTo(String value) {
addCriterion("issue_config =", value, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigNotEqualTo(String value) {
addCriterion("issue_config <>", value, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigGreaterThan(String value) {
addCriterion("issue_config >", value, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigGreaterThanOrEqualTo(String value) {
addCriterion("issue_config >=", value, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigLessThan(String value) {
addCriterion("issue_config <", value, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigLessThanOrEqualTo(String value) {
addCriterion("issue_config <=", value, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigLike(String value) {
addCriterion("issue_config like", value, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigNotLike(String value) {
addCriterion("issue_config not like", value, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigIn(List<String> values) {
addCriterion("issue_config in", values, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigNotIn(List<String> values) {
addCriterion("issue_config not in", values, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigBetween(String value1, String value2) {
addCriterion("issue_config between", value1, value2, "issueConfig");
return (Criteria) this;
}
public Criteria andIssueConfigNotBetween(String value1, String value2) {
addCriterion("issue_config not between", value1, value2, "issueConfig");
return (Criteria) this;
}
public Criteria andApiTemplateIdIsNull() { public Criteria andApiTemplateIdIsNull() {
addCriterion("api_template_id is null"); addCriterion("api_template_id is null");
return (Criteria) this; return (Criteria) this;

View File

@ -16,15 +16,21 @@ public interface ProjectExtendMapper {
int insertSelective(ProjectExtend record); int insertSelective(ProjectExtend record);
List<ProjectExtend> selectByExampleWithBLOBs(ProjectExtendExample example);
List<ProjectExtend> selectByExample(ProjectExtendExample example); List<ProjectExtend> selectByExample(ProjectExtendExample example);
ProjectExtend selectByPrimaryKey(String id); ProjectExtend selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") ProjectExtend record, @Param("example") ProjectExtendExample example); int updateByExampleSelective(@Param("record") ProjectExtend record, @Param("example") ProjectExtendExample example);
int updateByExampleWithBLOBs(@Param("record") ProjectExtend record, @Param("example") ProjectExtendExample example);
int updateByExample(@Param("record") ProjectExtend record, @Param("example") ProjectExtendExample example); int updateByExample(@Param("record") ProjectExtend record, @Param("example") ProjectExtendExample example);
int updateByPrimaryKeySelective(ProjectExtend record); int updateByPrimaryKeySelective(ProjectExtend record);
int updateByPrimaryKeyWithBLOBs(ProjectExtend record);
int updateByPrimaryKey(ProjectExtend record); int updateByPrimaryKey(ProjectExtend record);
} }

View File

@ -12,9 +12,11 @@
<result column="platform" jdbcType="VARCHAR" property="platform" /> <result column="platform" jdbcType="VARCHAR" property="platform" />
<result column="third_part_template" jdbcType="BIT" property="thirdPartTemplate" /> <result column="third_part_template" jdbcType="BIT" property="thirdPartTemplate" />
<result column="version_enable" jdbcType="BIT" property="versionEnable" /> <result column="version_enable" jdbcType="BIT" property="versionEnable" />
<result column="issue_config" jdbcType="VARCHAR" property="issueConfig" />
<result column="api_template_id" jdbcType="VARCHAR" property="apiTemplateId" /> <result column="api_template_id" jdbcType="VARCHAR" property="apiTemplateId" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.project.domain.ProjectExtend">
<result column="issue_config" jdbcType="LONGVARBINARY" property="issueConfig" />
</resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
<foreach collection="oredCriteria" item="criteria" separator="or"> <foreach collection="oredCriteria" item="criteria" separator="or">
@ -75,8 +77,27 @@
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, tapd_id, jira_key, zentao_id, azure_devops_id, case_template_id, azure_filter_id, id, tapd_id, jira_key, zentao_id, azure_devops_id, case_template_id, azure_filter_id,
platform, third_part_template, version_enable, issue_config, api_template_id platform, third_part_template, version_enable, api_template_id
</sql> </sql>
<sql id="Blob_Column_List">
issue_config
</sql>
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.project.domain.ProjectExtendExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from project_extend
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="io.metersphere.project.domain.ProjectExtendExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="io.metersphere.project.domain.ProjectExtendExample" resultMap="BaseResultMap">
select select
<if test="distinct"> <if test="distinct">
@ -91,9 +112,11 @@
order by ${orderByClause} order by ${orderByClause}
</if> </if>
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from project_extend from project_extend
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</select> </select>
@ -111,12 +134,12 @@
insert into project_extend (id, tapd_id, jira_key, insert into project_extend (id, tapd_id, jira_key,
zentao_id, azure_devops_id, case_template_id, zentao_id, azure_devops_id, case_template_id,
azure_filter_id, platform, third_part_template, azure_filter_id, platform, third_part_template,
version_enable, issue_config, api_template_id version_enable, api_template_id, issue_config
) )
values (#{id,jdbcType=VARCHAR}, #{tapdId,jdbcType=VARCHAR}, #{jiraKey,jdbcType=VARCHAR}, values (#{id,jdbcType=VARCHAR}, #{tapdId,jdbcType=VARCHAR}, #{jiraKey,jdbcType=VARCHAR},
#{zentaoId,jdbcType=VARCHAR}, #{azureDevopsId,jdbcType=VARCHAR}, #{caseTemplateId,jdbcType=VARCHAR}, #{zentaoId,jdbcType=VARCHAR}, #{azureDevopsId,jdbcType=VARCHAR}, #{caseTemplateId,jdbcType=VARCHAR},
#{azureFilterId,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{thirdPartTemplate,jdbcType=BIT}, #{azureFilterId,jdbcType=VARCHAR}, #{platform,jdbcType=VARCHAR}, #{thirdPartTemplate,jdbcType=BIT},
#{versionEnable,jdbcType=BIT}, #{issueConfig,jdbcType=VARCHAR}, #{apiTemplateId,jdbcType=VARCHAR} #{versionEnable,jdbcType=BIT}, #{apiTemplateId,jdbcType=VARCHAR}, #{issueConfig,jdbcType=LONGVARBINARY}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="io.metersphere.project.domain.ProjectExtend"> <insert id="insertSelective" parameterType="io.metersphere.project.domain.ProjectExtend">
@ -152,12 +175,12 @@
<if test="versionEnable != null"> <if test="versionEnable != null">
version_enable, version_enable,
</if> </if>
<if test="issueConfig != null">
issue_config,
</if>
<if test="apiTemplateId != null"> <if test="apiTemplateId != null">
api_template_id, api_template_id,
</if> </if>
<if test="issueConfig != null">
issue_config,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
@ -190,12 +213,12 @@
<if test="versionEnable != null"> <if test="versionEnable != null">
#{versionEnable,jdbcType=BIT}, #{versionEnable,jdbcType=BIT},
</if> </if>
<if test="issueConfig != null">
#{issueConfig,jdbcType=VARCHAR},
</if>
<if test="apiTemplateId != null"> <if test="apiTemplateId != null">
#{apiTemplateId,jdbcType=VARCHAR}, #{apiTemplateId,jdbcType=VARCHAR},
</if> </if>
<if test="issueConfig != null">
#{issueConfig,jdbcType=LONGVARBINARY},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="io.metersphere.project.domain.ProjectExtendExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="io.metersphere.project.domain.ProjectExtendExample" resultType="java.lang.Long">
@ -237,17 +260,35 @@
<if test="record.versionEnable != null"> <if test="record.versionEnable != null">
version_enable = #{record.versionEnable,jdbcType=BIT}, version_enable = #{record.versionEnable,jdbcType=BIT},
</if> </if>
<if test="record.issueConfig != null">
issue_config = #{record.issueConfig,jdbcType=VARCHAR},
</if>
<if test="record.apiTemplateId != null"> <if test="record.apiTemplateId != null">
api_template_id = #{record.apiTemplateId,jdbcType=VARCHAR}, api_template_id = #{record.apiTemplateId,jdbcType=VARCHAR},
</if> </if>
<if test="record.issueConfig != null">
issue_config = #{record.issueConfig,jdbcType=LONGVARBINARY},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update project_extend
set id = #{record.id,jdbcType=VARCHAR},
tapd_id = #{record.tapdId,jdbcType=VARCHAR},
jira_key = #{record.jiraKey,jdbcType=VARCHAR},
zentao_id = #{record.zentaoId,jdbcType=VARCHAR},
azure_devops_id = #{record.azureDevopsId,jdbcType=VARCHAR},
case_template_id = #{record.caseTemplateId,jdbcType=VARCHAR},
azure_filter_id = #{record.azureFilterId,jdbcType=VARCHAR},
platform = #{record.platform,jdbcType=VARCHAR},
third_part_template = #{record.thirdPartTemplate,jdbcType=BIT},
version_enable = #{record.versionEnable,jdbcType=BIT},
api_template_id = #{record.apiTemplateId,jdbcType=VARCHAR},
issue_config = #{record.issueConfig,jdbcType=LONGVARBINARY}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update project_extend update project_extend
set id = #{record.id,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=VARCHAR},
@ -260,7 +301,6 @@
platform = #{record.platform,jdbcType=VARCHAR}, platform = #{record.platform,jdbcType=VARCHAR},
third_part_template = #{record.thirdPartTemplate,jdbcType=BIT}, third_part_template = #{record.thirdPartTemplate,jdbcType=BIT},
version_enable = #{record.versionEnable,jdbcType=BIT}, version_enable = #{record.versionEnable,jdbcType=BIT},
issue_config = #{record.issueConfig,jdbcType=VARCHAR},
api_template_id = #{record.apiTemplateId,jdbcType=VARCHAR} api_template_id = #{record.apiTemplateId,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -296,15 +336,30 @@
<if test="versionEnable != null"> <if test="versionEnable != null">
version_enable = #{versionEnable,jdbcType=BIT}, version_enable = #{versionEnable,jdbcType=BIT},
</if> </if>
<if test="issueConfig != null">
issue_config = #{issueConfig,jdbcType=VARCHAR},
</if>
<if test="apiTemplateId != null"> <if test="apiTemplateId != null">
api_template_id = #{apiTemplateId,jdbcType=VARCHAR}, api_template_id = #{apiTemplateId,jdbcType=VARCHAR},
</if> </if>
<if test="issueConfig != null">
issue_config = #{issueConfig,jdbcType=LONGVARBINARY},
</if>
</set> </set>
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.project.domain.ProjectExtend">
update project_extend
set tapd_id = #{tapdId,jdbcType=VARCHAR},
jira_key = #{jiraKey,jdbcType=VARCHAR},
zentao_id = #{zentaoId,jdbcType=VARCHAR},
azure_devops_id = #{azureDevopsId,jdbcType=VARCHAR},
case_template_id = #{caseTemplateId,jdbcType=VARCHAR},
azure_filter_id = #{azureFilterId,jdbcType=VARCHAR},
platform = #{platform,jdbcType=VARCHAR},
third_part_template = #{thirdPartTemplate,jdbcType=BIT},
version_enable = #{versionEnable,jdbcType=BIT},
api_template_id = #{apiTemplateId,jdbcType=VARCHAR},
issue_config = #{issueConfig,jdbcType=LONGVARBINARY}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.project.domain.ProjectExtend"> <update id="updateByPrimaryKey" parameterType="io.metersphere.project.domain.ProjectExtend">
update project_extend update project_extend
set tapd_id = #{tapdId,jdbcType=VARCHAR}, set tapd_id = #{tapdId,jdbcType=VARCHAR},
@ -316,7 +371,6 @@
platform = #{platform,jdbcType=VARCHAR}, platform = #{platform,jdbcType=VARCHAR},
third_part_template = #{thirdPartTemplate,jdbcType=BIT}, third_part_template = #{thirdPartTemplate,jdbcType=BIT},
version_enable = #{versionEnable,jdbcType=BIT}, version_enable = #{versionEnable,jdbcType=BIT},
issue_config = #{issueConfig,jdbcType=VARCHAR},
api_template_id = #{apiTemplateId,jdbcType=VARCHAR} api_template_id = #{apiTemplateId,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR}
</update> </update>

View File

@ -3,7 +3,7 @@
<mapper namespace="io.metersphere.project.mapper.ProjectMapper"> <mapper namespace="io.metersphere.project.mapper.ProjectMapper">
<resultMap id="BaseResultMap" type="io.metersphere.project.domain.Project"> <resultMap id="BaseResultMap" type="io.metersphere.project.domain.Project">
<id column="id" jdbcType="VARCHAR" property="id" /> <id column="id" jdbcType="VARCHAR" property="id" />
<result column="organization_id" jdbcType="VARCHAR" property="workspaceId" /> <result column="organization_id" jdbcType="VARCHAR" property="organizationId" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="description" jdbcType="VARCHAR" property="description" /> <result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_time" jdbcType="BIGINT" property="createTime" /> <result column="create_time" jdbcType="BIGINT" property="createTime" />
@ -70,7 +70,8 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, organization_id, `name`, description, create_time, update_time, create_user, system_id id, organization_id, `name`, description, create_time, update_time, create_user,
system_id
</sql> </sql>
<select id="selectByExample" parameterType="io.metersphere.project.domain.ProjectExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="io.metersphere.project.domain.ProjectExample" resultMap="BaseResultMap">
select select
@ -106,7 +107,7 @@
insert into project (id, organization_id, `name`, insert into project (id, organization_id, `name`,
description, create_time, update_time, description, create_time, update_time,
create_user, system_id) create_user, system_id)
values (#{id,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, values (#{id,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
#{createUser,jdbcType=VARCHAR}, #{systemId,jdbcType=VARCHAR}) #{createUser,jdbcType=VARCHAR}, #{systemId,jdbcType=VARCHAR})
</insert> </insert>
@ -116,7 +117,7 @@
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="workspaceId != null"> <if test="organizationId != null">
organization_id, organization_id,
</if> </if>
<if test="name != null"> <if test="name != null">
@ -142,8 +143,8 @@
<if test="id != null"> <if test="id != null">
#{id,jdbcType=VARCHAR}, #{id,jdbcType=VARCHAR},
</if> </if>
<if test="workspaceId != null"> <if test="organizationId != null">
#{workspaceId,jdbcType=VARCHAR}, #{organizationId,jdbcType=VARCHAR},
</if> </if>
<if test="name != null"> <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
@ -177,8 +178,8 @@
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR}, id = #{record.id,jdbcType=VARCHAR},
</if> </if>
<if test="record.workspaceId != null"> <if test="record.organizationId != null">
organization_id = #{record.workspaceId,jdbcType=VARCHAR}, organization_id = #{record.organizationId,jdbcType=VARCHAR},
</if> </if>
<if test="record.name != null"> <if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
@ -206,7 +207,7 @@
<update id="updateByExample" parameterType="map"> <update id="updateByExample" parameterType="map">
update project update project
set id = #{record.id,jdbcType=VARCHAR}, set id = #{record.id,jdbcType=VARCHAR},
organization_id = #{record.workspaceId,jdbcType=VARCHAR}, organization_id = #{record.organizationId,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR}, `name` = #{record.name,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR}, description = #{record.description,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=BIGINT}, create_time = #{record.createTime,jdbcType=BIGINT},
@ -220,8 +221,8 @@
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.project.domain.Project"> <update id="updateByPrimaryKeySelective" parameterType="io.metersphere.project.domain.Project">
update project update project
<set> <set>
<if test="workspaceId != null"> <if test="organizationId != null">
organization_id = #{workspaceId,jdbcType=VARCHAR}, organization_id = #{organizationId,jdbcType=VARCHAR},
</if> </if>
<if test="name != null"> <if test="name != null">
`name` = #{name,jdbcType=VARCHAR}, `name` = #{name,jdbcType=VARCHAR},
@ -246,7 +247,7 @@
</update> </update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.project.domain.Project"> <update id="updateByPrimaryKey" parameterType="io.metersphere.project.domain.Project">
update project update project
set organization_id = #{workspaceId,jdbcType=VARCHAR}, set organization_id = #{organizationId,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR}, `name` = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=BIGINT}, create_time = #{createTime,jdbcType=BIGINT},

View File

@ -1,34 +0,0 @@
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 Workspace implements Serializable {
@Schema(title = "工作空间ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{workspace.id.not_blank}", groups = {Updated.class})
@Size(min = 1, max = 50, message = "{workspace.id.length_range}", groups = {Created.class, Updated.class})
private String id;
@Schema(title = "工作空间名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "{workspace.name.not_blank}", groups = {Created.class})
@Size(min = 1, max = 100, message = "{workspace.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;
}

View File

@ -1,600 +0,0 @@
package io.metersphere.system.domain;
import java.util.ArrayList;
import java.util.List;
public class WorkspaceExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public WorkspaceExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(String value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(String value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(String value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(String value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdLike(String value) {
addCriterion("id like", value, "id");
return (Criteria) this;
}
public Criteria andIdNotLike(String value) {
addCriterion("id not like", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(String value1, String value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria 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<String> values) {
addCriterion("`name` in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> 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<String> values) {
addCriterion("description in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> 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<Long> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Long> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Long value1, Long value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Long value1, Long value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Long value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Long value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Long value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Long value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Long value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Long> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Long> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Long value1, Long value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Long value1, Long value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andCreateUserIsNull() {
addCriterion("create_user is null");
return (Criteria) this;
}
public Criteria andCreateUserIsNotNull() {
addCriterion("create_user is not null");
return (Criteria) this;
}
public Criteria andCreateUserEqualTo(String value) {
addCriterion("create_user =", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotEqualTo(String value) {
addCriterion("create_user <>", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserGreaterThan(String value) {
addCriterion("create_user >", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
addCriterion("create_user >=", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLessThan(String value) {
addCriterion("create_user <", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLessThanOrEqualTo(String value) {
addCriterion("create_user <=", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLike(String value) {
addCriterion("create_user like", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotLike(String value) {
addCriterion("create_user not like", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserIn(List<String> values) {
addCriterion("create_user in", values, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotIn(List<String> values) {
addCriterion("create_user not in", values, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserBetween(String value1, String value2) {
addCriterion("create_user between", value1, value2, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotBetween(String value1, String value2) {
addCriterion("create_user not between", value1, value2, "createUser");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
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);
}
}
}

View File

@ -1,30 +0,0 @@
package io.metersphere.system.mapper;
import io.metersphere.system.domain.Workspace;
import io.metersphere.system.domain.WorkspaceExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface WorkspaceMapper {
long countByExample(WorkspaceExample example);
int deleteByExample(WorkspaceExample example);
int deleteByPrimaryKey(String id);
int insert(Workspace record);
int insertSelective(Workspace record);
List<Workspace> selectByExample(WorkspaceExample example);
Workspace selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") Workspace record, @Param("example") WorkspaceExample example);
int updateByExample(@Param("record") Workspace record, @Param("example") WorkspaceExample example);
int updateByPrimaryKeySelective(Workspace record);
int updateByPrimaryKey(Workspace record);
}

View File

@ -1,228 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.metersphere.system.mapper.WorkspaceMapper">
<resultMap id="BaseResultMap" type="io.metersphere.system.domain.Workspace">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, `name`, description, create_time, update_time, create_user
</sql>
<select id="selectByExample" parameterType="io.metersphere.system.domain.WorkspaceExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from workspace
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from workspace
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from workspace
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.metersphere.system.domain.WorkspaceExample">
delete from workspace
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.metersphere.system.domain.Workspace">
insert into workspace (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>
<insert id="insertSelective" parameterType="io.metersphere.system.domain.Workspace">
insert into workspace
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
`name`,
</if>
<if test="description != null">
description,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createUser != null">
create_user,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
<if test="createUser != null">
#{createUser,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.metersphere.system.domain.WorkspaceExample" resultType="java.lang.Long">
select count(*) from workspace
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update workspace
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
<if test="record.createUser != null">
create_user = #{record.createUser,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update workspace
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.system.domain.Workspace">
update workspace
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
<if test="createUser != null">
create_user = #{createUser,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.metersphere.system.domain.Workspace">
update workspace
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}
</update>
</mapper>

View File

@ -28,8 +28,8 @@ INSERT INTO user_role_relation (id, user_id, role_id, source_id, create_time, up
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('fff37fb4-f922-4fd3-be47-16333b46bb26', 'admin', 'SYSTEM_QUOTA:READ', 'SYSTEM_QUOTA'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('fff37fb4-f922-4fd3-be47-16333b46bb26', 'admin', 'SYSTEM_QUOTA:READ', 'SYSTEM_QUOTA');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('fdeea7c6-c3ff-4ca9-ac09-3a1532f6a8d5', 'admin', 'SYSTEM_USER:READ+UPDATE', 'SYSTEM_USER'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('fdeea7c6-c3ff-4ca9-ac09-3a1532f6a8d5', 'admin', 'SYSTEM_USER:READ+UPDATE', 'SYSTEM_USER');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('fba82fd0-8d4c-467a-a3f9-81adb0f36f57', 'admin', 'SYSTEM_QUOTA:READ+UPDATE', 'SYSTEM_QUOTA'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('fba82fd0-8d4c-467a-a3f9-81adb0f36f57', 'admin', 'SYSTEM_QUOTA:READ+UPDATE', 'SYSTEM_QUOTA');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('fab9f7e1-63f3-4788-bcf7-045b072b80da', 'admin', 'SYSTEM_WORKSPACE:READ', 'SYSTEM_WORKSPACE'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('fab9f7e1-63f3-4788-bcf7-045b072b80da', 'admin', 'SYSTEM_ORGANIZATION:READ', 'SYSTEM_ORGANIZATION');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('f883333d-51d3-4634-9d7c-e25eb57fdcab', 'admin', 'SYSTEM_WORKSPACE:READ+ADD', 'SYSTEM_WORKSPACE'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('f883333d-51d3-4634-9d7c-e25eb57fdcab', 'admin', 'SYSTEM_ORGANIZATION:READ+ADD', 'SYSTEM_ORGANIZATION');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('e7dffcf6-383a-4284-ba67-5e77813b916e', 'admin', 'SYSTEM_SETTING:READ+UPDATE', 'SYSTEM_SETTING'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('e7dffcf6-383a-4284-ba67-5e77813b916e', 'admin', 'SYSTEM_SETTING:READ+UPDATE', 'SYSTEM_SETTING');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('e02ca9bf-7518-4e2a-8d6e-c1086a6ce390', 'admin', 'SYSTEM_ROLE:READ+UPDATE', 'SYSTEM_ROLE'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('e02ca9bf-7518-4e2a-8d6e-c1086a6ce390', 'admin', 'SYSTEM_ROLE:READ+UPDATE', 'SYSTEM_ROLE');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('dadfbec0-984d-4189-b4c3-89561cd04721', 'admin', 'SYSTEM_TEST_POOL:READ', 'SYSTEM_TEST_POOL'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('dadfbec0-984d-4189-b4c3-89561cd04721', 'admin', 'SYSTEM_TEST_POOL:READ', 'SYSTEM_TEST_POOL');
@ -41,7 +41,7 @@ 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 ('a7775e04-7b9f-4afc-a164-43b63bfe900b', 'admin', 'SYSTEM_SETTING:READ', 'SYSTEM_SETTING'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('a7775e04-7b9f-4afc-a164-43b63bfe900b', 'admin', 'SYSTEM_SETTING:READ', 'SYSTEM_SETTING');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('a4d438c5-8f08-4708-ab34-3e78e536c3fe', 'admin', 'PERSONAL_INFORMATION:READ+UPDATE_PASSWORD', 'PERSONAL_INFORMATION'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('a4d438c5-8f08-4708-ab34-3e78e536c3fe', 'admin', 'PERSONAL_INFORMATION:READ+UPDATE_PASSWORD', 'PERSONAL_INFORMATION');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('a0f476bd-5b09-4469-8fdb-1009e8111d8a', 'admin', 'SYSTEM_USER:READ+ADD', 'SYSTEM_USER'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('a0f476bd-5b09-4469-8fdb-1009e8111d8a', 'admin', 'SYSTEM_USER:READ+ADD', 'SYSTEM_USER');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('9809c98a-dbf9-4835-9e06-c9ed43bc4809', 'admin', 'SYSTEM_WORKSPACE:READ+UPDATE', 'SYSTEM_WORKSPACE'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('9809c98a-dbf9-4835-9e06-c9ed43bc4809', 'admin', 'SYSTEM_ORGANIZATION:READ+UPDATE', 'SYSTEM_ORGANIZATION');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('9630020e-e366-43d9-a29a-b257dbbcfe1b', 'admin', 'SYSTEM_AUTH:READ', 'SYSTEM_AUTH'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('9630020e-e366-43d9-a29a-b257dbbcfe1b', 'admin', 'SYSTEM_AUTH:READ', 'SYSTEM_AUTH');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('8b59dede-3c21-4100-84a1-aa3a188408c4', 'admin', 'SYSTEM_USER:READ+DELETE', 'SYSTEM_USER'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('8b59dede-3c21-4100-84a1-aa3a188408c4', 'admin', 'SYSTEM_USER:READ+DELETE', 'SYSTEM_USER');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('87832d17-1a4e-4cd6-910c-bf04dc0aa8ca', 'admin', 'PERSONAL_INFORMATION:READ+UPDATE', 'PERSONAL_INFORMATION'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('87832d17-1a4e-4cd6-910c-bf04dc0aa8ca', 'admin', 'PERSONAL_INFORMATION:READ+UPDATE', 'PERSONAL_INFORMATION');
@ -49,7 +49,7 @@ 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 ('72c35c0c-6d9d-4d2e-aeb8-cb6dccf5d963', 'admin', 'SYSTEM_TEST_POOL:READ+ADD', 'SYSTEM_TEST_POOL'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('72c35c0c-6d9d-4d2e-aeb8-cb6dccf5d963', 'admin', 'SYSTEM_TEST_POOL:READ+ADD', 'SYSTEM_TEST_POOL');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('6d30341a-d891-45c8-bd58-99926829314b', 'admin', 'SYSTEM_TEST_POOL:READ+DELETE', 'SYSTEM_TEST_POOL'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('6d30341a-d891-45c8-bd58-99926829314b', 'admin', 'SYSTEM_TEST_POOL:READ+DELETE', 'SYSTEM_TEST_POOL');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('5f3fd8d2-7ebc-427b-8faf-800e77452319', 'admin', 'SYSTEM_TEST_POOL:READ+UPDATE', 'SYSTEM_TEST_POOL'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('5f3fd8d2-7ebc-427b-8faf-800e77452319', 'admin', 'SYSTEM_TEST_POOL:READ+UPDATE', 'SYSTEM_TEST_POOL');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('58035f15-0a2a-4b75-b7b1-186751309f0b', 'admin', 'SYSTEM_WORKSPACE:READ+DELETE', 'SYSTEM_WORKSPACE'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('58035f15-0a2a-4b75-b7b1-186751309f0b', 'admin', 'SYSTEM_ORGANIZATION:READ+DELETE', 'SYSTEM_ORGANIZATION');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('37b01825-632d-4859-bd74-53edb006c05c', 'admin', 'PERSONAL_INFORMATION:READ+API_KEYS', 'PERSONAL_INFORMATION'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('37b01825-632d-4859-bd74-53edb006c05c', 'admin', 'PERSONAL_INFORMATION:READ+API_KEYS', 'PERSONAL_INFORMATION');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('307be610-31b1-420b-b2bd-b236fdfd48a5', 'admin', 'SYSTEM_PLUGIN:UPLOAD', 'SYSTEM_PLUGIN'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('307be610-31b1-420b-b2bd-b236fdfd48a5', 'admin', 'SYSTEM_PLUGIN:UPLOAD', 'SYSTEM_PLUGIN');
INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b6a6eea-cb3a-4b16-a6a5-29fbb1ef6cf7', 'admin', 'SYSTEM_PLUGIN:READ', 'SYSTEM_PLUGIN'); INSERT INTO user_role_permission (id, role_id, permission_id, module_id) VALUES ('2b6a6eea-cb3a-4b16-a6a5-29fbb1ef6cf7', 'admin', 'SYSTEM_PLUGIN:READ', 'SYSTEM_PLUGIN');

View File

@ -3,6 +3,5 @@ package io.metersphere.sdk.constants;
public class UserRoleType { public class UserRoleType {
public static final String SYSTEM = "SYSTEM"; public static final String SYSTEM = "SYSTEM";
public static final String ORGANIZATION = "ORGANIZATION"; public static final String ORGANIZATION = "ORGANIZATION";
public static final String WORKSPACE = "WORKSPACE";
public static final String PROJECT = "PROJECT"; public static final String PROJECT = "PROJECT";
} }

View File

@ -24,7 +24,7 @@ public class MsPermissionAnnotationMethodInterceptor extends PermissionAnnotatio
@Override @Override
public void assertAuthorized(MethodInvocation mi) throws AuthorizationException { public void assertAuthorized(MethodInvocation mi) throws AuthorizationException {
String projectId = null; String projectId = null;
String workspaceId = null; String organizationId = null;
Object[] arguments = mi.getArguments(); Object[] arguments = mi.getArguments();
if (ArrayUtils.isNotEmpty(arguments)) { if (ArrayUtils.isNotEmpty(arguments)) {
Parameter[] parameters = mi.getMethod().getParameters(); Parameter[] parameters = mi.getMethod().getParameters();
@ -34,8 +34,8 @@ public class MsPermissionAnnotationMethodInterceptor extends PermissionAnnotatio
if (StringUtils.equals(parameters[i].getName(), "projectId")) { if (StringUtils.equals(parameters[i].getName(), "projectId")) {
projectId = (String) argument; projectId = (String) argument;
} }
if (StringUtils.equals(parameters[i].getName(), "workspaceId")) { if (StringUtils.equals(parameters[i].getName(), "organizationId")) {
workspaceId = (String) argument; organizationId = (String) argument;
} }
} else { } else {
try { try {
@ -45,8 +45,8 @@ public class MsPermissionAnnotationMethodInterceptor extends PermissionAnnotatio
if (StringUtils.equals(parameters[i].getName(), "project") && argument instanceof Project) { if (StringUtils.equals(parameters[i].getName(), "project") && argument instanceof Project) {
projectId = ((Project) argument).getId(); projectId = ((Project) argument).getId();
} }
if (StringUtils.isEmpty(workspaceId) && isExistField(argument, "workspaceId")) { if (StringUtils.isEmpty(organizationId) && isExistField(argument, "organizationId")) {
workspaceId = (String) MethodUtils.invokeMethod(argument, "getWorkspaceId"); organizationId = (String) MethodUtils.invokeMethod(argument, "getOrganizationId");
} }
} catch (Exception e) { } catch (Exception e) {
} }
@ -54,7 +54,7 @@ public class MsPermissionAnnotationMethodInterceptor extends PermissionAnnotatio
} }
} }
try { try {
SessionUtils.setCurrentOrganizationId(workspaceId); SessionUtils.setCurrentOrganizationId(organizationId);
SessionUtils.setCurrentProjectId(projectId); SessionUtils.setCurrentProjectId(projectId);
super.assertAuthorized(mi); super.assertAuthorized(mi);
} finally { } finally {

View File

@ -113,14 +113,14 @@ public class BaseUserService {
return; return;
} }
// 用户有 last_organization_id 权限 // 用户有 last_organization_id 权限
if (hasLastWorkspacePermission(user)) { if (hasLastOrganizationPermission(user)) {
return; return;
} }
// 判断其他权限 // 判断其他权限
checkNewWorkspaceAndProject(user); checkNewOrganizationAndProject(user);
} }
private void checkNewWorkspaceAndProject(UserDTO user) { private void checkNewOrganizationAndProject(UserDTO user) {
List<UserRoleRelation> userRoleRelations = user.getUserRoleRelations(); List<UserRoleRelation> userRoleRelations = user.getUserRoleRelations();
List<String> projectRoleIds = user.getUserRoles() List<String> projectRoleIds = user.getUserRoles()
.stream().filter(ug -> StringUtils.equals(ug.getType(), UserRoleType.PROJECT)) .stream().filter(ug -> StringUtils.equals(ug.getType(), UserRoleType.PROJECT))
@ -129,16 +129,16 @@ public class BaseUserService {
List<UserRoleRelation> project = userRoleRelations.stream().filter(ug -> projectRoleIds.contains(ug.getRoleId())) List<UserRoleRelation> project = userRoleRelations.stream().filter(ug -> projectRoleIds.contains(ug.getRoleId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtils.isEmpty(project)) { if (CollectionUtils.isEmpty(project)) {
List<String> workspaceIds = user.getUserRoles() List<String> organizationIds = user.getUserRoles()
.stream() .stream()
.filter(ug -> StringUtils.equals(ug.getType(), UserRoleType.WORKSPACE)) .filter(ug -> StringUtils.equals(ug.getType(), UserRoleType.ORGANIZATION))
.map(UserRole::getId) .map(UserRole::getId)
.toList(); .toList();
List<UserRoleRelation> workspaces = userRoleRelations.stream().filter(ug -> workspaceIds.contains(ug.getRoleId())) List<UserRoleRelation> organizations = userRoleRelations.stream().filter(ug -> organizationIds.contains(ug.getRoleId()))
.toList(); .toList();
if (workspaces.size() > 0) { if (organizations.size() > 0) {
String wsId = workspaces.get(0).getSourceId(); String wsId = organizations.get(0).getSourceId();
switchUserResource("workspace", wsId, user); switchUserResource("organization", wsId, user);
} else { } else {
List<String> superRoleIds = user.getUserRoles() List<String> superRoleIds = user.getUserRoles()
.stream() .stream()
@ -148,7 +148,7 @@ public class BaseUserService {
if (CollectionUtils.isNotEmpty(superRoleIds)) { if (CollectionUtils.isNotEmpty(superRoleIds)) {
Project p = baseProjectMapper.selectOne(); Project p = baseProjectMapper.selectOne();
if (p != null) { if (p != null) {
switchSuperUserResource(p.getId(), p.getWorkspaceId(), user); switchSuperUserResource(p.getId(), p.getOrganizationId(), user);
} }
} else { } else {
// 用户登录之后没有项目和工作空间的权限就把值清空 // 用户登录之后没有项目和工作空间的权限就把值清空
@ -162,7 +162,7 @@ public class BaseUserService {
.toList().get(0); .toList().get(0);
String projectId = userRoleRelation.getSourceId(); String projectId = userRoleRelation.getSourceId();
Project p = projectMapper.selectByPrimaryKey(projectId); Project p = projectMapper.selectByPrimaryKey(projectId);
String wsId = p.getWorkspaceId(); String wsId = p.getOrganizationId();
user.setId(user.getId()); user.setId(user.getId());
user.setLastProjectId(projectId); user.setLastProjectId(projectId);
user.setLastOrganizationId(wsId); user.setLastOrganizationId(wsId);
@ -177,11 +177,11 @@ public class BaseUserService {
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(userRoleRelations)) { if (CollectionUtils.isNotEmpty(userRoleRelations)) {
Project project = projectMapper.selectByPrimaryKey(user.getLastProjectId()); Project project = projectMapper.selectByPrimaryKey(user.getLastProjectId());
if (StringUtils.equals(project.getWorkspaceId(), user.getLastOrganizationId())) { if (StringUtils.equals(project.getOrganizationId(), user.getLastOrganizationId())) {
return true; return true;
} }
// last_project_id last_organization_id 对应不上了 // last_project_id last_organization_id 对应不上了
user.setLastOrganizationId(project.getWorkspaceId()); user.setLastOrganizationId(project.getOrganizationId());
updateUser(user); updateUser(user);
return true; return true;
} else { } else {
@ -191,14 +191,14 @@ public class BaseUserService {
return false; return false;
} }
private boolean hasLastWorkspacePermission(UserDTO user) { private boolean hasLastOrganizationPermission(UserDTO user) {
if (StringUtils.isNotBlank(user.getLastOrganizationId())) { if (StringUtils.isNotBlank(user.getLastOrganizationId())) {
List<UserRoleRelation> userRoleRelations = user.getUserRoleRelations().stream() List<UserRoleRelation> userRoleRelations = user.getUserRoleRelations().stream()
.filter(ug -> StringUtils.equals(user.getLastOrganizationId(), ug.getSourceId())) .filter(ug -> StringUtils.equals(user.getLastOrganizationId(), ug.getSourceId()))
.collect(Collectors.toList()); .collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(userRoleRelations)) { if (CollectionUtils.isNotEmpty(userRoleRelations)) {
ProjectExample example = new ProjectExample(); ProjectExample example = new ProjectExample();
example.createCriteria().andWorkspaceIdEqualTo(user.getLastOrganizationId()); example.createCriteria().andOrganizationIdEqualTo(user.getLastOrganizationId());
List<Project> projects = projectMapper.selectByExample(example); List<Project> projects = projectMapper.selectByExample(example);
// 工作空间下没有项目 // 工作空间下没有项目
if (CollectionUtils.isEmpty(projects)) { if (CollectionUtils.isEmpty(projects)) {
@ -226,7 +226,7 @@ public class BaseUserService {
return true; return true;
} }
Project project = projects.stream().filter(p -> StringUtils.equals(intersection.get(0), p.getId())).findFirst().get(); Project project = projects.stream().filter(p -> StringUtils.equals(intersection.get(0), p.getId())).findFirst().get();
String wsId = project.getWorkspaceId(); String wsId = project.getOrganizationId();
user.setId(user.getId()); user.setId(user.getId());
user.setLastProjectId(project.getId()); user.setLastProjectId(project.getId());
user.setLastOrganizationId(wsId); user.setLastOrganizationId(wsId);
@ -245,7 +245,7 @@ public class BaseUserService {
UserDTO user = getUserDTO(sessionUser.getId()); UserDTO user = getUserDTO(sessionUser.getId());
User newUser = new User(); User newUser = new User();
boolean isSuper = baseUserMapper.isSuperUser(sessionUser.getId()); boolean isSuper = baseUserMapper.isSuperUser(sessionUser.getId());
if (StringUtils.equals("workspace", sign)) { if (StringUtils.equals("organization", sign)) {
user.setLastOrganizationId(sourceId); user.setLastOrganizationId(sourceId);
sessionUser.setLastOrganizationId(sourceId); sessionUser.setLastOrganizationId(sourceId);
List<Project> projects = getProjectListByWsAndUserId(sessionUser.getId(), sourceId); List<Project> projects = getProjectListByWsAndUserId(sessionUser.getId(), sourceId);
@ -254,7 +254,7 @@ public class BaseUserService {
} else { } else {
if (isSuper) { if (isSuper) {
ProjectExample example = new ProjectExample(); ProjectExample example = new ProjectExample();
example.createCriteria().andWorkspaceIdEqualTo(sourceId); example.createCriteria().andOrganizationIdEqualTo(sourceId);
List<Project> allWsProject = projectMapper.selectByExample(example); List<Project> allWsProject = projectMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(allWsProject)) { if (CollectionUtils.isNotEmpty(allWsProject)) {
user.setLastProjectId(allWsProject.get(0).getId()); user.setLastProjectId(allWsProject.get(0).getId());
@ -270,12 +270,12 @@ public class BaseUserService {
userMapper.updateByPrimaryKeySelective(newUser); userMapper.updateByPrimaryKeySelective(newUser);
} }
private void switchSuperUserResource(String projectId, String workspaceId, UserDTO sessionUser) { private void switchSuperUserResource(String projectId, String organizationId, UserDTO sessionUser) {
// 获取最新UserDTO // 获取最新UserDTO
UserDTO user = getUserDTO(sessionUser.getId()); UserDTO user = getUserDTO(sessionUser.getId());
User newUser = new User(); User newUser = new User();
user.setLastOrganizationId(workspaceId); user.setLastOrganizationId(organizationId);
sessionUser.setLastOrganizationId(workspaceId); sessionUser.setLastOrganizationId(organizationId);
user.setLastProjectId(projectId); user.setLastProjectId(projectId);
BeanUtils.copyProperties(user, newUser); BeanUtils.copyProperties(user, newUser);
// 切换工作空间或组织之后更新 session 里的 user // 切换工作空间或组织之后更新 session 里的 user
@ -298,7 +298,7 @@ public class BaseUserService {
user.setUpdateTime(System.currentTimeMillis()); user.setUpdateTime(System.currentTimeMillis());
// 变更前 // 变更前
User userFromDB = userMapper.selectByPrimaryKey(user.getId()); User userFromDB = userMapper.selectByPrimaryKey(user.getId());
// last workspace id 变了 // last organization id 变了
if (user.getLastOrganizationId() != null && !StringUtils.equals(user.getLastOrganizationId(), userFromDB.getLastOrganizationId())) { if (user.getLastOrganizationId() != null && !StringUtils.equals(user.getLastOrganizationId(), userFromDB.getLastOrganizationId())) {
List<Project> projects = getProjectListByWsAndUserId(user.getId(), user.getLastOrganizationId()); List<Project> projects = getProjectListByWsAndUserId(user.getId(), user.getLastOrganizationId());
if (projects.size() > 0) { if (projects.size() > 0) {
@ -318,9 +318,9 @@ public class BaseUserService {
} }
} }
private List<Project> getProjectListByWsAndUserId(String userId, String workspaceId) { private List<Project> getProjectListByWsAndUserId(String userId, String organizationId) {
ProjectExample projectExample = new ProjectExample(); ProjectExample projectExample = new ProjectExample();
projectExample.createCriteria().andWorkspaceIdEqualTo(workspaceId); projectExample.createCriteria().andOrganizationIdEqualTo(organizationId);
List<Project> projects = projectMapper.selectByExample(projectExample); List<Project> projects = projectMapper.selectByExample(projectExample);
UserRoleRelationExample userRoleRelationExample = new UserRoleRelationExample(); UserRoleRelationExample userRoleRelationExample = new UserRoleRelationExample();

View File

@ -38,7 +38,7 @@ user_import_password_format_wrong=
user_import_phone_format_wrong= user_import_phone_format_wrong=
user_import_email_format_wrong= user_import_email_format_wrong=
user_import_organization_not_fond= user_import_organization_not_fond=
user_import_workspace_not_fond= user_import_organization_not_fond=
org_admin= org_admin=
org_member= org_member=
test_manager= test_manager=
@ -54,7 +54,7 @@ options_yes=
options_no= options_no=
required= required=
password_format_is_incorrect= password_format_is_incorrect=
please_input_workspace_member= please_input_organization_member=
test_case_report_template_repeat= test_case_report_template_repeat=
custom_field_already= custom_field_already=
id_required= id_required=
@ -64,7 +64,7 @@ expect_name_exists=
id_not_rightful= id_not_rightful=
mock_warning= mock_warning=
invalid_parameter= invalid_parameter=
workspace_template_settings_bug= organization_template_settings_bug=
zentao_test_type_error= zentao_test_type_error=
issue_jira_info_error= issue_jira_info_error=
case_status_not_exist= case_status_not_exist=

View File

@ -58,11 +58,8 @@ related_case_del_fail_suffix=TestCase, please disassociate first
jmx_content_valid=JMX content is invalid jmx_content_valid=JMX content is invalid
container_delete_fail=The container failed to stop, please try again container_delete_fail=The container failed to stop, please try again
load_test_report_file_not_exist=There is no JTL file in the current report, please wait or execute it again to get it load_test_report_file_not_exist=There is no JTL file in the current report, please wait or execute it again to get it
#workspace #organization
workspace_name_is_null=Workspace name cannot be null organization_not_exists=Organization is not exists
workspace_name_already_exists=The workspace name already exists
workspace_does_not_belong_to_user=The current workspace does not belong to the current user
workspace_not_exists=Workspace is not exists
#test resource pool #test resource pool
test_resource_pool_id_is_null=Test Resource Pool ID cannot be null test_resource_pool_id_is_null=Test Resource Pool ID cannot be null
test_resource_pool_name_is_null=Test Resource Pool name cannot be null test_resource_pool_name_is_null=Test Resource Pool name cannot be null
@ -128,7 +125,6 @@ user_import_password_format_wrong=Wrong password format
user_import_phone_format_wrong=Wrong phone format user_import_phone_format_wrong=Wrong phone format
user_import_email_format_wrong=Wrong email format user_import_email_format_wrong=Wrong email format
user_import_organization_not_fond=Organization is not found user_import_organization_not_fond=Organization is not found
user_import_workspace_not_fond=Workspace is not found
org_admin=Organization manager org_admin=Organization manager
org_member=Organization member org_member=Organization member
test_manager=Test manager test_manager=Test manager
@ -148,7 +144,7 @@ options_no=No
required=Required required=Required
password_format_is_incorrect=Valid password: 8-30 digits, English upper and lower case letters + numbers + special characters (optional) password_format_is_incorrect=Valid password: 8-30 digits, English upper and lower case letters + numbers + special characters (optional)
please_input_project_member=Please input project merber's number please_input_project_member=Please input project merber's number
test_case_report_template_repeat=The workspace has the same name template test_case_report_template_repeat=The organization has the same name template
plan_name_already_exists=Test plan name already exists plan_name_already_exists=Test plan name already exists
test_case_already_exists_excel=There are duplicate test cases in the import file test_case_already_exists_excel=There are duplicate test cases in the import file
test_case_module_already_exists=The module name already exists at the same level test_case_module_already_exists=The module name already exists at the same level
@ -185,25 +181,25 @@ ldap_mapping_value_null=LDAP user attribute mapping field is empty
oauth_mapping_config_error=OAuth2 attribute mapping misconfiguration oauth_mapping_config_error=OAuth2 attribute mapping misconfiguration
oauth_mapping_value_null=OAuth2 user attribute mapping field is empty oauth_mapping_value_null=OAuth2 user attribute mapping field is empty
#quota #quota
quota_project_excess_ws_api=The total number of interface tests for a project cannot exceed the workspace quota quota_project_excess_ws_api=The total number of interface tests for a project cannot exceed the organization quota
quota_project_excess_ws_performance=The total number of performance tests for a project cannot exceed the workspace quota quota_project_excess_ws_performance=The total number of performance tests for a project cannot exceed the organization quota
quota_project_excess_ws_max_threads=The maximum concurrent number of projects cannot exceed the quota of the workspace quota_project_excess_ws_max_threads=The maximum concurrent number of projects cannot exceed the quota of the organization
quota_project_excess_ws_max_duration=The stress test duration of the project cannot exceed the workspace quota quota_project_excess_ws_max_duration=The stress test duration of the project cannot exceed the organization quota
quota_project_excess_ws_resource_pool=The resource pool of the project cannot exceed the scope of the resource pool of the workspace quota_project_excess_ws_resource_pool=The resource pool of the project cannot exceed the scope of the resource pool of the organization
quota_project_excess_ws_vum_total=The sum of the total number of vums of the project cannot exceed the workspace quota quota_project_excess_ws_vum_total=The sum of the total number of vums of the project cannot exceed the organization quota
quota_vum_used_gt_vum_total=The total number of vum cannot be less than the number of consumed vum quota_vum_used_gt_vum_total=The total number of vum cannot be less than the number of consumed vum
quota_api_excess_workspace=The number of interface tests exceeds the workspace quota quota_api_excess_organization=The number of interface tests exceeds the organization quota
quota_api_excess_project=The number of interface tests exceeds the project limit quota_api_excess_project=The number of interface tests exceeds the project limit
quota_performance_excess_workspace=The number of performance tests exceeds the workspace quota quota_performance_excess_organization=The number of performance tests exceeds the organization quota
quota_performance_excess_project=The number of performance tests exceeds the project limit quota_performance_excess_project=The number of performance tests exceeds the project limit
quota_max_threads_excess_workspace=The maximum number of concurrent threads exceeds the workspace quota quota_max_threads_excess_organization=The maximum number of concurrent threads exceeds the organization quota
quota_max_threads_excess_project=The maximum concurrent number exceeds the project limit quota_max_threads_excess_project=The maximum concurrent number exceeds the project limit
quota_duration_excess_workspace=The stress test duration exceeds the work space quota quota_duration_excess_organization=The stress test duration exceeds the work space quota
quota_duration_excess_project=The stress test time exceeds the project limit quota_duration_excess_project=The stress test time exceeds the project limit
quota_member_excess_workspace=The number of members exceeds the workspace quota quota_member_excess_organization=The number of members exceeds the organization quota
quota_member_excess_project=The number of members exceeds the project quota quota_member_excess_project=The number of members exceeds the project quota
quota_project_excess_project=Number of projects exceeds workspace quota quota_project_excess_project=Number of projects exceeds organization quota
quota_vum_used_excess_workspace=The amount of vum consumed exceeds the workspace quota quota_vum_used_excess_organization=The amount of vum consumed exceeds the organization quota
quota_vum_used_excess_project=The amount of vum consumed exceeds the project quota quota_vum_used_excess_project=The amount of vum consumed exceeds the project quota
import_xmind_count_error=The number of use cases imported into the mind map cannot exceed 800 import_xmind_count_error=The number of use cases imported into the mind map cannot exceed 800
import_xmind_not_found=Test case not found import_xmind_not_found=Test case not found
@ -218,7 +214,7 @@ check_owner_case=The current user does not have permission to operate this use c
check_owner_plan=The current user does not have permission to operate this plan check_owner_plan=The current user does not have permission to operate this plan
check_owner_review=The current user does not have permission to operate this review check_owner_review=The current user does not have permission to operate this review
check_owner_comment=The current user does not have permission to manipulate this comment check_owner_comment=The current user does not have permission to manipulate this comment
check_owner_workspace=The current user does not have permission to operate this workspace check_owner_organization=The current user does not have permission to operate this organization
upload_content_is_null=Imported content is empty upload_content_is_null=Imported content is empty
test_plan_notification=Test plan notification test_plan_notification=Test plan notification
task_defect_notification=Task defect notification task_defect_notification=Task defect notification
@ -241,8 +237,8 @@ authsource_name_already_exists=Authentication source name already exists
authsource_name_is_null=Authentication source name cannot be empty authsource_name_is_null=Authentication source name cannot be empty
authsource_configuration_is_null=Authentication source configuration cannot be empty authsource_configuration_is_null=Authentication source configuration cannot be empty
mobile_phone_number_cannot_be_empty=When the receiving mode is pin and enterprise wechat: the user's mobile phone number cannot be empty mobile_phone_number_cannot_be_empty=When the receiving mode is pin and enterprise wechat: the user's mobile phone number cannot be empty
custom_field_already=A feild already exists under this workspace: custom_field_already=A feild already exists under this organization:
template_already=A template already exists under this workspace: template_already=A template already exists under this organization:
expect_name_exists=Expect name is exists expect_name_exists=Expect name is exists
ssl_password_error=The authentication password is wrong, please re-enter the password ssl_password_error=The authentication password is wrong, please re-enter the password
ssl_file_error=Failed to load the certification file, please check the certification file ssl_file_error=Failed to load the certification file, please check the certification file
@ -262,20 +258,17 @@ performance_test=Performance test
performance_test_report=Performance test report performance_test_report=Performance test report
system_user=System user system_user=System user
system_organization=System organization system_organization=System organization
system_workspace=workspace
system_test_resource=System test resource system_test_resource=System test resource
system_parameter_setting=System parameter setting system_parameter_setting=System parameter setting
system_quota_management=System Quota management system_quota_management=System Quota management
system_authorization_management=System authorization management system_authorization_management=System authorization management
organization_member=Organization member organization_member=Organization member
organization_workspace=Organization workspace
project_project_member=Project member project_project_member=Project member
workspace_service_integration=Workspace service integration organization_service_integration=Organization service integration
workspace_message_settings=Workspace message settings organization_message_settings=Organization message settings
workspace_member=Workspace member organization_template_settings_field=Organization template settings field
workspace_template_settings_field=Workspace template settings field organization_template_settings_case=Organization template settings case
workspace_template_settings_case=Workspace template settings case organization_template_settings_bug=Organization template settings bug
workspace_template_settings_bug=Workspace template settings bug
project_project_manager=Project project manager project_project_manager=Project project manager
project_project_jar=Project project jar project_project_jar=Project project jar
project_environment_setting=Project environment setting project_environment_setting=Project environment setting

View File

@ -58,11 +58,8 @@ related_case_del_fail_suffix=测试用例,请先解除关联
jmx_content_valid=JMX 内容无效,请检查 jmx_content_valid=JMX 内容无效,请检查
container_delete_fail=容器由于网络原因停止失败,请重试 container_delete_fail=容器由于网络原因停止失败,请重试
load_test_report_file_not_exist=当前报告没有JTL文件请等待或重新执行以便获取 load_test_report_file_not_exist=当前报告没有JTL文件请等待或重新执行以便获取
#workspace
workspace_name_is_null=工作空间名不能为空 organization_not_exists=工作空间不存在
workspace_name_already_exists=工作空间名已存在
workspace_does_not_belong_to_user=当前工作空间不属于当前用户
workspace_not_exists=工作空间不存在
#test resource pool #test resource pool
test_resource_pool_id_is_null=资源池ID不能为空 test_resource_pool_id_is_null=资源池ID不能为空
test_resource_pool_name_is_null=资源池名称不能为空 test_resource_pool_name_is_null=资源池名称不能为空
@ -128,7 +125,7 @@ user_import_password_format_wrong=密码格式错误
user_import_phone_format_wrong=手机号码格式错误 user_import_phone_format_wrong=手机号码格式错误
user_import_email_format_wrong=电子邮箱格式错误 user_import_email_format_wrong=电子邮箱格式错误
user_import_organization_not_fond=组织未找到 user_import_organization_not_fond=组织未找到
user_import_workspace_not_fond=工作空间未找到 user_import_organization_not_fond=工作空间未找到
org_admin=组织管理员 org_admin=组织管理员
org_member=组织成员 org_member=组织成员
test_manager=测试经理 test_manager=测试经理
@ -192,18 +189,18 @@ quota_project_excess_ws_max_duration=项目的压测时长不能超过工作空
quota_project_excess_ws_resource_pool=项目的资源池不能超过工作空间的资源池范围 quota_project_excess_ws_resource_pool=项目的资源池不能超过工作空间的资源池范围
quota_project_excess_ws_vum_total=项目的总vum数量总和不能超过工作空间配额 quota_project_excess_ws_vum_total=项目的总vum数量总和不能超过工作空间配额
quota_vum_used_gt_vum_total=总vum数量不能小于已消耗的vum数量 quota_vum_used_gt_vum_total=总vum数量不能小于已消耗的vum数量
quota_api_excess_workspace=接口测试数量超过工作空间限额 quota_api_excess_organization=接口测试数量超过工作空间限额
quota_api_excess_project=接口测试数量超过项目限额 quota_api_excess_project=接口测试数量超过项目限额
quota_performance_excess_workspace=性能测试数量超过工作空间限额 quota_performance_excess_organization=性能测试数量超过工作空间限额
quota_performance_excess_project=性能测试数量超过项目限额 quota_performance_excess_project=性能测试数量超过项目限额
quota_max_threads_excess_workspace=最大并发数超过工作空间限额 quota_max_threads_excess_organization=最大并发数超过工作空间限额
quota_max_threads_excess_project=最大并发数超过项目限额 quota_max_threads_excess_project=最大并发数超过项目限额
quota_duration_excess_workspace=压测时长超过工作空间限额 quota_duration_excess_organization=压测时长超过工作空间限额
quota_duration_excess_project=压测时长超过项目限额 quota_duration_excess_project=压测时长超过项目限额
quota_member_excess_workspace=成员数超过工作空间配额 quota_member_excess_organization=成员数超过工作空间配额
quota_member_excess_project=成员数超过项目配额 quota_member_excess_project=成员数超过项目配额
quota_project_excess_project=项目数超过工作空间配额 quota_project_excess_project=项目数超过工作空间配额
quota_vum_used_excess_workspace=消耗的vum数量超过工作空间配额 quota_vum_used_excess_organization=消耗的vum数量超过工作空间配额
quota_vum_used_excess_project=消耗的vum数量超过项目配额 quota_vum_used_excess_project=消耗的vum数量超过项目配额
import_xmind_count_error=思维导图导入用例数量不能超过 800 条 import_xmind_count_error=思维导图导入用例数量不能超过 800 条
license_valid_license_error=授权认证失败 license_valid_license_error=授权认证失败
@ -218,7 +215,7 @@ check_owner_case=当前用户没有操作此用例的权限
check_owner_plan=当前用户没有操作此计划的权限 check_owner_plan=当前用户没有操作此计划的权限
check_owner_review=当前用户没有操作此评审的权限 check_owner_review=当前用户没有操作此评审的权限
check_owner_comment=当前用户没有操作此评论的权限 check_owner_comment=当前用户没有操作此评论的权限
check_owner_workspace=当前用户没有操作此工作空间的权限 check_owner_organization=当前用户没有操作此工作空间的权限
upload_content_is_null=导入内容为空 upload_content_is_null=导入内容为空
test_plan_notification=测试计划通知 test_plan_notification=测试计划通知
task_defect_notification=缺陷任务通知 task_defect_notification=缺陷任务通知
@ -261,19 +258,19 @@ performance_test=性能测试
performance_test_report=性能测试报告 performance_test_report=性能测试报告
system_user=系统-用户 system_user=系统-用户
system_organization=系统-组织 system_organization=系统-组织
system_workspace=工作空间 system_organization=工作空间
system_test_resource=系统-测试资源池 system_test_resource=系统-测试资源池
system_parameter_setting=系统-系统参数设置 system_parameter_setting=系统-系统参数设置
system_quota_management=系统-配额管理 system_quota_management=系统-配额管理
system_authorization_management=系统-授权管理 system_authorization_management=系统-授权管理
organization_member=组织-成员 organization_member=组织-成员
organization_workspace=组织-工作空间 organization_organization=组织-工作空间
workspace_service_integration=工作空间-服务集成 organization_service_integration=工作空间-服务集成
workspace_message_settings=工作空间-消息设置 organization_message_settings=工作空间-消息设置
workspace_member=工作空间-成员 organization_member=工作空间-成员
workspace_template_settings_field=工作空间-模版设置-自定义字段 organization_template_settings_field=工作空间-模版设置-自定义字段
workspace_template_settings_case=工作空间-模版设置-用例模版 organization_template_settings_case=工作空间-模版设置-用例模版
workspace_template_settings_bug=工作空间-模版设置-缺陷模版 organization_template_settings_bug=工作空间-模版设置-缺陷模版
project_project_manager=项目-项目管理 project_project_manager=项目-项目管理
project_project_member=项目-成员 project_project_member=项目-成员
project_project_jar=項目-JAR包管理 project_project_jar=項目-JAR包管理

View File

@ -58,11 +58,8 @@ related_case_del_fail_suffix=測試用例,請先解除關聯
jmx_content_valid=JMX 內容無效,請檢查 jmx_content_valid=JMX 內容無效,請檢查
container_delete_fail=容器由於網絡原因停止失敗,請重試 container_delete_fail=容器由於網絡原因停止失敗,請重試
load_test_report_file_not_exist=當前報告沒有JTL文件請等待或重新執行以便獲取 load_test_report_file_not_exist=當前報告沒有JTL文件請等待或重新執行以便獲取
#workspace #organization
workspace_name_is_null=工作空間名不能為空 organization_not_exists=工作空間不存在
workspace_name_already_exists=工作空間名已存在
workspace_does_not_belong_to_user=當前工作空間不屬於當前用戶
workspace_not_exists=工作空間不存在
#test resource pool #test resource pool
test_resource_pool_id_is_null=資源池ID不能為空 test_resource_pool_id_is_null=資源池ID不能為空
test_resource_pool_name_is_null=資源池名稱不能為空 test_resource_pool_name_is_null=資源池名稱不能為空
@ -128,7 +125,7 @@ user_import_password_format_wrong=密碼格式錯誤
user_import_phone_format_wrong=手機號碼格式錯誤 user_import_phone_format_wrong=手機號碼格式錯誤
user_import_email_format_wrong=電子郵箱格式錯誤 user_import_email_format_wrong=電子郵箱格式錯誤
user_import_organization_not_fond=組織未找到 user_import_organization_not_fond=組織未找到
user_import_workspace_not_fond=工作空間未找到 user_import_organization_not_fond=工作空間未找到
org_admin=組織管理員 org_admin=組織管理員
org_member=組織成員 org_member=組織成員
test_manager=測試經理 test_manager=測試經理
@ -191,18 +188,18 @@ quota_project_excess_ws_max_threads=項目的最大並發數不能超過工作
quota_project_excess_ws_max_duration=項目的壓測時長不能超過工作空間的配額 quota_project_excess_ws_max_duration=項目的壓測時長不能超過工作空間的配額
quota_project_excess_ws_resource_pool=項目的資源池不能超過工作空間的資源池範圍 quota_project_excess_ws_resource_pool=項目的資源池不能超過工作空間的資源池範圍
quota_project_excess_ws_vum_total=項目的總vum數量總和不能超過工作空間配額 quota_project_excess_ws_vum_total=項目的總vum數量總和不能超過工作空間配額
quota_api_excess_workspace=接口測試數量超過工作空間限額 quota_api_excess_organization=接口測試數量超過工作空間限額
quota_vum_used_gt_vum_total=總vum數量不能小於已消耗的vum數量 quota_vum_used_gt_vum_total=總vum數量不能小於已消耗的vum數量
quota_api_excess_project=接口測試數量超過項目限額 quota_api_excess_project=接口測試數量超過項目限額
quota_performance_excess_workspace=性能測試數量超過工作空間限額 quota_performance_excess_organization=性能測試數量超過工作空間限額
quota_performance_excess_project=性能測試數量超過項目限額 quota_performance_excess_project=性能測試數量超過項目限額
quota_max_threads_excess_workspace=最大並發數超過工作空間限額 quota_max_threads_excess_organization=最大並發數超過工作空間限額
quota_max_threads_excess_project=最大並發數超過項目限額 quota_max_threads_excess_project=最大並發數超過項目限額
quota_duration_excess_project=壓測時長超過項目限額 quota_duration_excess_project=壓測時長超過項目限額
quota_member_excess_workspace=成員數超過工作空間配額 quota_member_excess_organization=成員數超過工作空間配額
quota_member_excess_project=成員數超過項目配額 quota_member_excess_project=成員數超過項目配額
quota_project_excess_project=項目數超過工作空間配額 quota_project_excess_project=項目數超過工作空間配額
quota_vum_used_excess_workspace=消耗的vum數量超過工作空間配額 quota_vum_used_excess_organization=消耗的vum數量超過工作空間配額
quota_vum_used_excess_project=消耗的vum數量超過項目配額 quota_vum_used_excess_project=消耗的vum數量超過項目配額
import_xmind_count_error=思維導圖導入用例數量不能超過 800 條 import_xmind_count_error=思維導圖導入用例數量不能超過 800 條
license_valid_license_error=授權認證失敗 license_valid_license_error=授權認證失敗
@ -217,7 +214,7 @@ check_owner_case=當前用戶沒有操作此用例的權限
check_owner_plan=當前用戶沒有操作此計劃的權限 check_owner_plan=當前用戶沒有操作此計劃的權限
check_owner_review=當前用戶沒有操作此評審的權限 check_owner_review=當前用戶沒有操作此評審的權限
check_owner_comment=當前用戶沒有操作此評論的權限 check_owner_comment=當前用戶沒有操作此評論的權限
check_owner_workspace=當前用戶沒有操作此工作空間的權限 check_owner_organization=當前用戶沒有操作此工作空間的權限
upload_content_is_null=導入內容為空 upload_content_is_null=導入內容為空
test_plan_notification=測試計劃通知 test_plan_notification=測試計劃通知
task_defect_notification=缺陷任務通知 task_defect_notification=缺陷任務通知
@ -260,19 +257,19 @@ performance_test=性能測試
performance_test_report=性能測試報告 performance_test_report=性能測試報告
system_user=系統-用戶 system_user=系統-用戶
system_organization=系統-組織 system_organization=系統-組織
system_workspace=工作空間 system_organization=工作空間
system_test_resource=系統-測試資源池 system_test_resource=系統-測試資源池
system_parameter_setting=系統-系統參數設置 system_parameter_setting=系統-系統參數設置
system_quota_management=系統-配額管理 system_quota_management=系統-配額管理
system_authorization_management=系統-授權管理 system_authorization_management=系統-授權管理
organization_member=組織-成員 organization_member=組織-成員
organization_workspace=組織-工作空間 organization_organization=組織-工作空間
workspace_service_integration=工作空間-服務集成 organization_service_integration=工作空間-服務集成
workspace_message_settings=工作空間-消息設置 organization_message_settings=工作空間-消息設置
workspace_member=工作空間-成員 organization_member=工作空間-成員
workspace_template_settings_field=工作空間-模版設置-自定義字段 organization_template_settings_field=工作空間-模版設置-自定義字段
workspace_template_settings_case=工作空間-模版設置-用例模版 organization_template_settings_case=工作空間-模版設置-用例模版
workspace_template_settings_bug=工作空間-模版設置-缺陷模版 organization_template_settings_bug=工作空間-模版設置-缺陷模版
project_project_manager=項目-項目管理 project_project_manager=項目-項目管理
project_project_member=項目-成員 project_project_member=項目-成員
project_project_jar=項目-JAR包管理 project_project_jar=項目-JAR包管理

View File

@ -52,8 +52,8 @@ project_extend.project_id.not_blank=Project ID is required
project_extend.platform.length_range=Platform length must be between {min} and {max} project_extend.platform.length_range=Platform length must be between {min} and {max}
project_extend.platform.not_blank=Platform is required project_extend.platform.not_blank=Platform is required
project.id.not_blank=ID is required project.id.not_blank=ID is required
project.organization_id.length_range=Workspace ID length must be between {min} and {max} project.organization_id.length_range=Organization ID length must be between {min} and {max}
project.organization_id.not_blank=Workspace ID is required project.organization_id.not_blank=Organization ID is required
project.name.length_range=Name length must be between {min} and {max} project.name.length_range=Name length must be between {min} and {max}
project.name.not_blank=Name is required project.name.not_blank=Name is required
custom_function.id.not_blank=ID is required custom_function.id.not_blank=ID is required

View File

@ -134,11 +134,11 @@ user_role_relation.role_id.not_blank=User role relation role id must not be blan
user_role_relation.role_id.length_range=User role relation role id must be between {min} and {max} characters long user_role_relation.role_id.length_range=User role relation role id must be between {min} and {max} characters long
user_role_relation.source_id.not_blank=User role relation source id must not be blank user_role_relation.source_id.not_blank=User role relation source id must not be blank
user_role_relation.source_id.length_range=User role relation source id must be between {min} and {max} characters long user_role_relation.source_id.length_range=User role relation source id must be between {min} and {max} characters long
workspace.id.not_blank=Workspace id must not be blank organization.id.not_blank=Organization id must not be blank
workspace.name.not_blank=Workspace name must not be blank organization.name.not_blank=Organization name must not be blank
workspace.name.length_range=Workspace name must be between {min} and {max} characters long organization.name.length_range=Organization name must be between {min} and {max} characters long
workspace.create_user.not_blank=Workspace create user must not be blank organization.create_user.not_blank=Organization create user must not be blank
workspace.create_user.length_range=Workspace create user must be between {min} and {max} characters long organization.create_user.length_range=Organization create user must be between {min} and {max} characters long

View File

@ -134,10 +134,10 @@ user_role_relation.role_id.not_blank=用户组关系用户组ID不能为空
user_role_relation.role_id.length_range=用户组关系用户组ID长度必须在{min}和{max}之间 user_role_relation.role_id.length_range=用户组关系用户组ID长度必须在{min}和{max}之间
user_role_relation.source_id.not_blank=用户组关系来源ID不能为空 user_role_relation.source_id.not_blank=用户组关系来源ID不能为空
user_role_relation.source_id.length_range=用户组关系来源ID长度必须在{min}和{max}之间 user_role_relation.source_id.length_range=用户组关系来源ID长度必须在{min}和{max}之间
workspace.id.not_blank=工作空间ID不能为空 organization.id.not_blank=工作空间ID不能为空
workspace.name.not_blank=工作空间名称不能为空 organization.name.not_blank=工作空间名称不能为空
workspace.name.length_range=工作空间名称长度必须在{min}和{max}之间 organization.name.length_range=工作空间名称长度必须在{min}和{max}之间
workspace.create_user.not_blank=工作空间创建人不能为空 organization.create_user.not_blank=工作空间创建人不能为空
workspace.create_user.length_range=工作空间创建人长度必须在{min}和{max}之间 organization.create_user.length_range=工作空间创建人长度必须在{min}和{max}之间

View File

@ -134,8 +134,8 @@ user_role_relation.role_id.not_blank=用戶組關係用戶組ID不能為空
user_role_relation.role_id.length_range=用戶組關係用戶組ID長度必須在{min}和{max}之間 user_role_relation.role_id.length_range=用戶組關係用戶組ID長度必須在{min}和{max}之間
user_role_relation.source_id.not_blank=用戶組關係來源ID不能為空 user_role_relation.source_id.not_blank=用戶組關係來源ID不能為空
user_role_relation.source_id.length_range=用戶組關係來源ID長度必須在{min}和{max}之間 user_role_relation.source_id.length_range=用戶組關係來源ID長度必須在{min}和{max}之間
workspace.id.not_blank=工作空間ID不能為空 organization.id.not_blank=工作空間ID不能為空
workspace.name.not_blank=工作空間名稱不能為空 organization.name.not_blank=工作空間名稱不能為空
workspace.name.length_range=工作空間名稱長度必須在{min}和{max}之間 organization.name.length_range=工作空間名稱長度必須在{min}和{max}之間
workspace.create_user.not_blank=工作空間創建人不能為空 organization.create_user.not_blank=工作空間創建人不能為空
workspace.create_user.length_range=工作空間創建人長度必須在{min}和{max}之間 organization.create_user.length_range=工作空間創建人長度必須在{min}和{max}之間

View File

@ -53,7 +53,7 @@ public class ProjectControllerTests {
Project project = new Project(); Project project = new Project();
project.setName("test"); project.setName("test");
project.setCreateUser("admin"); project.setCreateUser("admin");
project.setWorkspaceId("default"); project.setOrganizationId("default");
var result = mockMvc.perform(MockMvcRequestBuilders.post("/project/add") var result = mockMvc.perform(MockMvcRequestBuilders.post("/project/add")
.header(SessionConstants.HEADER_TOKEN, sessionId) .header(SessionConstants.HEADER_TOKEN, sessionId)
@ -73,7 +73,7 @@ public class ProjectControllerTests {
project.setId(projectId); project.setId(projectId);
project.setName("test2"); project.setName("test2");
project.setCreateUser("admin"); project.setCreateUser("admin");
project.setWorkspaceId("default"); project.setOrganizationId("default");
mockMvc.perform(MockMvcRequestBuilders.post("/project/edit") mockMvc.perform(MockMvcRequestBuilders.post("/project/edit")
.header(SessionConstants.HEADER_TOKEN, sessionId) .header(SessionConstants.HEADER_TOKEN, sessionId)