From f5a315ffcd1f995ccb38c04ea59e349676d80e2a Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 28 Feb 2020 15:57:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4=E6=88=90?= =?UTF-8?q?=E5=91=98=E5=88=97=E8=A1=A8=E6=B7=BB=E5=8A=A0=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtUserRoleMapper.java | 2 + .../base/mapper/ext/ExtUserRoleMapper.xml | 8 +++ .../controller/UserRoleController.java | 7 ++- .../metersphere/service/UserRoleService.java | 4 ++ .../components/settings/Member.vue | 51 +++++++++++++++---- .../settings/OrganizationMember.vue | 8 +-- 6 files changed, 62 insertions(+), 18 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.java index 26ed6ec2de..4bc8eb87cc 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.java +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.java @@ -22,6 +22,8 @@ public interface ExtUserRoleMapper { List getOrganizationMemberRoles(@Param("orgId") String orgId, @Param("userId") String userId); + List getWorkspaceMemberRoles(@Param("workspaceId") String workspaceId, @Param("userId") String userId); + List getBesideOrgMemberList(@Param("orgId") String orgId); 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 ef80fdc4a0..99665f738c 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 @@ -80,6 +80,14 @@ where ur.source_id = #{orgId}) + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/controller/UserRoleController.java b/backend/src/main/java/io/metersphere/controller/UserRoleController.java index ae0799abc5..a26d75eb4a 100644 --- a/backend/src/main/java/io/metersphere/controller/UserRoleController.java +++ b/backend/src/main/java/io/metersphere/controller/UserRoleController.java @@ -16,8 +16,13 @@ public class UserRoleController { @Resource private UserRoleService userRoleService; - @GetMapping("/list/{orgId}/{userId}") + @GetMapping("/list/org/{orgId}/{userId}") public List getOrganizationMemberRoles(@PathVariable String orgId, @PathVariable String userId) { return userRoleService.getOrganizationMemberRoles(orgId, userId); } + + @GetMapping("/list/ws/{workspaceId}/{userId}") + public List workspaceId(@PathVariable String workspaceId, @PathVariable String userId) { + return userRoleService.getWorkspaceMemberRoles(workspaceId, userId); + } } diff --git a/backend/src/main/java/io/metersphere/service/UserRoleService.java b/backend/src/main/java/io/metersphere/service/UserRoleService.java index 6e347790a4..68cb9aaad0 100644 --- a/backend/src/main/java/io/metersphere/service/UserRoleService.java +++ b/backend/src/main/java/io/metersphere/service/UserRoleService.java @@ -19,4 +19,8 @@ public class UserRoleService { return extUserRoleMapper.getOrganizationMemberRoles(orgId, userId); } + public List getWorkspaceMemberRoles(String workspaceId, String userId) { + return extUserRoleMapper.getWorkspaceMemberRoles(workspaceId, userId); + } + } diff --git a/frontend/src/performance/components/settings/Member.vue b/frontend/src/performance/components/settings/Member.vue index 0c41823e9e..25e8b2438d 100644 --- a/frontend/src/performance/components/settings/Member.vue +++ b/frontend/src/performance/components/settings/Member.vue @@ -1,5 +1,5 @@