From 800fe82d29958197a84bed32ef242b8539fadc9d Mon Sep 17 00:00:00 2001 From: oosedus Date: Tue, 6 Aug 2024 20:20:08 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20clubDetail=20DTO=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/likelion/MZConnent/dto/club/LeaderDto.java | 8 +++++++- .../likelion/MZConnent/service/club/ClubInfoService.java | 2 ++ src/main/resources/application.yml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/likelion/MZConnent/dto/club/LeaderDto.java b/src/main/java/likelion/MZConnent/dto/club/LeaderDto.java index 89f5dab..3a6a1fd 100644 --- a/src/main/java/likelion/MZConnent/dto/club/LeaderDto.java +++ b/src/main/java/likelion/MZConnent/dto/club/LeaderDto.java @@ -1,5 +1,7 @@ package likelion.MZConnent.dto.club; +import likelion.MZConnent.domain.member.Age; +import likelion.MZConnent.domain.member.Gender; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; @@ -10,12 +12,16 @@ @NoArgsConstructor public class LeaderDto { private String username; + private Age age; + private Gender gender; private String profileImageUrl; private List selfIntroductions; @Builder - public LeaderDto(String username, String profileImageUrl, List selfIntroductions) { + public LeaderDto(String username,Age age,Gender gender, String profileImageUrl, List selfIntroductions) { this.username = username; + this.age=age; + this.gender=gender; this.profileImageUrl = profileImageUrl; this.selfIntroductions = selfIntroductions; } diff --git a/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java b/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java index 39abe0e..10dee03 100644 --- a/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java +++ b/src/main/java/likelion/MZConnent/service/club/ClubInfoService.java @@ -44,6 +44,8 @@ private ClubDetailResponse buildClubDetailResponse(Long clubId, Member member) { .filter(cm -> cm.getClubRole() == ClubRole.LEADER) .map(cm -> LeaderDto.builder() .username(cm.getMember().getUsername()) + .age(cm.getMember().getAge()) + .gender(cm.getMember().getGender()) .profileImageUrl(cm.getMember().getProfileImageUrl()) .selfIntroductions(cm.getMember().getSelfIntroductions().stream() .map(si -> SelfIntroductionDto.builder() diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index ce4313b..d2dbbdf 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,6 @@ spring: config: - import: application-secret.yml + import: application-local.yml jpa: hibernate: ddl-auto: update