Skip to content

Comments

[Feat] record 도메인 리팩토링#220

Merged
jangsh7 merged 2 commits intodevelopfrom
feat/record-219-record-refactor
Feb 11, 2026
Merged

[Feat] record 도메인 리팩토링#220
jangsh7 merged 2 commits intodevelopfrom
feat/record-219-record-refactor

Conversation

@jangsh7
Copy link
Contributor

@jangsh7 jangsh7 commented Feb 11, 2026

🔗 관련 이슈

관련된 이슈 번호를 적어주세요.

closes #219

📌 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요.

  • record 도메인 리팩토링

🧪 테스트 결과

Postman 스크린샷, 테스트 통과 여부 등을 첨부해주세요.

📸 스크린샷 (선택)

필요시 스크린샷을 첨부해주세요.

📎 참고 사항 (선택)

리뷰어에게 전달할 내용이 있다면 작성해주세요.

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 일일 리포트 표시 개선으로 더 풍부한 기록 정보 제공
    • 오늘의 기록 타임라인 조회 기능 강화
    • 검색 결과 표시 개선
    • 최근 검색어 기능 추가
  • 문서

    • AI 피드백 관련 라벨 업데이트 적용

@jangsh7 jangsh7 self-assigned this Feb 11, 2026
@jangsh7 jangsh7 added the ♻️Refactor 리팩토링 label Feb 11, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Walkthrough

레코드 도메인 DTO 변환 로직을 개별 DTO 클래스에서 중앙화된 RecordConverter로 이전하는 리팩토링입니다. 여러 DTO 클래스의 정적 팩토리 메서드를 제거하고, RecordServiceImpl을 converter 메서드 호출로 업데이트했습니다.

Changes

Cohort / File(s) Summary
Documentation
README.md
BE Team 섹션의 5번째 열 레이블을 "기록/리포트"에서 "기록/리포트/AI피드백"로 업데이트.
Converter Layer
src/main/java/com/umc/finly/domain/record/converter/RecordConverter.java
7개의 새로운 DTO 변환 메서드 추가: toDailyReportRes, toTodayRecordRes, toTimelineEntry, generatePrismTitle, toSearchRes, toSearchEntry, toRecentSearchRes. 기존 toCreateRes, toDetailRes, toUpdateRes 메서드를 빌더 기반 구현으로 변경.
Feedback Converter
src/main/java/com/umc/finly/domain/record/converter/RecordFeedbackConverter.java
RecordFeedbackResDTO.from(feedback) 호출을 명시적 빌더 기반 구성으로 교체.
Response DTOs
src/main/java/com/umc/finly/domain/record/dto/response/DailyReportResDTO.java, RecentSearchResDTO.java, RecordCreateResDTO.java, RecordDetailResDTO.java, RecordFeedbackResDTO.java, RecordSearchResDTO.java, RecordUpdateResDTO.java, TodayRecordResDTO.java
각 DTO에서 정적 팩토리 메서드(from(), generatePrismTitle() 등) 제거. 변환 책임을 RecordConverter로 이전. 불필요한 엔티티 임포트 정리.
Service Layer
src/main/java/com/umc/finly/domain/record/service/RecordServiceImpl.java
DTO 생성을 위한 직접 구성 로직을 RecordConverter 메서드 호출로 대체: getDailyReport, getTodayRecords, searchRecords, getRecentSearchKeywords 메서드 내부 리팩토링.

Possibly related PRs

Suggested reviewers

  • ye-zin
  • wonee1
  • na311ng
  • yjhss
  • dosp74
🚥 Pre-merge checks | ✅ 1 | ❌ 4
❌ Failed checks (2 warnings, 2 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning README.md의 UI 텍스트 업데이트('기록/리포트' → '기록/리포트/AI피드백')는 record 도메인 리팩토링 범위와 무관해 보이는 변경입니다. README.md의 UI 텍스트 변경이 #219 리팩토링과의 연관성을 명확히 하거나, 범위 외 변경이라면 별도 PR로 분리해주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 68.75% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive PR 설명이 템플릿 구조를 따르고 있으나, 작업 내용이 '리팩토링' 일반적 설명에 그쳐 구체적 변경 사항이 부족하고 테스트 결과가 첨부되지 않았습니다. 작업 내용 섹션에서 구체적인 리팩토링 변경 사항(DTO 변환 로직 이동, 팩토리 메서드 제거 등)을 설명하고 테스트 결과를 추가해주세요.
Linked Issues check ❓ Inconclusive 연결된 이슈 #219가 구체적인 요구사항 없이 일반적인 '리팩토링' 설명만 있어, PR의 변경 사항이 특정 목표를 충족하는지 명확하게 검증하기 어렵습니다. 연결된 이슈 #219에 구체적인 리팩토링 목표와 요구사항을 상세히 작성하여 PR 검증의 명확한 기준을 제공해주세요.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 record 도메인 리팩토링을 명확하게 설명하고 있으며, 변경 사항의 주요 내용과 직접적으로 일치합니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/record-219-record-refactor

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
src/main/java/com/umc/finly/domain/record/converter/RecordConverter.java (2)

164-179: toTimelineEntry, toSearchEntry 등 내부 헬퍼 메서드의 가시성을 private으로 변경 고려

toTimelineEntry, toSearchEntry, generatePrismTitle은 현재 public으로 선언되어 있지만, 이 클래스 내부에서만 호출되는 것으로 보입니다. 외부에서 직접 호출할 필요가 없다면 private으로 변경하여 API 표면을 줄이고 캡슐화를 강화하는 것이 좋습니다.

♻️ 가시성 변경 제안
-    public TodayRecordResDTO.TimelineEntry toTimelineEntry(RecordEntry entry, Stock stock) {
+    private TodayRecordResDTO.TimelineEntry toTimelineEntry(RecordEntry entry, Stock stock) {
-    public String generatePrismTitle(List<RecordEntry> entries) {
+    private String generatePrismTitle(List<RecordEntry> entries) {
-    public RecordSearchResDTO.SearchEntry toSearchEntry(RecordEntry entry, Stock stock) {
+    private RecordSearchResDTO.SearchEntry toSearchEntry(RecordEntry entry, Stock stock) {
#!/bin/bash
# 이 헬퍼 메서드들이 외부에서 호출되는지 확인
rg -n --type=java 'toTimelineEntry|toSearchEntry|generatePrismTitle' -g '!**/RecordConverter.java'

Also applies to: 214-229


137-161: LocalDateTime.now() 사용에 대한 참고

Line 146에서 LocalDateTime.now()를 직접 호출하고 있습니다. 현재 로직상 큰 문제는 없지만, 향후 테스트 용이성을 위해 Clock을 주입받는 방식을 고려할 수 있습니다. 지금 당장 변경할 필요는 없으나 참고해 주세요.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jangsh7 jangsh7 merged commit 04b6d90 into develop Feb 11, 2026
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] record 도메인 리팩토링

3 participants