Skip to content

[Feat] 자소서 답변 및 분석 응답에 지원 순번 추가#79

Merged
whc9999 merged 2 commits into
mainfrom
feat/sequence
May 26, 2026
Merged

[Feat] 자소서 답변 및 분석 응답에 지원 순번 추가#79
whc9999 merged 2 commits into
mainfrom
feat/sequence

Conversation

@whc9999
Copy link
Copy Markdown
Collaborator

@whc9999 whc9999 commented May 26, 2026

✨ 어떤 이유로 PR를 하셨나요?

  • feature 병합
  • 버그 수정(아래에 issue #를 남겨주세요)
  • 코드 개선
  • 코드 수정
  • 배포
  • 기타(아래에 자세한 내용 기입해주세요)

📋 세부 내용 - 왜 해당 PR이 필요한지 작업 내용을 자세하게 설명해주세요

  • 자소서 답변 저장/수정 응답에 sequence 필드 추가
  • 자소서 분석 실행/조회 응답에 sequence 필드 추가
  • 같은 사용자와 같은 공고 기준으로 현재 지원 순번 계산
  • 재지원 플로우에서 프론트가 몇 차 지원인지 구분할 수 있도록 응답 보강
  • 관련 서비스 테스트 추가

📸 작업 화면 스크린샷

⚠️ PR하기 전에 확인해주세요

  • 로컬테스트를 진행하셨나요?
  • 머지할 브랜치를 확인하셨나요?
  • 관련 label을 선택하셨나요?

🚨 관련 이슈 번호 [ ]

Summary by CodeRabbit

  • New Features

    • API responses now include a sequence field that indicates the user’s application order for each job posting, surfaced in analysis and question-answer payloads.
  • Tests

    • Added and updated tests to verify sequence calculation and ensure the sequence is returned correctly in analysis and question-answer responses across multiple applications.

Review Change Stack

- 자소서 답변 저장/수정 응답에 sequence 필드 추가
- 자소서 분석 실행/조회 응답에 sequence 필드 추가
- 같은 사용자와 같은 공고 기준으로 현재 지원 순번 계산
- 재지원 플로우에서 프론트가 몇 차 지원인지 구분할 수 있도록 응답 보강
- 관련 서비스 테스트 추가
@whc9999 whc9999 requested a review from shinae1023 May 26, 2026 02:38
@whc9999 whc9999 self-assigned this May 26, 2026
@whc9999 whc9999 added the ✨ feat New feature or request label May 26, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 13b0ed62-1d7d-460d-98fc-22182898d7c8

📥 Commits

Reviewing files that changed from the base of the PR and between 4326ab8 and 6f044f2.

📒 Files selected for processing (2)
  • src/main/java/com/jobdri/jobdri_api/domain/mockapply/repository/MockApplyRepository.java
  • src/main/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyService.java

📝 Walkthrough

Walkthrough

Adds an int sequence to Analysis and QuestionAnswer response DTOs, implements calculateSequence(MockApply) in the repository (with a simplified predicate), updates services to populate sequence in responses, and adds tests confirming sequence values for first and subsequent mock applications.

Changes

Mock Application Sequence Tracking

Layer / File(s) Summary
Response DTOs with sequence field
src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/response/AnalysisResponse.java, src/main/java/com/jobdri/jobdri_api/domain/analysis/dto/response/QuestionAnswerResponse.java
AnalysisResponse record adds an int sequence component and of(...) now accepts and passes sequence; QuestionAnswerResponse record adds int sequence between status and questions.
Repository sequence calculation
src/main/java/com/jobdri/jobdri_api/domain/mockapply/repository/MockApplyRepository.java
Adds default calculateSequence(MockApply) converting the counted long to int; updates countSequenceByUserIdAndJobPostingId(...) predicate to use only ma.id <= :mockApplyId for sequence counting.
Service response population
src/main/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisService.java, src/main/java/com/jobdri/jobdri_api/domain/analysis/service/QuestionService.java, src/main/java/com/jobdri/jobdri_api/domain/mockapply/service/MockApplyService.java
AnalysisService.toResponse() and QuestionService.saveAnswers() call mockApplyRepository.calculateSequence(mockApply) and include the result in responses; MockApplyService.getMockApplySequence() now delegates to calculateSequence(mockApply).
Sequence calculation verification
src/test/java/com/jobdri/jobdri_api/domain/analysis/service/AnalysisServiceTest.java, src/test/java/com/jobdri/jobdri_api/domain/analysis/service/QuestionServiceTest.java
Tests updated to assert sequence == 1 for first application; new tests verify sequence == 2 when a second MockApply exists for the same user and job posting.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

fix

Poem

🐰 I hopped through code to count each try,
First and second in an ordered sky.
Responses now carry a neat little line,
Sequence in place — one, two, three — how fine!

🚥 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 The title clearly summarizes the main feature: adding a sequence field to cover letter answer and analysis responses.
Description check ✅ Passed The PR description follows the template structure with feature type selected, detailed implementation explanation, and completion of all pre-merge checklist items.
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.

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

✨ 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 feat/sequence

Comment @coderabbitai help to get the list of available commands and usage tips.

- sequence 계산 시 createdAt 비교를 제거하고 id 기준으로 계산하도록 수정
- H2/CI 환경의 timestamp 정밀도 차이로 순번 테스트가 실패하던 문제 해결
- 모의 서류 지원 순번 조회 API도 공통 sequence 계산 로직을 사용하도록 정리
- 전체 테스트 통과 확인
@whc9999 whc9999 merged commit d55367f into main May 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant