Skip to content

Commit

Permalink
Merge pull request #158 from dnd-side-project/fix/#157-meeting
Browse files Browse the repository at this point in the history
[�Fix] 모임 일정 전체보기 (익명)
  • Loading branch information
f1v3-dev authored Dec 3, 2024
2 parents 69d037b + 71d9bf6 commit 38378ee
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 38378ee

Please sign in to comment.