Skip to content

feat: 지원자 프로필 조회 API 통합 - #159

Merged
sangwon02 merged 4 commits into
mainfrom
feature/158-applicant-profile-integration
Aug 10, 2026
Merged

feat: 지원자 프로필 조회 API 통합#159
sangwon02 merged 4 commits into
mainfrom
feature/158-applicant-profile-integration

Conversation

@sangwon02

@sangwon02 sangwon02 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🔗 관련 이슈 (Related Issue)

Closes #158

📝 작업 내용

프론트가 지원자 프로필 화면 하나를 그리는 데 API를 3번 호출하던 것을 1번으로 줄였습니다.

지원 상세 응답의 applicant를 공개 프로필 수준으로 확장하고, 프로젝트 이력도 함께 담았습니다. 지원자 목록에는 자기소개 미리보기용 bio를 추가했습니다.

주요 변경 사항

  • 지원 상세 applicant에 자기소개·역할·관심 카테고리·활동 통계 추가
  • 지원 상세 applicant.portfolios에 프로젝트 이력 최신 5건과 hasNext 포함
  • 지원자 목록 applicant에 자기소개(bio) 추가
  • 탈퇴한 지원자도 상세 조회가 가능하도록 조회 경로 분리
  • Swagger 설명 갱신, 통합 테스트 4건 작성

상세 내용

1. 지원 상세 응답 통합

GET /api/v1/recruitments/{recruitmentId}/applications/{applicationId} 하나로 지원자 프로필 화면이 완성됩니다.

화면 영역 변경 전 변경 후
코멘트·참고링크·첨부파일 지원 상세 지원 상세
자기소개·지역·역할·활동 통계 GET /users/{userId} 지원 상세 applicant
프로젝트 이력 GET /users/{userId}/portfolios 지원 상세 applicant.portfolios

applicant의 노출 범위는 공개 프로필과 동일하게 맞췄습니다. 이메일은 본인 조회에만 있으므로 포함하지 않습니다.

2. 프로젝트 이력은 최신 5건만

applicant.portfolios는 기존 포트폴리오 목록 API와 같은 구조입니다. hasNexttruenextCursor를 그대로 넘겨 GET /users/{userId}/portfolios로 이어서 조회할 수 있습니다.

3. 탈퇴한 지원자 처리

지원자 목록은 탈퇴 여부를 거르지 않습니다. 검증이 들어간 getPublicProfile(Long)을 그대로 쓰면 목록에는 보이는 지원이 상세에서만 404가 되어, 공고 작성자가 목록에서 본 항목을 열 수 없게 됩니다.

그래서 유저 검증을 하지 않는 getPublicProfileOf(Users)getPortfoliosOf(...)를 분리했습니다. 탈퇴 시 닉네임·자기소개·프로필 이미지가 모두 익명화되므로 개인정보가 노출되지 않고, 포트폴리오도 함께 soft delete 되어 빈 목록으로 나갑니다.

4. 지원자 목록 자기소개 추가

목록 조회 쿼리가 이미 join fetch ra.user로 지원자를 함께 불러오고 있어 추가 쿼리 없이 필드만 늘렸습니다.

✅ PR 체크리스트

  • PR 제목은 커밋 컨벤션을 따랐습니다.
  • 관련 이슈를 연결했습니다.
  • 변경 사항에 대한 테스트를 진행했습니다.

Summary by CodeRabbit

  • 새 기능

    • 지원 상세 조회에서 지원자의 자기소개, 역할, 카테고리, 활동 통계와 최신 포트폴리오를 확인할 수 있습니다.
    • 최신 포트폴리오는 최대 5건까지 제공되며, 전체 목록은 페이지네이션으로 추가 조회할 수 있습니다.
    • 탈퇴한 지원자의 지원 상세 정보와 포트폴리오 이력도 조회할 수 있습니다.
  • 접근 제어

    • 지원서 작성자와 지원자만 상세 정보를 조회할 수 있도록 검증됩니다.
  • 개선 사항

    • 지원자 목록 응답에 자기소개 정보가 포함됩니다.

지원자 프로필 화면을 그리는 데 API 를 3번 호출하던 것을 1번으로 줄인다.
applicant 에 자기소개·역할·관심 카테고리·활동 통계를 넣고,
프로젝트 이력은 최신 5건과 hasNext 를 함께 담아 목록 API 와 같은 구조로 반환한다.

유저 검증을 하지 않는 조회 경로를 분리했다. 지원자 목록은 탈퇴 여부를 거르지 않아
검증이 있는 getPublicProfile 을 쓰면 목록에는 보이는 지원이 상세에서만 404 가 된다.
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7955b248-5308-435a-8668-3505c54be152

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

