diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java index e96f4b6ae2..a483fd82a4 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -178,7 +178,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl List noticeList = noticeService.queryNotice(testResult.getTestId()); mailService.sendApiNotification(report, noticeList); } - if (StringUtils.equals(NoticeConstants.API, "API")) { + if (StringUtils.equals(NoticeConstants.API, report.getTriggerMode())) { List userIds = new ArrayList<>(); MessageSettingDetail messageSettingDetail = noticeService.searchMessage(); List taskList = messageSettingDetail.getJenkinsTask(); 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 }) },