Skip to content

Commit

Permalink
Merge pull request #106 from Modagbul/feat/alarm_minsu
Browse files Browse the repository at this point in the history
feat: 소모임 개수 보낼 때 유저 닉네임 추가
  • Loading branch information
minsu20 authored Dec 3, 2023
2 parents 68f28c6 + 2f97570 commit 091a132
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ public Page<GetNewTeamResponse> 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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ public void get_team_count() throws Exception {
.teamName("소모임 이름")
.numOfTeam(2L)
.leaderName("소모임장 이름")
.memberName("멤버 이름")
.build();

given(getTeamUseCase.getTeamCount(any(), any())).willReturn(output);
Expand Down Expand Up @@ -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("유저 닉네임")
)
)
);
Expand Down

0 comments on commit 091a132

Please sign in to comment.