Skip to content

Commit

Permalink
fix(User): AppliedCount -> ApprovedCount 로 변경 (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks authored Sep 11, 2024
1 parent 8aacfee commit 85a2a59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public int getAppliedCount(Integer meetingId) {
return applies.size();
}

public long getApprovedCount(Integer meetingId) {
public int getApprovedCount(Integer meetingId) {
List<Apply> applies = appliesMap.get(meetingId);

if (applies == null) {
return 0;
}

return appliesMap.get(meetingId).stream()
return (int) appliesMap.get(meetingId).stream()
.filter(apply -> apply.getStatus().equals(EnApplyStatus.APPROVE))
.count();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public UserV2GetCreatedMeetingByUserResponseDto getCreatedMeetingByUser(Integer

List<MeetingV2GetCreatedMeetingByUserResponseDto> meetingByUserDtos = meetings.stream()
.map(meeting -> MeetingV2GetCreatedMeetingByUserResponseDto.of(meeting, meetingCreator,
applies.getAppliedCount(meeting.getId()), time.now()))
applies.getApprovedCount(meeting.getId()), time.now()))
.toList();

return UserV2GetCreatedMeetingByUserResponseDto.of(meetingByUserDtos);
Expand All @@ -113,7 +113,7 @@ public UserV2GetAppliedMeetingByUserResponseDto getAppliedMeetingByUser(Integer
.map(apply -> ApplyV2GetAppliedMeetingByUserResponseDto.of(
apply.getId(), apply.getStatus().getValue(),
MeetingV2GetCreatedMeetingByUserResponseDto.of(apply.getMeeting(), apply.getMeeting().getUser(),
allApplies.getAppliedCount(apply.getMeetingId()), time.now())
allApplies.getApprovedCount(apply.getMeetingId()), time.now())
)).toList();

return UserV2GetAppliedMeetingByUserResponseDto.of(appliedMeetingByUserDtos);
Expand Down

0 comments on commit 85a2a59

Please sign in to comment.