Conversation
* refactor: 학습 로그 목록 조회 API에 order 요청 파라미터 추가 * refactor: 학습 로그 목록 조회 쿼리에 LATEST(최신순)/OLDEST(과거순) 정렬 분기 적용 * refactor: 여행 리포트 조회 시 관련 학습 로그 목록은 최신순으로 조회하도록 수정 * refactor: 학습 로그 목록 캐싱 방법 리팩토링 * test: 학습 로그 목록 조회 통합/단위 테스트 수정
chaiminwoo0223
approved these changes
Oct 17, 2025
Contributor
chaiminwoo0223
left a comment
There was a problem hiding this comment.
고생하셨습니다. 머지 부탁드립니다!
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.
📌 작업 내용 및 특이사항
✅ 학습 로그 목록 조회 정렬 로직 리팩토링
클라이언트로부터
LATEST(최신순)/OLDEST(과거순)를 요청 파라미터로 받아 정렬하도록 리팩토링했습니다.LATESTorOLDEST인지 검증하고, 두 값이 모두 아닐 경우 400 에러 처리되도록 구성했습니다.createdAt을 기준으로DESC정렬하고, 같은 값이 존재할 경우id를 기준으로DESC정렬 처리했습니다.과거순인 경우
createdAt을 기준으로ASC정렬하고, 같은 값이 존재할 경우id를 기준으로ASC정렬 처리했습니다.LATEST(최신순)을 고정했습니다.✅ 학습 로그 목록 캐싱 키 구조 리팩토링
order를 반영하지 않고 캐싱되면서 모든 상황에 동일한 결과가 조회되는 문제가 발생했습니다.:order: + order.toLowerCase()를 추가해 LATEST/OLDEST 경루를 각각 캐싱처리해주었습니다.✅ 테스트 코드 수정
StudyLogControllerIntegrationTest학습 로그 목록 조회 통합 테스트 코드를 수정했습니다.StudyLogQueryServiceTest학습 로그 목록 조회 단위 테스트 코드를 수정했습니다.🌱 관련 이슈
🔍 참고사항(선택)
📚 기타(선택)