Skip to content

[Refactor] 감정 골든 타임 API 응답 구조 수정#222

Merged
ye-zin merged 1 commit intodevelopfrom
refactor/analysis-221-emotion-response
Feb 12, 2026
Merged

[Refactor] 감정 골든 타임 API 응답 구조 수정#222
ye-zin merged 1 commit intodevelopfrom
refactor/analysis-221-emotion-response

Conversation

@ye-zin
Copy link
Collaborator

@ye-zin ye-zin commented Feb 12, 2026

🔗 관련 이슈

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

closes #221

📌 작업 내용

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

  • API 응답 구조 형식에 유저 닉네임 추가

🧪 테스트 결과

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

image image

📸 스크린샷 (선택)

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

📎 참고 사항 (선택)

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

Summary by CodeRabbit

새 기능

  • 감정 분석의 골든타임 응답 결과에 사용자 닉네임 정보가 포함되도록 개선되었습니다.

@ye-zin ye-zin self-assigned this Feb 12, 2026
@ye-zin ye-zin added the ♻️Refactor 리팩토링 label Feb 12, 2026
@ye-zin ye-zin linked an issue Feb 12, 2026 that may be closed by this pull request
2 tasks
@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

Walkthrough

감정 골든 타임 API 응답에 사용자 닉네임 필드를 추가했습니다. EmotionAnalysisConverter의 toGoldenTimeResDTO 메서드 시그니처를 변경하여 nickname 파라미터를 받도록 하고, GoldenTimeResDTO에 nickname 필드를 추가했으며, EmotionAnalysisServiceImpl에서 MemberRepository를 통해 회원 정보를 조회하여 닉네임을 추출하도록 구현했습니다.

Changes

Cohort / File(s) Summary
DTO 구조 확장
src/main/java/com/umc/finly/domain/analysis/emotion/dto/response/GoldenTimeResDTO.java, src/main/java/com/umc/finly/domain/analysis/emotion/converter/EmotionAnalysisConverter.java
GoldenTimeResDTO에 nickname 필드 추가 및 Member import 추가. EmotionAnalysisConverter의 toGoldenTimeResDTO 메서드에 String nickname 파라미터 추가하여 빌더에 전달.
서비스 레이어 확장
src/main/java/com/umc/finly/domain/analysis/emotion/service/EmotionAnalysisServiceImpl.java
MemberRepository 주입 추가. getEmotionGoldenTime 메서드에서 memberId로 Member 조회하여 nickname을 추출하고, converter 호출 시 nickname 파라미터 전달.

Possibly related issues

Possibly related PRs

  • [Feat] 감정 골든 타임 API #147 (Finly-backend): GoldenTime DTO 및 EmotionAnalysisConverter/Service를 직접 수정하여 새 nickname 필드를 추가하고 전달하는 동일한 기능 확장을 다룸.

Suggested reviewers

  • wonee1
  • na311ng
  • yjhss
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 사항을 명확하게 반영하고 있습니다. 감정 골든 타임 API 응답 구조 수정이라는 핵심 변경사항이 잘 드러나 있습니다.
Description check ✅ Passed PR 설명이 템플릿을 따르고 있으며, 관련 이슈, 작업 내용, 테스트 결과를 포함하고 있습니다.
Linked Issues check ✅ Passed 코드 변경사항이 #221 이슈의 요구사항(감정 골든 타임 API에 사용자 닉네임 응답 추가)을 완전히 충족하고 있습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 #221 이슈의 범위 내에서 이루어졌습니다. 불필요한 변경이나 범위 외 수정사항이 없습니다.

✏️ 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 refactor/analysis-221-emotion-response

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
src/main/java/com/umc/finly/domain/analysis/emotion/dto/response/GoldenTimeResDTO.java (1)

3-3: 사용되지 않는 Member import입니다.

이 DTO에서는 Member 엔티티를 직접 참조하지 않고, String nickname만 사용합니다. 불필요한 import를 제거해 주세요.

♻️ 수정 제안
-import com.umc.finly.domain.member.entity.Member;
src/main/java/com/umc/finly/domain/analysis/emotion/service/EmotionAnalysisServiceImpl.java (1)

31-37: memberRepository 필드 위치를 다른 repository 필드들과 함께 그룹화해 주세요.

현재 memberRepositoryMAX_KEYWORDS 상수 아래에 위치해 있어 다른 repository 필드(stockRepository, emotionAnalysisRepository)와 분리되어 있습니다. 가독성을 위해 함께 모아두는 것이 좋습니다.

♻️ 수정 제안
     private final StockRepository stockRepository;
     private final EmotionAnalysisRepository emotionAnalysisRepository;
     private final EmotionAnalysisConverter emotionAnalysisConverter;
+    private final MemberRepository memberRepository;

     // 키워드 추출 상위 8개
     private static final int MAX_KEYWORDS = 8;
-    private final MemberRepository memberRepository;

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.

@ye-zin ye-zin merged commit 3bb3ac5 into develop Feb 12, 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] 감정 골든 타임 API 유저 이름 응답 추가

3 participants