Skip to content

Feat: [FN-325] 내가 신청한 가입 신청 리스트 조회 API 추가#14

Merged
stoneTiger0912 merged 3 commits intomainfrom
feat/find-my-join-list
Mar 1, 2026
Merged

Feat: [FN-325] 내가 신청한 가입 신청 리스트 조회 API 추가#14
stoneTiger0912 merged 3 commits intomainfrom
feat/find-my-join-list

Conversation

@stoneTiger0912
Copy link
Member

@stoneTiger0912 stoneTiger0912 commented Mar 1, 2026

Summary by CodeRabbit

  • New Features

    • 사용자가 자신의 그룹 가입 신청 목록을 조회할 수 있는 새로운 API 엔드포인트가 추가되었습니다. 사용자 ID를 기반으로 신청 정보를 검색하여 조회 가능합니다.
  • Chores

    • 주석 정리

@stoneTiger0912 stoneTiger0912 self-assigned this Mar 1, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 1, 2026

Walkthrough

사용자가 신청한 그룹 가입 요청 목록을 조회하는 새로운 기능이 추가되었습니다. MeController 엔드포인트를 통해 X-USER-ID 헤더로 사용자를 식별하고, 계층화된 아키텍처(서비스, 리포지토리)를 따라 데이터를 조회하여 응답합니다.

Changes

Cohort / File(s) Summary
컨트롤러 계층
src/main/java/flipnote/group/adapter/in/web/MeController.java, src/main/java/flipnote/group/adapter/in/web/JoinController.java
새로운 MeController 클래스 추가로 /v1/joins/me 엔드포인트 구현; FindMyJoinListUseCase 주입 및 사용자별 가입 목록 조회. JoinController에서 불필요한 TODO 주석 제거.
DTO 계층
src/main/java/flipnote/group/api/dto/response/FindMyJoinListResponseDto.java
FindMyJoinListResult를 API 응답으로 변환하는 DTO 레코드 추가; List 필드 및 팩토리 메서드 포함.
애플리케이션 포트 계층
src/main/java/flipnote/group/application/port/in/FindMyJoinListUseCase.java, src/main/java/flipnote/group/application/port/in/result/FindMyJoinListResult.java, src/main/java/flipnote/group/application/port/out/JoinRepositoryPort.java
사용자 가입 목록 조회 인터페이스와 결과 레코드 추가; JoinRepositoryPort에 findMyJoinList 메서드 확장.
서비스 계층
src/main/java/flipnote/group/application/service/FindMyJoinListService.java
FindMyJoinListUseCase 구현 서비스 추가; JoinRepositoryPort를 활용하여 엔티티를 결과 객체로 변환.
리포지토리 계층
src/main/java/flipnote/group/adapter/out/persistence/JoinRepositoryAdapter.java, src/main/java/flipnote/group/infrastructure/persistence/jpa/JoinRepository.java
JoinRepositoryAdapter에 findMyJoinList 메서드 추가; JPA 레포지토리에 findAllByUserId 쿼리 메서드 추가.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant MeController
    participant FindMyJoinListService
    participant JoinRepositoryPort
    participant JoinRepositoryAdapter
    participant JoinRepository
    participant Database

    Client->>MeController: GET /v1/joins/me (X-USER-ID: userId)
    activate MeController
    MeController->>FindMyJoinListService: findMyJoinList(userId)
    activate FindMyJoinListService
    FindMyJoinListService->>JoinRepositoryPort: findMyJoinList(userId)
    activate JoinRepositoryPort
    JoinRepositoryPort->>JoinRepositoryAdapter: findMyJoinList(userId)
    activate JoinRepositoryAdapter
    JoinRepositoryAdapter->>JoinRepository: findAllByUserId(userId)
    activate JoinRepository
    JoinRepository->>Database: Query JoinEntity by userId
    activate Database
    Database-->>JoinRepository: List<JoinEntity>
    deactivate Database
    JoinRepository-->>JoinRepositoryAdapter: List<JoinEntity>
    deactivate JoinRepository
    JoinRepositoryAdapter-->>JoinRepositoryPort: List<JoinEntity>
    deactivate JoinRepositoryAdapter
    deactivate JoinRepositoryPort
    FindMyJoinListService->>FindMyJoinListService: FindMyJoinListResult.of(joinList)
    FindMyJoinListService-->>MeController: FindMyJoinListResult
    deactivate FindMyJoinListService
    MeController->>MeController: FindMyJoinListResponseDto.from(result)
    MeController-->>Client: 200 OK + FindMyJoinListResponseDto
    deactivate MeController
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly Related PRs

Poem

🐰✨ 사용자의 신청 목록을 가져오는
새로운 길을 만들었네요!
컨트롤러부터 데이터베이스까지,
계층이 조화롭게 춤을 추며
마이 조인 기능이 완성되었어요! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용과 완벽하게 일치합니다. 사용자가 신청한 가입 신청 리스트 조회 API 추가라는 구체적이고 명확한 내용을 담고 있습니다.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/find-my-join-list

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/main/java/flipnote/group/application/port/in/result/FindMyJoinListResult.java (1)

