Merge branch 'master' into v1.4

This commit is contained in:
Captain.B 2020-10-23 14:26:46 +08:00
commit 54c198ab8e
5 changed files with 28 additions and 21 deletions

View File

@ -178,7 +178,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
List<NoticeDetail> noticeList = noticeService.queryNotice(testResult.getTestId());
mailService.sendApiNotification(report, noticeList);
}
if (StringUtils.equals(NoticeConstants.API, "API")) {
if (StringUtils.equals(NoticeConstants.API, report.getTriggerMode())) {
List<String> userIds = new ArrayList<>();
MessageSettingDetail messageSettingDetail = noticeService.searchMessage();
List<MessageDetail> taskList = messageSettingDetail.getJenkinsTask();

View File

@ -122,6 +122,11 @@ public class UserController {
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
return PageUtils.setPageInfo(page, userService.getOrgMemberList(request));
}
@PostMapping("/special/org/member/list")
@RequiresRoles(RoleConstants.ADMIN)
public List<User> _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<User> getUserList() {
return userService.getUserList();
}
@GetMapping("/list/orgId")
public List<User> getUserListByOrgId() {
return userService.getUserListByOrgId();
}
@PostMapping("/update/current")
public UserDTO updateCurrentUser(@RequestBody User user) {
userService.updateUser(user);

View File

@ -266,13 +266,6 @@ public class UserService {
example.setOrderByClause("update_time desc");
return userMapper.selectByExample(example);
}
public List<User> getUserListByOrgId() {
SessionUser user = SessionUtils.getUser();
String orgId = user.getLastOrganizationId();
UserExample example = new UserExample();
example.createCriteria().andLastOrganizationIdEqualTo(orgId);
return userMapper.selectByExample(example);
}
public List<User> getUserListWithRequest(io.metersphere.controller.request.UserRequest request) {
return extUserMapper.getUserList(request);

View File

@ -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;

View File

@ -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
})
},