-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Feat#65] 안건 순서 수정 기능 개발 #66
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기능 구현 잘 해주셨네요! 고생많으셨습니다 😄
if (agendaList.size() != agendaIds.stream().distinct().count()) { | ||
throw new BadRequestError(BadRequestError.ErrorCode.VALIDATION_FAILED, | ||
Collections.singletonMap("AgendaIds", "Agenda Ids are not unique")); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예외 처리 좋습니다 👍
for (int i = 0; i < agendaIds.size(); i++) { | ||
Long agendaId = agendaIds.get(i); | ||
Agenda agenda = agendaList.stream() | ||
.filter(a -> a.getId().equals(agendaId)) | ||
.findFirst() | ||
.orElseThrow(() -> new NotFoundError(ErrorCode.RESOURCE_NOT_FOUND, | ||
Collections.singletonMap("AgendaId", "Agenda Id " + agendaId + " not found"))); | ||
agenda.setOrderNum(i + 1); | ||
} | ||
agendaList.sort(Comparator.comparing(Agenda::getOrderNum)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로직 잘 짜여졌네요 !!
if (agendaList.size() != agendaIds.size()) { | ||
throw new BadRequestError(BadRequestError.ErrorCode.VALIDATION_FAILED, | ||
Collections.singletonMap("AgendaIds", "Agenda Ids size is not matched")); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
예외 처리 다 잘 진행되었네요 :)
🔗 Linked Issue
resolved: #65
🛠 개발 기능
🧩 해결 방법
🔍 리뷰 포인트
📋 Code Review Priority Guideline