From 830b257974e600da465d92846f85305219683ec8 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Fri, 29 Dec 2023 11:26:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=93=E5=AE=B6=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java | 7 +++---- .../main/java/com/hz/pm/api/expert/model/vo/ExpertDetailVO.java | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java index e17fe33..4926715 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java @@ -175,7 +175,8 @@ public class ExpertManage { Map fileMap = CollUtils.listToMap(fileInfoList, MhFileInfoDTO::getFileId); BiFunction, List> 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 files = function.apply(w, fileMap); - if (!files.isEmpty()) { - expertDetail.setAvatarFileDetail(files.get(0)); - } + expertDetail.setAvatarFileDetail(files); }); BizUtils.notBlank(expertDetail.getRecommendFile(), w -> { List files = function.apply(w, fileMap); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertDetailVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertDetailVO.java index 5abd91d..a446f52 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertDetailVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertDetailVO.java @@ -50,7 +50,7 @@ public class ExpertDetailVO { @ApiModelProperty(value = "头像") private String avatarFile; - private MhFileInfoVO avatarFileDetail; + private List avatarFileDetail; @ApiModelProperty(value = "身份证号") private String idCard;