From 17d65771f329c33b568b036baba7aa5a51ca63aa Mon Sep 17 00:00:00 2001 From: minsu20 Date: Thu, 30 Nov 2023 02:32:55 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=82=AD=EC=A0=9C=20=EC=A0=84=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=ED=95=A0=20=EB=95=8C=20=EC=9C=A0=EC=A0=80=20?= =?UTF-8?q?=EB=8B=89=EB=84=A4=EC=9E=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team/application/dto/response/ReviewTeamResponse.java | 1 + .../backend/domain/team/application/mapper/TeamMapper.java | 3 ++- .../domain/team/application/service/ReviewTeamUseCase.java | 2 +- .../backend/domain/team/presentation/TeamControllerTest.java | 4 +++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/moing/backend/domain/team/application/dto/response/ReviewTeamResponse.java b/src/main/java/com/moing/backend/domain/team/application/dto/response/ReviewTeamResponse.java index bca79fe1..f259913a 100644 --- a/src/main/java/com/moing/backend/domain/team/application/dto/response/ReviewTeamResponse.java +++ b/src/main/java/com/moing/backend/domain/team/application/dto/response/ReviewTeamResponse.java @@ -18,4 +18,5 @@ public class ReviewTeamResponse { private Long numOfMission; private Integer levelOfFire; //불꽃 레벨 private Boolean isLeader; + private String memberName; } \ No newline at end of file diff --git a/src/main/java/com/moing/backend/domain/team/application/mapper/TeamMapper.java b/src/main/java/com/moing/backend/domain/team/application/mapper/TeamMapper.java index d6239590..081a39a2 100644 --- a/src/main/java/com/moing/backend/domain/team/application/mapper/TeamMapper.java +++ b/src/main/java/com/moing/backend/domain/team/application/mapper/TeamMapper.java @@ -38,7 +38,7 @@ public GetTeamDetailResponse toTeamDetailResponse(Long memberId, Team team, Inte .build(); } - public ReviewTeamResponse toReviewTeamResponse(Long numOfMission, Team team, boolean isLeader){ + public ReviewTeamResponse toReviewTeamResponse(Long numOfMission, Team team, boolean isLeader, String memberName){ return ReviewTeamResponse .builder() .teamId(team.getTeamId()) @@ -48,6 +48,7 @@ public ReviewTeamResponse toReviewTeamResponse(Long numOfMission, Team team, boo .duration(calculateDuration(team.getApprovalTime())) .numOfMission(numOfMission) .isLeader(isLeader) + .memberName(memberName) .build(); } diff --git a/src/main/java/com/moing/backend/domain/team/application/service/ReviewTeamUseCase.java b/src/main/java/com/moing/backend/domain/team/application/service/ReviewTeamUseCase.java index f8ee2fae..7176ca7a 100644 --- a/src/main/java/com/moing/backend/domain/team/application/service/ReviewTeamUseCase.java +++ b/src/main/java/com/moing/backend/domain/team/application/service/ReviewTeamUseCase.java @@ -27,6 +27,6 @@ public ReviewTeamResponse reviewTeam(String socialId, Long teamId){ Team team=teamGetService.getTeamByTeamId(teamId); Member member=memberGetService.getMemberBySocialId(socialId); boolean isLeader=checkLeaderUseCase.isTeamLeader(member, team); - return teamMapper.toReviewTeamResponse(missionQueryService.findMissionsCountByTeam(team.getTeamId()),team, isLeader); + return teamMapper.toReviewTeamResponse(missionQueryService.findMissionsCountByTeam(team.getTeamId()),team, isLeader, member.getNickName()); } } diff --git a/src/test/java/com/moing/backend/domain/team/presentation/TeamControllerTest.java b/src/test/java/com/moing/backend/domain/team/presentation/TeamControllerTest.java index c997a72c..fd30a521 100644 --- a/src/test/java/com/moing/backend/domain/team/presentation/TeamControllerTest.java +++ b/src/test/java/com/moing/backend/domain/team/presentation/TeamControllerTest.java @@ -260,6 +260,7 @@ public void review_team() throws Exception { .numOfMission(90L) .levelOfFire(3) .isLeader(false) + .memberName("유저 닉네임") .build(); given(reviewTeamUseCase.reviewTeam(any(), any())).willReturn(output); @@ -291,7 +292,8 @@ public void review_team() throws Exception { fieldWithPath("data.duration").description("소모임과 함께한 시간"), fieldWithPath("data.levelOfFire").description("소모임 불꽃 레벨"), fieldWithPath("data.numOfMission").description("미션 총 개수"), - fieldWithPath("data.isLeader").description("소모임장 여부") + fieldWithPath("data.isLeader").description("소모임장 여부"), + fieldWithPath("data.memberName").description("유저 닉네임") ) ) );