|
@@ -146,6 +146,33 @@ public class InfoServiceImpl implements InfoService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<SysUser> getExistMailUserList() {
|
|
|
+ List<SysUser> userList = getUserList();
|
|
|
+
|
|
|
+ if (userList.size() == 0) {
|
|
|
+ return userList;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Long> userIdList = userList.stream().map(SysUser::getUserId).collect(Collectors.toList());
|
|
|
+
|
|
|
+ List<Long> existMailUserIdList = new ArrayList<>();
|
|
|
+
|
|
|
+ List<Long> enterpriseUserId = enterpriseMailboxService.listObject(EnterpriseMailbox::getUserId,
|
|
|
+ q -> q.in(EnterpriseMailbox::getUserId, userIdList));
|
|
|
+
|
|
|
+ List<Long> personalUserId = personalMailboxService.listObject(PersonalMailbox::getUserId,
|
|
|
+ q -> q.in(PersonalMailbox::getUserId, userIdList));
|
|
|
+
|
|
|
+ existMailUserIdList.addAll(enterpriseUserId);
|
|
|
+ existMailUserIdList.addAll(personalUserId);
|
|
|
+
|
|
|
+ return userList.stream()
|
|
|
+ .filter(item -> existMailUserIdList.contains(item.getUserId()))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
private void subordinateDeptId(Long deptId, Set<Long> deptSet, Map<Long, List<SysDept>> parentDeptMap) {
|
|
|
deptSet.add(deptId);
|
|
|
|