지원 상세 응답에 지원자의 공개 프로필, 활동 통계, 최신 포트폴리오가 포함됩니다. 탈퇴한 지원자도 조회할 수 있습니다. 포트폴리오는 최대 5건을 반환하며, 추가 목록은 페이지네이션 API로 조회합니다.

Changes

지원자 프로필 통합

Layer / File(s) Summary
응답 계약과 프로필 매핑
src/main/java/com/slatto/domain/recruitment/dto/*, src/main/java/com/slatto/domain/recruitment/converter/RecruitmentConverter.java, src/main/java/com/slatto/domain/recruitment/controller/RecruitmentApplicationController.java
지원자 응답에 bio, 복수 역할, 카테고리, 통계, 포트폴리오 목록을 추가했습니다. 변환 로직은 공개 프로필과 포트폴리오 응답을 상세 응답에 매핑합니다. API 설명도 갱신했습니다.
공개 프로필과 포트폴리오 조회
src/main/java/com/slatto/domain/recruitment/service/RecruitmentApplicationService.java, src/main/java/com/slatto/domain/user/service/UserService.java, src/main/java/com/slatto/domain/user/service/PortfolioService.java
지원 상세 조회가 지원자 객체로 공개 프로필을 생성하고 최대 5개의 포트폴리오를 조회합니다. 탈퇴 여부를 검사하지 않는 조회 메서드를 추가했습니다.
상세 조회 통합 검증
src/test/java/com/slatto/domain/recruitment/service/RecruitmentApplicationDetailIntegrationTest.java
프로필 데이터, 포트폴리오 페이지네이션, 탈퇴 지원자 조회, 비인가 접근 거부를 검증합니다.

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

Sequence Diagram(s)

sequenceDiagram
  participant 요청자
  participant RecruitmentApplicationService
  participant UserService
  participant PortfolioService
  participant RecruitmentConverter
  요청자->>RecruitmentApplicationService: 지원 상세 조회
  RecruitmentApplicationService->>UserService: getPublicProfileOf(applicant)
  UserService-->>RecruitmentApplicationService: 공개 프로필과 통계
  RecruitmentApplicationService->>PortfolioService: getPortfoliosOf(applicantId, cursor, 5)
  PortfolioService-->>RecruitmentApplicationService: 최신 포트폴리오와 페이지네이션
  RecruitmentApplicationService->>RecruitmentConverter: 상세 응답 변환
  RecruitmentConverter-->>요청자: 지원자 프로필 포함 상세 응답
Loading

Possibly related PRs

  • SLAT-TO/SLATE-TO-BE#150: 탈퇴한 사용자와 관련된 사용자 프로필 및 포트폴리오 조회 흐름을 수정합니다.
  • SLAT-TO/SLATE-TO-BE#155: 지원 상세 응답과 지원자 프로필에 공개 프로필 및 포트폴리오 데이터를 추가하는 흐름과 직접 연결됩니다.

Suggested labels: feature

Suggested reviewers: guingguing, kohseoyoung, chazy-d

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% 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 관련 이슈, 작업 내용, 주요 변경 사항, 테스트 체크리스트를 모두 포함하고 체크리스트도 완료했습니다.
Linked Issues check ✅ Passed 지원 상세 프로필 통합, 포트폴리오와 hasNext 추가, 탈퇴 지원자 조회, Swagger 갱신 및 통합 테스트 요구사항을 충족합니다 [#158].
Out of Scope Changes check ✅ Passed 변경 사항은 지원자 프로필 통합, 탈퇴 지원자 조회, 응답 확장, 문서 및 테스트 범위에 포함됩니다.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/java/com/slatto/domain/user/service/PortfolioService.java (1)

158-165: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

탈퇴 지원자의 포트폴리오 이력을 조회하도록 쿼리를 분리하세요.

UserService.withdraw는 해당 사용자의 UserPortfolio를 soft-delete합니다. 그러나 getPortfoliosOffindActivePortfoliosByCursor를 호출합니다. 따라서 탈퇴 지원자의 지원 상세는 항상 빈 portfolios를 반환합니다.

이 메서드의 주석은 탈퇴 사용자의 이력을 반환한다고 명시합니다. 탈퇴로 soft-delete된 이력을 포함하는 전용 조회를 추가하세요. 사용자가 개별 삭제한 포트폴리오를 다시 노출하지 않도록 삭제 사유도 구분하세요. 탈퇴 지원자에 포트폴리오 6건을 만든 뒤 상세 응답의 items, hasNext, nextCursor를 검증하는 회귀 테스트를 추가하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/com/slatto/domain/user/service/PortfolioService.java` around
lines 158 - 165, Update PortfolioService.getPortfoliosOf to use a dedicated
repository query that includes UserPortfolio records soft-deleted due to user
withdrawal while excluding portfolios individually deleted by the user; add the
corresponding repository query and validate pagination metadata (items, hasNext,
and nextCursor) with a regression test covering six portfolios for a withdrawn
applicant.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/java/com/slatto/domain/recruitment/controller/RecruitmentApplicationController.java`:
- Around line 90-99: RecruitmentApplicationController의 지원자 프로필 API 안내에서 포트폴리오
API 호출 조건을 명확히 수정하세요. 최초 5건만 필요하면 applicant.portfolios의 상세 응답만 사용하고, 전체 프로젝트 이력이
필요할 때만 GET /users/{userId}/portfolios를 호출하도록 설명을 일관되게 정리하세요.

---

Outside diff comments:
In `@src/main/java/com/slatto/domain/user/service/PortfolioService.java`:
- Around line 158-165: Update PortfolioService.getPortfoliosOf to use a
dedicated repository query that includes UserPortfolio records soft-deleted due
to user withdrawal while excluding portfolios individually deleted by the user;
add the corresponding repository query and validate pagination metadata (items,
hasNext, and nextCursor) with a regression test covering six portfolios for a
withdrawn applicant.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: bbbcf303-e752-4560-a81a-95547afac226

📥 Commits

Reviewing files that changed from the base of the PR and between e78cf7a and 37903b0.

📒 Files selected for processing (8)
  • src/main/java/com/slatto/domain/recruitment/controller/RecruitmentApplicationController.java
  • src/main/java/com/slatto/domain/recruitment/converter/RecruitmentConverter.java
  • src/main/java/com/slatto/domain/recruitment/dto/RecruitmentApplicantListResponse.java
  • src/main/java/com/slatto/domain/recruitment/dto/RecruitmentApplicationDetailResponse.java
  • src/main/java/com/slatto/domain/recruitment/service/RecruitmentApplicationService.java
  • src/main/java/com/slatto/domain/user/service/PortfolioService.java
  • src/main/java/com/slatto/domain/user/service/UserService.java
  • src/test/java/com/slatto/domain/recruitment/service/RecruitmentApplicationDetailIntegrationTest.java

Comment on lines +90 to +99
지원자 프로필 화면에 필요한 값을 한 번에 반환한다.
이 API 하나로 끝나므로 `GET /users/{userId}` 와 `GET /users/{userId}/portfolios` 를
따로 부르지 않아도 된다.

- 지원 정보 — `message`, `referenceLink`, `files`
- 지원자 프로필 — `applicant` 에 자기소개·지역·역할·관심 카테고리·활동 통계
- 프로젝트 이력 — `applicant.portfolios` 에 최신 5건

`applicant.portfolios` 는 목록 API 와 같은 구조이며 `hasNext` 가 `true` 면
`GET /users/{userId}/portfolios` 로 이어서 조회한다. `nextCursor` 도 그대로 쓸 수 있다.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

포트폴리오 호출 안내를 조건부로 수정하세요.

Line 91-92는 포트폴리오 API를 호출할 필요가 없다고 설명합니다. Line 98-99는 hasNexttrue이면 같은 API를 호출하라고 설명합니다.

최초 5건만 필요한 경우에는 상세 응답만 사용하고, 전체 이력이 필요한 경우에는 포트폴리오 API를 호출한다고 명확히 설명하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/com/slatto/domain/recruitment/controller/RecruitmentApplicationController.java`
around lines 90 - 99, RecruitmentApplicationController의 지원자 프로필 API 안내에서 포트폴리오
API 호출 조건을 명확히 수정하세요. 최초 5건만 필요하면 applicant.portfolios의 상세 응답만 사용하고, 전체 프로젝트 이력이
필요할 때만 GET /users/{userId}/portfolios를 호출하도록 설명을 일관되게 정리하세요.

@chazy-d chazy-d left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

수고하셨습니다~

@sangwon02
sangwon02 merged commit 705745b into main Aug 10, 2026
2 checks passed
@guingguing
guingguing deleted the feature/158-applicant-profile-integration branch August 12, 2026 15:35
@guingguing guingguing added the feature 새로운 기능 추가 label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEAT: 지원자 프로필 조회 API 통합

3 participants