Skip to content

memberActivity 내부 lazy initialization exception 에러 해결#254

Merged
Hwangseoeun merged 2 commits intodevfrom
feature/#253-lazy_initialization_exception_error
Feb 2, 2026
Merged

memberActivity 내부 lazy initialization exception 에러 해결#254
Hwangseoeun merged 2 commits intodevfrom
feature/#253-lazy_initialization_exception_error

Conversation

@Hwangseoeun
Copy link
Member

@Hwangseoeun Hwangseoeun commented Feb 2, 2026

😉 연관 이슈

Resolves #253

🧑‍💻 수행 작업

  • memberActivity 내 '사용자의 활동 통계 및 작성한 인증 목록 전체 조회' V1 api가 LazyInitializationException이 터지는 문제 해결
  • V2 사용자 인증 목록 전체 조회 API 명세 문서 내 request url 내부 값 변경

📢 참고 사항

V2 문서 변경은 값만 하나 바꿔주면 되는 간단한 작업이여서 해당 PR에서 같이 처리하였습니다..!

Summary by CodeRabbit

주요 변경 사항

  • 리팩토링

    • 회원 활동 통계 및 인증 조회 기능을 통합하여 API 응답 구조를 개선했습니다.
    • 인증 데이터를 완료 날짜 또는 그룹 생성 날짜로 정렬하는 옵션을 추가했습니다.
  • 테스트

    • API 테스트를 리팩토링된 구조에 맞게 업데이트했습니다.

@Hwangseoeun Hwangseoeun self-assigned this Feb 2, 2026
@Hwangseoeun Hwangseoeun added the deploy 해당 라벨을 붙이면 배포 작업을 진행합니다. (붙이지 않으면 배포 작업이 진행되지 않고 머지만 됩니다.) label Feb 2, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

요약

Walkthrough

사용자의 활동 통계와 인증 정보를 조회하는 로직을 리팩토링했습니다. 분산된 메서드 호출들을 새로운 MyActivityStatsAndCertificationsDto를 통해 단일 서비스 메서드로 통합하고, 여러 헬퍼 메서드의 가시성을 private으로 변경했습니다.

Changes

Cohort / File(s) Summary
Service Layer Core
src/main/java/site/dogether/memberactivity/service/MemberActivityService.java
새로운 공개 메서드 getMyActivityStatsAndCertifications 추가; 기존 getMyTotalCertificationStats, getCertificationsByStatus, certificationsGroupedByCertificatedAt, certificationsGroupedByGroupCreatedAt의 가시성을 private으로 변경; 정렬 방식에 따른 그룹화 로직 추가
DTO 추가
src/main/java/site/dogether/memberactivity/service/dto/MyActivityStatsAndCertificationsDto.java
myCertificationStats, certifications, groupedCertifications를 포함하는 새로운 record DTO 추가
Controller 및 Test 업데이트
src/main/java/site/dogether/memberactivity/controller/v1/MemberActivityControllerV1.java, src/test/java/site/dogether/docs/memberactivity/v1/MemberActivityControllerV1DocsTest.java
기존 GroupedCertificationsDto 임포트를 MyActivityStatsAndCertificationsDto로 변경; 컨트롤러의 메서드 로직을 새로운 DTO 기반으로 리팩토링; 테스트 스텁을 새 메서드 호출로 업데이트
V2 Test 미세 조정
src/test/java/site/dogether/docs/memberactivity/v2/MemberActivityControllerV2DocsTest.java
sortBy 파라미터를 "TODO_COMPLETED_AT"에서 "CERTIFICATED_AT"로 변경

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • kelly6bf
✨ 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 feature/#253-lazy_initialization_exception_error

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.

@Hwangseoeun Hwangseoeun merged commit ebd1447 into dev Feb 2, 2026
7 of 8 checks passed
@Hwangseoeun Hwangseoeun deleted the feature/#253-lazy_initialization_exception_error branch March 17, 2026 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy 해당 라벨을 붙이면 배포 작업을 진행합니다. (붙이지 않으면 배포 작업이 진행되지 않고 머지만 됩니다.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BE] LazyInitializationException 에러 해결

1 participant