Skip to content
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

Merged
merged 24 commits into from
Dec 2, 2023

Conversation

byeolhaha
Copy link
Member

@byeolhaha byeolhaha commented Dec 1, 2023

구현

  • 기존에 시간만 비교했던 잘못된 로직에서

  • 날짜와 시간 모두 비교하여 중복된 일정이 없는지 체크하는 로직으로 변경하였습니다.

  • 또한 중복된 일정을 만드는 경우 예외를 던지며 함께 중복된 대시보드의 아이디를 메세지로 전달합니다.

  • 학원 필터 조회 및 중심 위치에 조회의 방식을 무한스크롤 방식으로 수정하였습니다.

@byeolhaha byeolhaha self-assigned this Dec 1, 2023
@byeolhaha byeolhaha added the bug Something isn't working label Dec 1, 2023
wonu606
wonu606 previously approved these changes Dec 1, 2023
Copy link
Contributor

@wonu606 wonu606 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아프신데, 버그 빠르게 픽스해주셔서 감사합니다👍

Comment on lines +17 to +18
public static void checkOverlap(List<AcademySchedule> existedDateOverlappingSchedules,
List<GeneratedLessonSchedule> generatedSchedules) throws DateOverlapException {
Copy link
Contributor

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) {
Copy link
Contributor

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 ")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 쿼리를 굉장히 잘 사용하시네요!

@byeolhaha byeolhaha changed the title [Academy schedules] 스케줄 중복 여부 확인 로직 수정 [Academy 전반] 스케줄 중복 여부 확인 로직 수정 및 학원 데이터 무한스크롤 방식으로 수정 Dec 2, 2023
@byeolhaha byeolhaha merged commit b694e14 into develop Dec 2, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants