-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Academy 전반] 스케줄 중복 여부 확인 로직 수정 및 학원 데이터 무한스크롤 방식으로 수정 #102
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.
아프신데, 버그 빠르게 픽스해주셔서 감사합니다👍
public static void checkOverlap(List<AcademySchedule> existedDateOverlappingSchedules, | ||
List<GeneratedLessonSchedule> generatedSchedules) throws DateOverlapException { |
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.
변수명 단번에 이해했어요! 너무 잘 지은 것 같습니다👍
} | ||
} | ||
|
||
private static boolean checkOverlap(AcademySchedule existedSchedule, GeneratedLessonSchedule generatedSchedule) { |
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.
함수를 나누니까 깔끔해서 보기 좋습니다!👍
@Query("select ash from AcademySchedule as ash " + | ||
"join fetch ash.academyTimeTemplate as att " + | ||
"where att.childId =:childId " + | ||
"and ash.scheduleDate between :startDateOfAttendance and :endDateOfAttendance ") |
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.
오 쿼리를 굉장히 잘 사용하시네요!
구현
기존에 시간만 비교했던 잘못된 로직에서
날짜와 시간 모두 비교하여 중복된 일정이 없는지 체크하는 로직으로 변경하였습니다.
또한 중복된 일정을 만드는 경우 예외를 던지며 함께 중복된 대시보드의 아이디를 메세지로 전달합니다.
학원 필터 조회 및 중심 위치에 조회의 방식을 무한스크롤 방식으로 수정하였습니다.