From 056ea0aea181fec752ec9cfc9f47d01ffe2a5c11 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Fri, 23 Oct 2020 13:48:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B6=88=E6=81=AF=E8=AE=BE=E7=BD=AE):?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E8=AE=BE=E7=BD=AE=E4=BA=BA=E5=91=98=E8=8C=83?= =?UTF-8?q?=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserController.java | 9 +++--- .../io/metersphere/service/UserService.java | 7 ----- .../organization/OrganizationMember.vue | 2 +- .../organization/TaskNotification.vue | 29 ++++++++++++++----- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/backend/src/main/java/io/metersphere/controller/UserController.java b/backend/src/main/java/io/metersphere/controller/UserController.java index 2f9de7e05e..f1d4d6036b 100644 --- a/backend/src/main/java/io/metersphere/controller/UserController.java +++ b/backend/src/main/java/io/metersphere/controller/UserController.java @@ -122,6 +122,11 @@ public class UserController { Page page = PageHelper.startPage(goPage, pageSize, true); return PageUtils.setPageInfo(page, userService.getOrgMemberList(request)); } + @PostMapping("/special/org/member/list") + @RequiresRoles(RoleConstants.ADMIN) + public List _getOrgMemberListByAdmin(@RequestBody QueryOrgMemberRequest request) { + return userService.getOrgMemberList(request); + } @PostMapping("/special/org/member/list/all") @RequiresRoles(RoleConstants.ADMIN) @@ -133,10 +138,6 @@ public class UserController { public List getUserList() { return userService.getUserList(); } - @GetMapping("/list/orgId") - public List getUserListByOrgId() { - return userService.getUserListByOrgId(); - } @PostMapping("/update/current") public UserDTO updateCurrentUser(@RequestBody User user) { userService.updateUser(user); diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index 60cc806adc..6da6a242ff 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -266,13 +266,6 @@ public class UserService { example.setOrderByClause("update_time desc"); return userMapper.selectByExample(example); } - public List getUserListByOrgId() { - SessionUser user = SessionUtils.getUser(); - String orgId = user.getLastOrganizationId(); - UserExample example = new UserExample(); - example.createCriteria().andLastOrganizationIdEqualTo(orgId); - return userMapper.selectByExample(example); - } public List getUserListWithRequest(io.metersphere.controller.request.UserRequest request) { return extUserMapper.getUserList(request); diff --git a/frontend/src/business/components/settings/organization/OrganizationMember.vue b/frontend/src/business/components/settings/organization/OrganizationMember.vue index 1d8c718001..9ef06d33b3 100644 --- a/frontend/src/business/components/settings/organization/OrganizationMember.vue +++ b/frontend/src/business/components/settings/organization/OrganizationMember.vue @@ -156,7 +156,7 @@ initTableData() { let param = { name: this.condition.name, - organizationId: this.currentUser().lastOrganizationId + organizationId: this.currentUser().lastOrganionIdzati }; this.result = this.$post(this.buildPagePath(this.queryPath), param, response => { let data = response.data; diff --git a/frontend/src/business/components/settings/organization/TaskNotification.vue b/frontend/src/business/components/settings/organization/TaskNotification.vue index 68fc10ce70..3e0313a2fd 100644 --- a/frontend/src/business/components/settings/organization/TaskNotification.vue +++ b/frontend/src/business/components/settings/organization/TaskNotification.vue @@ -504,26 +504,39 @@ export default { }) }, userList() { - this.result = this.$get('user/list/orgId', response => { + let param = { + name: '', + organizationId: this.currentUser().lastOrganizationId + }; + this.result = this.$post('user/special/org/member/list', param, response => { this.jenkinsReceiverOptions = response.data }) }, reviewUerList() { - this.result = this.$get('user/list/orgId', response => { + let param = { + name: '', + organizationId: this.currentUser().lastOrganizationId + }; + this.result = this.$post('user/special/org/member/list', param, response => { this.reviewReceiverOptions = response.data }) + }, defectUserList() { - this.result = this.$get('user/list/orgId', response => { + let param = { + name: '', + organizationId: this.currentUser().lastOrganizationId + }; + this.result = this.$post('user/special/org/member/list', param, response => { this.defectReceiverOptions = response.data - /* this.defectReceiverOptions.push({id: 'FOUNDER', name: this.$t('api_test.creator')}, { - id: 'EXECUTOR', - name: this.$t('test_track.plan_view.executor') - })*/ }) }, testPlanUserList() { - this.result = this.$get('user/list/orgId', response => { + let param = { + name: '', + organizationId: this.currentUser().lastOrganizationId + }; + this.result = this.$post('user/special/org/member/list', param, response => { this.testPlanReceiverOptions = response.data }) },