From db8cd75665733cf0560189c8188ab65af734afd8 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 28 Feb 2020 16:51:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4=E4=B8=8B?= =?UTF-8?q?=E6=88=90=E5=91=98=E4=BF=A1=E6=81=AF=E5=8F=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/ext/ExtOrganizationMapper.java | 2 +- .../base/mapper/ext/ExtOrganizationMapper.xml | 4 +- .../base/mapper/ext/ExtUserRoleMapper.xml | 4 +- .../controller/WorkspaceController.java | 7 ++ .../request/member/AddMemberRequest.java | 10 +- .../request/member/QueryMemberRequest.java | 10 -- .../dto/OrganizationMemberDTO.java | 2 - .../metersphere/dto/WorkspaceMemberDTO.java | 98 ++++++++++++++++ .../service/OrganizationService.java | 7 +- .../io/metersphere/service/UserService.java | 20 ++-- .../metersphere/service/WorkspaceService.java | 47 ++++++++ .../components/settings/Member.vue | 107 ++++++++++++++---- .../settings/OrganizationMember.vue | 18 ++- 13 files changed, 279 insertions(+), 57 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/dto/WorkspaceMemberDTO.java diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOrganizationMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOrganizationMapper.java index 6607777dfd..6d5209ad8a 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOrganizationMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOrganizationMapper.java @@ -4,5 +4,5 @@ import org.apache.ibatis.annotations.Param; public interface ExtOrganizationMapper { - int checkOrgRole(@Param("orgId") String orgId,@Param("userId") String userId,@Param("roleId") String roleId); + int checkSourceRole(@Param("sourceId") String sourceId,@Param("userId") String userId,@Param("roleId") String roleId); } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOrganizationMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOrganizationMapper.xml index ca1bf126b4..5dafb7ee75 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOrganizationMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtOrganizationMapper.xml @@ -2,11 +2,11 @@ - select count(id) from user_role ur where ur.user_id = #{userId} - and ur.source_id = #{orgId} + and ur.source_id = #{sourceId} and ur.role_id = #{roleId} diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.xml index 99665f738c..80606210b0 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.xml @@ -38,8 +38,8 @@