diff --git a/src/main/java/com/moing/backend/domain/team/application/dto/response/GetTeamCountResponse.java b/src/main/java/com/moing/backend/domain/team/application/dto/response/GetTeamCountResponse.java index ff627afc..e6ad022b 100644 --- a/src/main/java/com/moing/backend/domain/team/application/dto/response/GetTeamCountResponse.java +++ b/src/main/java/com/moing/backend/domain/team/application/dto/response/GetTeamCountResponse.java @@ -13,11 +13,16 @@ public class GetTeamCountResponse { private String teamName; private Long numOfTeam; private String leaderName; + private String memberName; public void updateCount(Long count){ this.numOfTeam=count; } + public void updateMemberName(String nickName){ + this.memberName=memberName; + } + @QueryProjection public GetTeamCountResponse(String teamName, String leaderName){ this.teamName=teamName; diff --git a/src/main/java/com/moing/backend/domain/team/application/service/GetTeamUseCase.java b/src/main/java/com/moing/backend/domain/team/application/service/GetTeamUseCase.java index 74700bc0..d81edcba 100644 --- a/src/main/java/com/moing/backend/domain/team/application/service/GetTeamUseCase.java +++ b/src/main/java/com/moing/backend/domain/team/application/service/GetTeamUseCase.java @@ -50,6 +50,8 @@ public Page getNewTeam(String dateSort, Pageable pageable) { public GetTeamCountResponse getTeamCount(String socialId, Long teamId) { Member member = memberGetService.getMemberBySocialId(socialId); - return teamGetService.getTeamCountAndName(teamId, member.getMemberId()); + GetTeamCountResponse response= teamGetService.getTeamCountAndName(teamId, member.getMemberId()); + response.updateMemberName(member.getNickName()); + return response; } } 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 fd30a521..7306ffe0 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 @@ -521,6 +521,7 @@ public void get_team_count() throws Exception { .teamName("소모임 이름") .numOfTeam(2L) .leaderName("소모임장 이름") + .memberName("멤버 이름") .build(); given(getTeamUseCase.getTeamCount(any(), any())).willReturn(output); @@ -550,7 +551,8 @@ public void get_team_count() throws Exception { fieldWithPath("message").description("소모임을 수정했습니다."), fieldWithPath("data.teamName").description("소모임 이름"), fieldWithPath("data.numOfTeam").description("지금까지 가입한 소모임 개수"), - fieldWithPath("data.leaderName").description("소모임장 이름") + fieldWithPath("data.leaderName").description("소모임장 이름"), + fieldWithPath("data.memberName").description("유저 닉네임") ) ) );