Skip to content

Commit

Permalink
Merge pull request #98 from Modagbul/feat/alarm_minsu
Browse files Browse the repository at this point in the history
fix: 삭제 전 조회할 때 유저 닉네임 추가
  • Loading branch information
minsu20 authored Nov 29, 2023
2 parents bf030f0 + 17d6577 commit d2e2ffb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ public class ReviewTeamResponse {
private Long numOfMission;
private Integer levelOfFire; //불꽃 레벨
private Boolean isLeader;
private String memberName;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -48,6 +48,7 @@ public ReviewTeamResponse toReviewTeamResponse(Long numOfMission, Team team, boo
.duration(calculateDuration(team.getApprovalTime()))
.numOfMission(numOfMission)
.isLeader(isLeader)
.memberName(memberName)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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("유저 닉네임")
)
)
);
Expand Down

0 comments on commit d2e2ffb

Please sign in to comment.