feat(REQ-3300) - 调整查询 IM 群成员的档案信息逻辑

This commit is contained in:
wangli 2025-02-07 17:03:29 +08:00
parent 82cad613ad
commit 34bbba9f01

View File

@ -273,17 +273,6 @@ public class ChangeRecordConfirmServiceImpl extends ServiceImpl<ChangeRecordConf
return profiles.stream().collect(Collectors.toMap(PersonProfileDto::getId, PersonProfileDto::getRealName, (x, y) -> x));
}
private Map<Long, PersonProfileDto> buildPersonDtoMap(Set<Long> personSet) {
if (CollectionUtils.isEmpty(personSet)) {
return Maps.newHashMap();
}
List<PersonProfileDto> profiles = visaProfileGateway.getProfiles(Lists.newArrayList(personSet));
if (CollectionUtils.isEmpty(profiles)) {
return Maps.newHashMap();
}
return profiles.stream().collect(Collectors.toMap(PersonProfileDto::getId, Function.identity(), (x, y) -> x));
}
/**
* 条件查询列表
*/
@ -351,9 +340,9 @@ public class ChangeRecordConfirmServiceImpl extends ServiceImpl<ChangeRecordConf
if (CollectionUtils.isEmpty(list)) {
return Lists.newArrayList();
}
Map<Long, PersonProfileDto> personMap = buildPersonDtoMap(list.stream()
Map<Long, PersonProfileDto> personMap = visaProfileGateway.getProfileMap(list.stream()
.map(ChangeRecordConfirm::getPersonId)
.collect(Collectors.toSet()));
.collect(Collectors.toList()));
return list.stream().map(i -> VisaChangeApproveCreateReq.ApprovePersonInfo.builder()
.workspaceId(i.getWorkspaceId())
.ouId(i.getOuId())