-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
전체 일정 보기 - 익명 #157
Labels
bug
Something isn't working
Comments
MeetingRepositoryImpl.java - getMeetingTimes 메서드 아래와 같이 변경해봤는데 뭔가 별로인거같은데 더 좋은 방법이 있을까요? // 3. 익명 모임이 아닌 경우, 일정을 할당한 사용자의 닉네임 조회 후 추가
Boolean isAnonymous = from(meeting)
.where(meeting.meetingUuid.eq(uuid))
.select(meeting.isAnonymous)
.fetchOne();
for (MeetingTime meetingTime : meetingTimeList) {
// isAnonymous = true 일 경우, 익명1, 익멱2, ... 형식으로 닉네임을 넣어줘야 함
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();
if (Boolean.FALSE.equals(isAnonymous)) {
meetingTime.addMemberNames(nicknames);
} else {
List<String> anonymousNicknames = new ArrayList<>();
for (int i = 1; i <= nicknames.size(); i++) {
anonymousNicknames.add("익명" + i);
}
meetingTime.addMemberNames(anonymousNicknames);
}
} |
기존 로직 // 3. 익명 모임이 아닌 경우, 일정을 할당한 사용자의 닉네임 조회 후 추가
Boolean isAnonymous = from(meeting)
.where(meeting.meetingUuid.eq(uuid))
.select(meeting.isAnonymous)
.fetchOne();
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);
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🚨 어떤 버그인가요?
전체 보기를 클릭했을 때, 익명이여도 사용자의 입력한 사용자명이 나오게 됩니다.
The text was updated successfully, but these errors were encountered: