Merged
Conversation
Contributor
chaiminwoo0223
left a comment
There was a problem hiding this comment.
고생하셨습니다. 코드 리뷰 남겼습니다. 피드백 부탁드려요~^^
src/test/java/com/ject/studytrip/studylog/application/service/StudyLogServiceTest.java
Show resolved
Hide resolved
src/main/java/com/ject/studytrip/studylog/application/facade/StudyLogFacade.java
Outdated
Show resolved
Hide resolved
src/main/java/com/ject/studytrip/studylog/domain/policy/StudyLogPolicy.java
Outdated
Show resolved
Hide resolved
chaiminwoo0223
approved these changes
Aug 7, 2025
Contributor
chaiminwoo0223
left a comment
There was a problem hiding this comment.
고생하셨습니다. 수정된 내용 모두 확인했습니다. 머지 부탁드려요!
* feat: StudyLogDailyMission 도메인 모델 구현 * feat: 학습 로그 생성 기능 구현 (뽀모도로 총 집중시간 업데이트, 스탬프 이름 추출, 학습 로그 미션 생성, 미션 완료 처리) * feat: 특정 여행의 학습 로그 목록을 조회하는 기능 구현 (슬라이스, 최신순 정렬, 포함된 학습 로그 미션까지 함께 조회) * test: StudyLogController 통합 테스트 추가 * test: StudyLogService, StudyLogDailyMissionService 단위 테스트 추가 * test: StudyLog 관련 Fixture, Helper 클래스 추가 * test: StampService, MissionService, PomodoroService 테스트 추가
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.
📌 작업 내용 및 특이사항
✅ StudyLogDailyMission 도메인 모델 구현
데일리 목표(DailyGoal)를 생성하고 학습을 완료한 후,학습 로그(StudyLog)를 생성할 때 학습을 완료한데일리 미션(DailyMission)(사용자가 선택한 데일리 미션)을 관리하기 위해StudyLogDailyMission엔티티를 추가했습니다.StudyLog와DailyMission사이의 중간 엔티티로 설계했습니다.StudyLogDailyMission엔티티로 구분해 관리하도록 설정했습니다.✅ 학습 로그 관련 application.dto 구성
StudyLogInfo: 학습 로그의 정보만 담는 응답 DTOStudyLogDetail: 학습 로그와 연관된 데일리 미션 정보를 함께 포함하는 상세 응답 DTOStudyLogDailyMissionInfo: 학습 로그에 포함된 각 데일리 미션의 정보를 담는 DTO✅ 학습 로그 생성 API 구현
사용자가 데일리 목표를 생성하고 뽀모도로 세션을 완료하면, 해당 미션들에 대한 학습 로그를 작성할 수 있도록 구성했습니다.
totalFocusTimeInSeconds값을 기반으로,Pomodoro엔티티의 총 집중시간 필드를 업데이트합니다.요청한 총 집중시간 필드가 음수일 경우 예외를 처리하도록 구성했습니다.
selectedDailyMissionIds리스트를 기반으로,StudyLogDailyMission엔티티를 함께 생성해 학습 로그에 연결된 미션들을 관리합니다.✅ 학습 로그 제목(title) 설정 로직
DailyMission -> Mission -> Stamp간 연관 관계가LAZY로딩으로 설정되어 있어 스탬프를 조회할 경우N+1문제가 발생할 수 있어 DailyMission 목록을 조회할 때,DailyMission,Mission,Stamp를 한 번의 쿼리로 가져오는 Fetch Join 쿼리를 구성했습니다.✅ 특정 여행 학습 로그 목록 조회 API 구현
Slice를 활용한 페이징 처리를 적용했습니다.StudyLog목록을 페이징해 조회하고, 각StudyLog에 포함된StudyLogDailyMission목록을 그룹화해 응답하도록 구성했습니다.✅ 테스트 코드
StudyLogController통합 테스트를 추가해 전체 흐름을 검증했습니다.StudyLogService,StudyLogDailyMission단위 테스트를 추가해 핵심 로직을 검증했습니다.Fixture,Helper클래스를 구성했습니다. (StudyLogFixture,StudyLogDailyMissionFixture,CreateStudyLogRequestFixture,StudyLogTestHelper,StudyLogDailyMissionTestHelper)StampService단위 테스트에 여행 카테고리별 대표 스탬프 이름을 조회하는 테스트(getStampNameByTripCategory)를 추가했습니다.MissionService단위 테스트에 미션을 완료하는 테스트(updateCompleted)를 추가했습니다.PomodoroService단위 테스트에 총 집중시간을 업데이트하는 테스트(updateTotalFocusTime)를 추가했습니다.🌱 관련 이슈
🔍 참고사항(선택)
📚 기타(선택)