[feat] 공강 우선순위 시간표 추천 로직 구현#25
Open
Nanajun22 wants to merge 15 commits into
Open
Conversation
…o feat/Recommend-free-days
…o feat/Recommend-free-days
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
작업 내용
SelectedTimetable: 기존 RecommendService 가 하는 일이 많아 확정된 추천 시간표 객체를 추가해 상태와 데이터를 관리하는 책임을 분리했습니다.RecommendStrategy: 시간표 추천 로직에 전략 패턴 적용해 추후 추천 조건이 추가할 때 확장이 간편하게 개선했습니다.전략은
FreePeriodStrategy와LectureCriteriaStrategy가 구현되어 있으며 기존 수강기준 추천 로직은LectureCriteriaStrategy에 있으며 공강 우선 추천 기준 로직은FreePeriodStrategy에 구현되어 있습니다.추가로
init.sql에 테스트를 위한 sql 쿼리 정리해두었습니다. 강의 정보는 실제 개설과목으로 작성했고 추후 더 추가해 실제 서비스에서 사용할 예정입니다.관련 이슈
작업 유형
테스트 결과
요청 / 응답 예시
Request
Response
{ "isSuccess": true, "code": "COMMON_200_1", "message": "요청 응답 성공", "data": { "totalCredits": 19, "preferredFreeDays": [], "timetables": [ { "lectureId": 80085, "lectureName": "College English 2", "credit": 2, "professor": "Rachel Lynn Stotts", "classroom": "글로벌센터-207", "lectureClassification": "LIBERAL_REQUIREMENT", "lectureTime": [ { "startTime": "09:00", "endTime": "11:00", "dayOfWeek": "WED" } ] }, { "lectureId": 80008, "lectureName": "AI 중심세상 (실시간화상강의)", "credit": 2, "professor": null, "classroom": "화상강의강의실(가상)", "lectureClassification": "LIBERAL_REQUIREMENT", "lectureTime": [ { "startTime": "15:00", "endTime": "17:00", "dayOfWeek": "WED" } ] }, { "lectureId": 80155, "lectureName": "비즈니스와 통계", "credit": 3, "professor": "양숙희", "classroom": "가천관-715", "lectureClassification": "MAJOR_REQUIREMENT", "lectureTime": [ { "startTime": "12:00", "endTime": "15:00", "dayOfWeek": "WED" } ] }, { "lectureId": 70001, "lectureName": "경제학입문", "credit": 3, "professor": "오주현", "classroom": "가천관-513", "lectureClassification": "MAJOR_REQUIREMENT", "lectureTime": [ { "startTime": "13:00", "endTime": "16:00", "dayOfWeek": "TUE" } ] }, { "lectureId": 10029, "lectureName": "조직행동", "credit": 3, "professor": null, "classroom": null, "lectureClassification": "MAJOR_REQUIREMENT", "lectureTime": [] }, { "lectureId": 10057, "lectureName": "경영정보 (12주)", "credit": 3, "professor": "임외석", "classroom": "가천관-715", "lectureClassification": "MAJOR_REQUIREMENT", "lectureTime": [ { "startTime": "09:00", "endTime": "13:00", "dayOfWeek": "TUE" } ] }, { "lectureId": 10003, "lectureName": "재무관리", "credit": 3, "professor": "심형섭", "classroom": "가천관-713", "lectureClassification": "MAJOR_REQUIREMENT", "lectureTime": [ { "startTime": "17:00", "endTime": "18:00", "dayOfWeek": "MON" }, { "startTime": "16:00", "endTime": "18:00", "dayOfWeek": "TUE" } ] } ] } }