Skip to content

Commit

Permalink
⚡ : 썸네일 이미지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
imenuuu committed Feb 19, 2024
1 parent 9972a55 commit 03801df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,16 @@ public ProjectRes.ProjectAdminList convertToProjectList(ProjectRepository.Projec

public ProjectRes.ProjectAdminDetail convertToProjectAdminDetail(ProjectRepository.ProjectAdminDetail result, List<ProjectImage> projectImages) {
List<ProjectRes.ProjectImgList> projectImgLists = new ArrayList<>();
projectImages.forEach(
results -> projectImgLists.add(
new ProjectRes.ProjectImgList(
results.getId(),
results.getUrl(),
results.getSequence()
)
)
);

String thumbnail = "";
for (ProjectImage projectImage : projectImages) {
if(projectImage.getImageRepresentStatus() == ImageRepresentStatus.NORMAL) {
projectImgLists.add(convertToProjectImages(projectImage));
}
if(projectImage.getImageRepresentStatus() == ImageRepresentStatus.REPRESENT) {
thumbnail = projectImage.getUrl();
}
}


return ProjectRes.ProjectAdminDetail
Expand All @@ -143,6 +144,7 @@ public ProjectRes.ProjectAdminDetail convertToProjectAdminDetail(ProjectReposito
.searchKeyword(result.getSearchKeyword())
.totalDonationCnt(result.getTotalDonationCnt())
.projectImgLists(projectImgLists)
.thumbnail(thumbnail)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ public static class ProjectAdminDetail {

private int regularDonationCnt;

private String thumbnail;

private List<ProjectImgList> projectImgLists;
}
@Getter
Expand Down

0 comments on commit 03801df

Please sign in to comment.