feat(REQ-3714): 人员查询异常处理
This commit is contained in:
parent
8e111ebbae
commit
04a13c9741
@ -206,7 +206,7 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService {
|
||||
// 查询当前登录及待删除人员在当前项目中的参与记录(仅限当前登录单位)
|
||||
List<NodeUserDTO> nodeUsers = nodeUserService.list(query);
|
||||
// 校验当前入参
|
||||
checkPermission(nodeUsers, personId, failInfoMap);
|
||||
checkPermission(nodeUsers);
|
||||
// 过滤当前操作人员
|
||||
nodeUsers = nodeUsers.stream()
|
||||
.filter(e -> !Objects.equals(e.getPersonId(), personId))
|
||||
@ -316,17 +316,10 @@ public class NodeUserCheckServiceImpl implements NodeUserCheckService {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkPermission(List<NodeUserDTO> nodeUsers, Long personId, Map<Long, List<BatchDeleteNodeUserCheckResp.CheckFailInfo>> failInfoMap) {
|
||||
private void checkPermission(List<NodeUserDTO> nodeUsers) {
|
||||
if (CollUtil.isEmpty(nodeUsers)) {
|
||||
throw ResultCode.INVALID_PARAMS.toException("你已被移除当前项目,请刷新后重试当前操作!");
|
||||
}
|
||||
if (nodeUsers.stream().noneMatch(e -> Objects.equals(e.getPersonId(), personId))) {
|
||||
nodeUsers.forEach(e -> {
|
||||
BatchDeleteNodeUserCheckResp.CheckFailInfo checkFailInfo = new BatchDeleteNodeUserCheckResp.CheckFailInfo();
|
||||
checkFailInfo.setType(CheckInfoTypeEnum.NOT_IN_JURISDICTION);
|
||||
addFailInfo(failInfoMap, e.getPersonId(), checkFailInfo);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private List<Long> getSpecialRole() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user