5-15: 애플리케이션 레이어가 어댑터 엔티티에 직접 의존하고 있습니다.

FindMyJoinListResult.of(List<JoinEntity>) 시그니처로 인해 영속성 모델 변경이 유즈케이스 결과 모델까지 전파됩니다. 포트 경계에서는 도메인 모델 또는 전용 조회 모델을 사용하도록 분리하는 쪽이 유지보수에 유리합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/main/java/flipnote/group/application/port/in/result/FindMyJoinListResult.java`
around lines 5 - 15, FindMyJoinListResult currently depends on persistence
entity JoinEntity via the static factory
FindMyJoinListResult.of(List<JoinEntity>), which leaks adapter concerns into the
application port; change the factory to accept domain/DTO types instead (e.g.,
change signature to FindMyJoinListResult.of(List<JoinInfo>) and remove
import/use of JoinEntity inside FindMyJoinListResult) and simplify to directly
wrap the provided List<JoinInfo>. Update all callers (e.g.,
adapters/repositories) to perform JoinEntity -> JoinInfo mapping before calling
FindMyJoinListResult.of so the application layer only depends on JoinInfo
(domain model) and not JoinEntity.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/main/java/flipnote/group/adapter/in/web/MeController.java`:
- Around line 27-30: 현재 MeController.findGroupJoinMe가 X-USER-ID 헤더를 신뢰해 IDOR 위험이
있으니 요청자의 식별은 인증 컨텍스트에서 가져오도록 변경하세요: MeController.findGroupJoinMe에서
`@RequestHeader`("X-USER-ID") Long userId 대신 Spring Security의
Authentication/Principal 또는 SecurityContextHolder에서 사용자 ID를 추출하고, 만약 헤더를 유지해야
한다면 추출한 인증 ID와 헤더 값을 비교해 불일치 시 403을 반환하도록 검증을 추가하세요; 또한 FindMyJoinListUseCase 호출
전/후의 checkPermission/checkRole 검사들이 "실제 인증된 사용자"를 기반으로 동작하도록 보장하세요 (필요하면 인증
미들웨어/필터가 존재하는지 확인하고 없으면 도입을 요구).

In
`@src/main/java/flipnote/group/infrastructure/persistence/jpa/JoinRepository.java`:
- Line 15: The current repository method findAllByUserId in JoinRepository
returns an unbounded list which can cause latency/memory issues and
nondeterministic ordering; change the contract to support pagination and
explicit ordering (e.g., replace List<JoinEntity> findAllByUserId(Long userId)
with a pageable/sort-capable signature such as using Spring Data's
Page<JoinEntity> findByUserId(Long userId, Pageable pageable) or at minimum
List<JoinEntity> findByUserId(Long userId, Sort sort) and update all callers to
supply a Pageable/Sort to enforce limits and deterministic ordering.

---

Nitpick comments:
In
`@src/main/java/flipnote/group/application/port/in/result/FindMyJoinListResult.java`:
- Around line 5-15: FindMyJoinListResult currently depends on persistence entity
JoinEntity via the static factory FindMyJoinListResult.of(List<JoinEntity>),
which leaks adapter concerns into the application port; change the factory to
accept domain/DTO types instead (e.g., change signature to
FindMyJoinListResult.of(List<JoinInfo>) and remove import/use of JoinEntity
inside FindMyJoinListResult) and simplify to directly wrap the provided
List<JoinInfo>. Update all callers (e.g., adapters/repositories) to perform
JoinEntity -> JoinInfo mapping before calling FindMyJoinListResult.of so the
application layer only depends on JoinInfo (domain model) and not JoinEntity.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c8409ba and 7ed356b.

📒 Files selected for processing (9)
  • src/main/java/flipnote/group/adapter/in/web/JoinController.java
  • src/main/java/flipnote/group/adapter/in/web/MeController.java
  • src/main/java/flipnote/group/adapter/out/persistence/JoinRepositoryAdapter.java
  • src/main/java/flipnote/group/api/dto/response/FindMyJoinListResponseDto.java
  • src/main/java/flipnote/group/application/port/in/FindMyJoinListUseCase.java
  • src/main/java/flipnote/group/application/port/in/result/FindMyJoinListResult.java
  • src/main/java/flipnote/group/application/port/out/JoinRepositoryPort.java
  • src/main/java/flipnote/group/application/service/FindMyJoinListService.java
  • src/main/java/flipnote/group/infrastructure/persistence/jpa/JoinRepository.java
💤 Files with no reviewable changes (1)
  • src/main/java/flipnote/group/adapter/in/web/JoinController.java

@stoneTiger0912 stoneTiger0912 merged commit 490d2d5 into main Mar 1, 2026
1 check passed
@stoneTiger0912 stoneTiger0912 deleted the feat/find-my-join-list branch March 1, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant