Skip to content

[WTH-451] 마이페이지 api 수정 - #93

Merged
soo0711 merged 5 commits into
devfrom
fix/WTH-451-마이페이지-api-수정
Jul 20, 2026

Hidden character warning

The head ref may contain hidden characters: "fix/WTH-451-\ub9c8\uc774\ud398\uc774\uc9c0-api-\uc218\uc815"
Merged

[WTH-451] 마이페이지 api 수정#93
soo0711 merged 5 commits into
devfrom
fix/WTH-451-마이페이지-api-수정

Conversation

@soo0711

@soo0711 soo0711 commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

📌 Summary

어떤 작업인지 한 줄 요약해 주세요.

마이페이지 api 수정

📝 Changes

변경사항을 what, why, how로 구분해 작성해 주세요.

What

멀티프로필 생성, 수정
동아리별 내가 쓴 글, 세션 조회
대시보드 프로필 수정

Why

피그마와 불일치한 응답 수정

How

  • usingClubs 응답 추가
  • isNew 응답 추가
  • 동아리 기준 마이페이지 API 추가
  • 홈 대시보드 사용자 정보 멀티프로필 기준으로 변경

📸 Screenshots / Logs

필요시 스크린샷 or 로그를 첨부해주세요.

  • 대시보드 (fallback, 멀티프로필 적용 전은 기본 정보)
스크린샷 2026-07-19 오후 8 16 08
  • 동아리별 내가 쓴 글
스크린샷 2026-07-19 오후 8 15 38
  • 생성
스크린샷 2026-07-19 오후 8 13 43

💡 Reviewer 참고사항

리뷰에 참고할 내용을 작성해주세요.

✅ Checklist

  • PR 제목 설정 완료 (WTH-123 인증 필터 설정)
  • 테스트 구현 완료
  • 리뷰어 등록 완료
  • 자체 코드 리뷰 완료

Summary by CodeRabbit

  • 새로운 기능

    • 클럽별 마이페이지에서 내가 작성한 게시글과 참석한 세션을 조회할 수 있습니다(클럽 기준으로 요청).
    • 내 게시글에 최근 24시간 이내 신규 여부(isNew)가 표시됩니다.
    • 프로필 생성/수정 시 사용 중인 클럽 정보가 함께 제공됩니다.
  • 개선

    • 게시글·출석이 선택한 클럽 범위로 정확히 필터링됩니다.
    • 클럽 활성 멤버 조건을 만족할 때만 게시글·출석이 조회됩니다.
    • 대시보드의 “내 정보”가 현재 클럽 프로필 기준으로 표시됩니다.
    • 기존의 me/posts, me/attended-sessions 조회 API는 제거되었습니다.

@soo0711
soo0711 requested a review from hyxklee July 19, 2026 11:26
@soo0711 soo0711 self-assigned this Jul 19, 2026
@soo0711 soo0711 added 🐞 BugFix 버그 수정 🔨 Refactor 코드 구조 개선 및 리팩토링 labels Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6cf40f72-4d20-4731-b23d-991217718dd5

📥 Commits

Reviewing files that changed from the base of the PR and between 8fa5b5a and de6b2bd.

📒 Files selected for processing (2)
  • src/main/kotlin/com/weeth/domain/user/application/usecase/query/GetUserPostQueryService.kt
  • src/test/kotlin/com/weeth/domain/user/application/usecase/query/GetUserPostQueryServiceTest.kt
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/main/kotlin/com/weeth/domain/user/application/usecase/query/GetUserPostQueryService.kt
  • src/test/kotlin/com/weeth/domain/user/application/usecase/query/GetUserPostQueryServiceTest.kt

📝 Walkthrough

Walkthrough

마이페이지 게시글·출석 조회가 클럽 범위와 활성 멤버십을 기준으로 동작하도록 변경되었습니다. 새 클럽 회원용 API가 추가되었고, 대시보드와 사용자 프로필 응답에 클럽 관련 정보가 포함됩니다.

Changes

클럽 범위 마이페이지 조회

Layer / File(s) Summary
클럽 범위 조회와 응답 매핑
src/main/kotlin/com/weeth/domain/{attendance,board}/..., src/main/kotlin/com/weeth/domain/user/application/..., src/test/kotlin/com/weeth/domain/user/application/...
게시글·출석 조회에 clubId와 활성 멤버 검증을 추가하고, 게시글 응답에 24시간 이내 생성 여부인 isNew를 추가했습니다.
클럽별 마이페이지 API 전환
src/main/kotlin/com/weeth/domain/user/presentation/*Controller.kt, src/test/kotlin/com/weeth/domain/user/presentation/*ControllerTest.kt
클럽별 게시글·출석 조회 컨트롤러를 추가하고 기존 사용자 컨트롤러의 관련 엔드포인트를 제거했습니다.

대시보드 멤버 정보 매핑

Layer / File(s) Summary
ClubMember 기반 대시보드 매핑
src/main/kotlin/com/weeth/domain/dashboard/..., src/test/kotlin/com/weeth/domain/dashboard/...
대시보드의 내 정보 생성을 ClubMember 기반으로 변경하고 UserReader 의존성을 제거했습니다.

프로필 클럽 정보 응답

Layer / File(s) Summary
프로필의 usingClubs 구성
src/main/kotlin/com/weeth/domain/user/application/usecase/command/ManageUserProfileUseCase.kt, src/test/kotlin/com/weeth/domain/user/application/usecase/command/ManageUserProfileUseCaseTest.kt
프로필 생성·수정 응답에 활성 클럽 멤버십을 usingClubs로 포함했습니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant ClubMemberMyPageController
  participant GetUserAttendanceQueryService
  participant ClubMemberPolicy
  participant AttendanceReader
  Client->>ClubMemberMyPageController: GET /clubs/{clubId}/users/me/attended-sessions
  ClubMemberMyPageController->>GetUserAttendanceQueryService: getAttendedSessions(userId, clubId, page)
  GetUserAttendanceQueryService->>ClubMemberPolicy: getActiveMember(clubId, userId)
  GetUserAttendanceQueryService->>AttendanceReader: findByUserIdAndClubIdAndStatus(userId, clubId, ATTEND, pageable)
  AttendanceReader-->>GetUserAttendanceQueryService: Slice<Attendance>
  GetUserAttendanceQueryService-->>ClubMemberMyPageController: SliceResponse<UserAttendedSessionResponse>
  ClubMemberMyPageController-->>Client: CommonResponse
Loading

Possibly related PRs

Suggested labels: 📬 API

Suggested reviewers: hyxklee

Poem

클럽 범위 따라 당근 굴러가고,
새 글 표시에 귀가 쫑긋,
출석 기록도 한곳에 모여
프로필엔 클럽 꽃 피네. 🐰

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 제목이 마이페이지 API 수정이라는 핵심 변경을 짧고 명확하게 요약합니다.
Description check ✅ Passed Summary, Changes(What/Why/How), Screenshots, Checklist가 갖춰져 있어 템플릿 요구사항을 대부분 충족합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/WTH-451-마이페이지-api-수정

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.

val pageable = PageRequest.of(pageNumber, pageSize)
val posts = postReader.findMyActivePosts(userId, pageable)
return SliceResponse.from(posts.map(userPostMapper::toMyPostResponse))
val now = LocalDateTime.now()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Clock Bean을 쓰지 않아도 될까용?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

앗! 빼먹었네염.. 추가하도록 하겠습니다!

@hyxklee hyxklee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

고생하셨습니다! clock 관련된 코멘트만 한 번 확인해주세요!

@soo0711
soo0711 merged commit 68298a4 into dev Jul 20, 2026
2 checks passed
@soo0711
soo0711 deleted the fix/WTH-451-마이페이지-api-수정 branch July 20, 2026 12:28
soo0711 added a commit that referenced this pull request Jul 27, 2026
* [WTH-433] 마이페이지 UI 변경에 맞춰 멀티프로필 api 구현 (#90)

* feat: 유저 프로필 엔티티 추가

* feat: 유저 프로필 레포 추가

* feat: 멀티프로필 DTO

* feat: 유저 프로필 Mapper

* feat: 유저 프로필 파일 타입 추가

* feat: 멀티프로필 생성, 조회 API 추가

* feat: 멀티프로필 생성, 조회 API 추가

* feat: 멀티프로필 수정 API 추가

* feat: 동아리별 멀티프로필 로직 추가

* feat: 동아리별 멀티프로필 API 추가

* feat: 멀티프로필 삭제 및 동시성 제어 추가

* feat: 내 동아리 목록에 사용 프로필 추가

* feat: 게시글 작성자 프로필을 멀티프로필에 맞춰 변경

* feat: 댓글 작성자 프로필을 멀티프로필에 맞춰 변경

* refactor: 작성자 프로필 매핑 중복 제거

* feat: 대시보드 게시글 작성자 정보 멀티프로필로 변경

* feat: 마이페이지 요약 조회 API 추가

* feat: 마이페이지 요약 조회 API 추가

* feat: 내가 쓴 글 조회 API 추가

* feat: 출석한 세션 조회 API 추가

* docs: 기존 동아리 프로필 API deprecated 표시

* refactor: 마이그레이션 쿼리 추가

* refactor: 기존 기능 삭제

* refactor: 리뷰 반영

* refactor: 리뷰 반영

* refactor: 리뷰 반영

* refactor: 무한스크롤로 변경

* refactor: 마이페이지 동아리 목록 기본값 제거

* refactor: 마이페이지 이미지 삭제 API 분리

* refactor: 멀티프로필 마이그레이션 버전 수정

* [WTH-450]  v11 마이그레이션 수정 (#92)

* fix: v11 마이그레이션 수정

* refactor: 게시글 조회 생성시간 응답

* refactor: 멀티프로필 생성시 동아리 필수 선택

* [WTH-451] 마이페이지 api 수정 (#93)

* refactor: 멀티프로필 응답 usingClubs 수정

* refactor: 마이페이지 게시글 isNew 응답 추가

* refactor: 마이페이지 활동을 동아리 기준으로 조회

* refactor: 홈 대시보드 사용자 정보 멀티프로필로 수정

* refactor: 게시글 조회 시간 Clock 주입으로 변경

* [WTH-454] 마이페이지 수정사항 반영 (#94)

* refactor: 마이페이지 요약에 현재 사용 중인 멀티프로필 추가

* refactor: 마이페이지 통계 현재 동아리 기준으로 수정

* feat: 프로필 사용 가능 동아리 목록 조회 추가

* refactor: 멤버 카운트 n+1 방지
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix 버그 수정 🔨 Refactor 코드 구조 개선 및 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants