Skip to content

Comments

refactor: DailyGoal 상세 조회 StampName 응답 → title 필드 활용으로 구조 개선(#59)#60

Merged
hisonghy merged 1 commit intodevelopfrom
refactor/59
Aug 16, 2025
Merged

refactor: DailyGoal 상세 조회 StampName 응답 → title 필드 활용으로 구조 개선(#59)#60
hisonghy merged 1 commit intodevelopfrom
refactor/59

Conversation

@hisonghy
Copy link
Contributor

📌 작업 내용 및 특이사항

✅ DailyGoal title 필드 추가

  • DailyGoal 엔티티에 title 필드를 추가했습니다.
  • 특정 데일리 목표 상세 조회 시, 여행 카테고리별 특정 스탬프의 이름을 함께 응답해야하는 요구사항을 반영했습니다.
  • 특정 데일리 목표를 조회할 때마다 매번 스탬프 이름을 추출해 응답하면 반복된 계산 로직이 발생하게 되고, 이를 방지하고자 DailyGoal 엔티티에 title 필드를 두어 관리하고 DailyGoal 생성 시 최초 1회만 스탬프 이름을 추출해 title로 지정하도록 구조를 구성했습니다.

✅ StudyLog 생성 로직 리팩토링

  • 기존에는 StudyLog 엔티티를 생성할 때 여행 카테고리별 특정 스탬프의 이름을 추출해 StudyLog.title 필드에 저장했지만, DailyGoal 엔티티에 title 필드를 관리하게 되면서 스탬프 이름 추출과 저장 책임은 DailyGoal에 넘기고 StudyLog.title에는 DailyGoal.title 값을 저장하도록 리팩토링했습니다.
  • 이에 따라 불필요해진 DailyMission 기반 Mission 및 Stamp 조회/검증 로직, 쿼리 메서드, 에러 코드를 제거했습니다.

✅ 테스트 코드 수정

  • DailyGoal.title 리팩토링에 따라 관련 테스트 코드를 수정했습니다.
  • StudyLog 생성 로직 변경에 따라 통합/단위 테스트 및 Fixture/Helper 클래스도 수정했습니다.

🌱 관련 이슈


🔍 참고사항(선택)


📚 기타(선택)

* refactor: DailyGoal title 필드 추가
* refactor: DailyGoalFacade.createDailyGoal() 로직 리팩토링 -> 여행 카테고리별 스탬프 이름을 추출하고 DailyGoal.title 필드로 지정하도록 리팩토링
* refactor: DailyGoalInfo 클래스에 title 필드 추가
* refactor: LoadDailyGoalDetailResponse DTO title 필드 추가

* refactor: StudyLogFacade.createStudyLog() 로직 리팩토링 -> 여행 카테고리별 스탬프 이름 추출 로직 제거, DailyGoal.title 필드를 StudyLog.title로 지정하도록 리팩토링
* refactor: DailyMission 기반 Stamp 조회 및 이름 추출 로직 제거

* test: DailyGoal title 리팩토링에 따른 테스트 수정
* test: StudyLogFacade 리팩토링에 맞춰 테스트 케이스 수정
@hisonghy hisonghy self-assigned this Aug 16, 2025
@hisonghy hisonghy added the 🪄refactor 기능 개선 및 리팩토링 label Aug 16, 2025
Copy link
Contributor

@chaiminwoo0223 chaiminwoo0223 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다. 머지 부탁드립니다!

@hisonghy hisonghy merged commit 1cfdc4d into develop Aug 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪄refactor 기능 개선 및 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🪄[REFACTOR]: DailyGoal 상세 조회 StampName 응답 → title 필드 활용으로 구조 개선

2 participants