|
|
@@ -175,7 +175,8 @@ public class ExpertManage { |
|
|
|
Map<String, MhFileInfoDTO> fileMap = CollUtils.listToMap(fileInfoList, MhFileInfoDTO::getFileId); |
|
|
|
|
|
|
|
BiFunction<String, Map<String, MhFileInfoDTO>, List<MhFileInfoVO>> function = (str, map) -> { |
|
|
|
return Arrays.stream(str.split(",")).map(w -> { |
|
|
|
String[] split = str.split(","); |
|
|
|
return Arrays.stream(split).map(w -> { |
|
|
|
MhFileInfoDTO fileInfoDto = map.get(w); |
|
|
|
return BeanUtil.copyProperties(fileInfoDto, MhFileInfoVO.class); |
|
|
|
}).filter(Objects::nonNull).collect(Collectors.toList()); |
|
|
@@ -187,9 +188,7 @@ public class ExpertManage { |
|
|
|
}); |
|
|
|
BizUtils.notBlank(expertDetail.getAvatarFile(), w -> { |
|
|
|
List<MhFileInfoVO> files = function.apply(w, fileMap); |
|
|
|
if (!files.isEmpty()) { |
|
|
|
expertDetail.setAvatarFileDetail(files.get(0)); |
|
|
|
} |
|
|
|
expertDetail.setAvatarFileDetail(files); |
|
|
|
}); |
|
|
|
BizUtils.notBlank(expertDetail.getRecommendFile(), w -> { |
|
|
|
List<MhFileInfoVO> files = function.apply(w, fileMap); |
|
|
|