Skip to content

Commit

Permalink
fix: 모임 일정 전체보기 (익명)
Browse files Browse the repository at this point in the history
  • Loading branch information
f1v3-dev committed Dec 3, 2024
1 parent 69d037b commit 71d9bf6
Showing 1 changed file with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,26 @@ public PagedResponse<MeetingTimeResponseDto> getMeetingTimes(String uuid, Pageab
.select(dateOfSchedule.dateOfScheduleRank.count())
.fetchCount();

// 3. 익명 모임이 아닌 경우, 일정을 할당한 사용자의 닉네임 조회 후 추가
Boolean isAnonymous = from(meeting)
.where(meeting.meetingUuid.eq(uuid))
.select(meeting.isAnonymous)
.fetchOne();

// 3. 닉네임 조회
for (MeetingTime meetingTime : meetingTimeList) {
List<String> nicknames = from(dateOfSchedule)
.join(dateOfSchedule.schedule, schedule)
.join(schedule.meeting, meeting)
.where(meeting.meetingUuid.eq(uuid)
.and(dateOfSchedule.dateOfScheduleStart.eq(meetingTime.getStartTime()))
.and(dateOfSchedule.dateOfScheduleEnd.eq(meetingTime.getEndTime()))
.and(schedule.assignedAt.loe(requestTime)))
.select(schedule.scheduleNickname)
.fetch();

meetingTime.addMemberNames(nicknames);
if (Boolean.FALSE.equals(isAnonymous)) {
for (MeetingTime meetingTime : meetingTimeList) {
List<String> nicknames = from(dateOfSchedule)
.join(dateOfSchedule.schedule, schedule)
.join(schedule.meeting, meeting)
.where(meeting.meetingUuid.eq(uuid)
.and(dateOfSchedule.dateOfScheduleStart.eq(meetingTime.getStartTime()))
.and(dateOfSchedule.dateOfScheduleEnd.eq(meetingTime.getEndTime()))
.and(schedule.assignedAt.loe(requestTime)))
.select(schedule.scheduleNickname)
.fetch();

meetingTime.addMemberNames(nicknames);
}
}

// 4. PageInfo 생성
Expand Down

0 comments on commit 71d9bf6

Please sign in to comment.