Browse Source

增加专家文件详情

tags/24080901
WendyYang 11 months ago
parent
commit
830b257974
2 changed files with 4 additions and 5 deletions
  1. +3
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java
  2. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertDetailVO.java

+ 3
- 4
hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java View File

@@ -175,7 +175,8 @@ public class ExpertManage {
Map<String, MhFileInfoDTO> fileMap = CollUtils.listToMap(fileInfoList, MhFileInfoDTO::getFileId); Map<String, MhFileInfoDTO> fileMap = CollUtils.listToMap(fileInfoList, MhFileInfoDTO::getFileId);


BiFunction<String, Map<String, MhFileInfoDTO>, List<MhFileInfoVO>> function = (str, map) -> { 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); MhFileInfoDTO fileInfoDto = map.get(w);
return BeanUtil.copyProperties(fileInfoDto, MhFileInfoVO.class); return BeanUtil.copyProperties(fileInfoDto, MhFileInfoVO.class);
}).filter(Objects::nonNull).collect(Collectors.toList()); }).filter(Objects::nonNull).collect(Collectors.toList());
@@ -187,9 +188,7 @@ public class ExpertManage {
}); });
BizUtils.notBlank(expertDetail.getAvatarFile(), w -> { BizUtils.notBlank(expertDetail.getAvatarFile(), w -> {
List<MhFileInfoVO> files = function.apply(w, fileMap); List<MhFileInfoVO> files = function.apply(w, fileMap);
if (!files.isEmpty()) {
expertDetail.setAvatarFileDetail(files.get(0));
}
expertDetail.setAvatarFileDetail(files);
}); });
BizUtils.notBlank(expertDetail.getRecommendFile(), w -> { BizUtils.notBlank(expertDetail.getRecommendFile(), w -> {
List<MhFileInfoVO> files = function.apply(w, fileMap); List<MhFileInfoVO> files = function.apply(w, fileMap);


+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertDetailVO.java View File

@@ -50,7 +50,7 @@ public class ExpertDetailVO {
@ApiModelProperty(value = "头像") @ApiModelProperty(value = "头像")
private String avatarFile; private String avatarFile;


private MhFileInfoVO avatarFileDetail;
private List<MhFileInfoVO> avatarFileDetail;


@ApiModelProperty(value = "身份证号") @ApiModelProperty(value = "身份证号")
private String idCard; private String idCard;


Loading…
Cancel
Save