Skip to content

Commit

Permalink
BE: [feat] 크루 프로필 조회 추가 CSID-DGU#83
Browse files Browse the repository at this point in the history
  • Loading branch information
Seoyoung2222 committed Nov 27, 2024
1 parent 266ce75 commit fbfd7fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
@Builder
public class CrewMainNoticeResponseDto {
private String crewTitle;
private String crewProfileImage;
private int postCount;
private int memberCount;
private List<NoticePostSimpleResponseDto> noticePost;

public static CrewMainNoticeResponseDto of(String crewTitle, int postCount, int memberCount, List<NoticePostSimpleResponseDto> noticePost) {
public static CrewMainNoticeResponseDto of(String crewTitle,String crewProfileImage, int postCount, int memberCount, List<NoticePostSimpleResponseDto> noticePost) {
return CrewMainNoticeResponseDto.builder()
.crewTitle(crewTitle)
.crewProfileImage(crewProfileImage)
.postCount(postCount)
.memberCount(memberCount)
.noticePost(noticePost)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ public CrewMainNoticeResponseDto getNoticePostsByCrew(Long crewId) {
.map(NoticePostSimpleResponseDto::fromEntity)
.collect(Collectors.toList());

// 크루 프로필 이미지 URL 가져오기
String crewProfileImage = crew.getImages() != null ? crew.getImages().getImageUrl() : null;

return CrewMainNoticeResponseDto.of(
crew.getTitle(),
crewProfileImage,
noticePosts.size(),
crew.getCrewUsers().size(),
noticePostSimpleResponseDtos
Expand Down

0 comments on commit fbfd7fe

Please sign in to comment.