Skip to content

[Feat] 유저 리액션 (공고 관심없음/취소 , 관심없음 사유 제출) API 구현#35

Merged
jihoonkim501 merged 9 commits into
developfrom
feat/#28
Jul 23, 2026
Merged

[Feat] 유저 리액션 (공고 관심없음/취소 , 관심없음 사유 제출) API 구현#35
jihoonkim501 merged 9 commits into
developfrom
feat/#28

Conversation

@jihoonkim501

@jihoonkim501 jihoonkim501 commented Jul 21, 2026

Copy link
Copy Markdown
Member

#️⃣ 관련 이슈

closed #28

PR 유형

어떤 변경 사항이 있나요?

  • 새로운 기능 추가
  • 버그 수정
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • 커밋 메시지 컨벤션에 맞게 작성했습니다.
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

🧩 작업 내용

📸 스크린샷(선택)

  • 관심없음 API ( 최초요청 )
image
  • 관심없음 API( 재요청 )
image
  • 사유제출
image
  • 사유제출 (재요청)
image image
  • 관심없음 철회
image

📣 To Reviewers

  • Reviewers : 팀 선택
  • Labels : 작업 유형, 자기 자신

Summary by CodeRabbit

  • 새로운 기능
    • 카드에 대한 ‘관심없음’ 처리, 취소, 관심없음 사유 제출 기능을 추가했습니다.
    • 사유 제출 시 최대 길이 제한이 적용된 reason/선택 comment을 함께 보낼 수 있습니다.
  • 개선
    • 덱 카드 조회 시 사용자 기준으로 응답이 달라지도록 했습니다.
    • 카드 상태 충돌(동시 요청) 시 더 명확한 오류를 반환합니다.
  • 버그 수정
    • 덱/카드 소유 및 카드 상태에 따른 잘못된 요청을 차단하도록 강화했습니다.

@jihoonkim501 jihoonkim501 self-assigned this Jul 21, 2026
@jihoonkim501 jihoonkim501 added the ✨ Feat 새로운 기능 추가 label Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jihoonkim501, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b94a438-c109-4a71-97b9-0181d1d5deee

📥 Commits

Reviewing files that changed from the base of the PR and between 41092b2 and 87f3fc1.

📒 Files selected for processing (5)
  • database/README.md
  • src/main/java/com/leets7th/job_is_be/global/config/JpaConfig.java
  • src/main/java/com/leets7th/job_is_be/global/exception/GeneralExceptionAdvice.java
  • src/main/java/com/leets7th/job_is_be/global/status/ErrorStatus.java
  • src/main/java/com/leets7th/job_is_be/global/status/SuccessStatus.java
📝 Walkthrough

Walkthrough

카드 조회에 사용자 소유권 검증이 추가되고, 카드 기피·해제·기피 사유 제출 API와 상태 관리 및 사용자 액션 기록이 구현되었습니다. JPA 감사 시각 제공자는 OffsetDateTime 기반으로 변경되었습니다.

Changes

카드 기피 반응

Layer / File(s) Summary
반응 상태 및 기록 계약
src/main/java/com/leets7th/job_is_be/domain/deck/dto/DismissReasonRequest.java, src/main/java/com/leets7th/job_is_be/domain/deck/entity/Card.java, src/main/java/com/leets7th/job_is_be/domain/deck/entity/UserAction.java, src/main/java/com/leets7th/job_is_be/domain/deck/repository/UserActionRepository.java, src/main/java/com/leets7th/job_is_be/global/status/*Status.java, build.gradle
기피 사유 DTO, 카드의 사유 제출 상태, 사용자 액션 코멘트, 저장소와 카드 관련 성공·오류 상태 코드 및 검증 의존성이 추가되었습니다.
카드 반응 서비스 흐름
src/main/java/com/leets7th/job_is_be/domain/deck/service/CardService.java
카드 소유권 검증과 기피·해제·사유 제출 상태 전환, 사용자 액션 저장 및 동시성 처리가 구현되었습니다.
반응 API 및 조회 호출 연계
src/main/java/com/leets7th/job_is_be/domain/deck/controller/CardController.java, src/main/java/com/leets7th/job_is_be/domain/deck/service/BriefingService.java, src/main/java/com/leets7th/job_is_be/domain/deck/service/RecommendationService.java
기존 카드 조회 API가 제거되고 기피 관련 3개 API가 추가되었으며, 브리핑·추천 덱 카드 조회에 사용자 ID가 전달됩니다.
서비스 계약 및 예외 검증
src/main/java/com/leets7th/job_is_be/global/exception/GeneralExceptionAdvice.java, src/test/java/com/leets7th/job_is_be/domain/deck/service/*Test.java
변경된 카드 조회 계약과 기피·해제·사유 제출 예외 시나리오 및 낙관적 잠금 오류 처리가 반영되었습니다.

JPA 감사 시각 설정

Layer / File(s) Summary
OffsetDateTime 감사 제공자
src/main/java/com/leets7th/job_is_be/global/config/JpaConfig.java
JPA Auditing이 사용자 지정 DateTimeProvider를 통해 OffsetDateTime.now()를 사용하도록 변경되었습니다.

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

Possibly related PRs

Suggested reviewers: yeonjuncho

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning 이슈와 무관한 JPA auditing 설정 변경(JpaConfig)이 포함되어 있어 범위를 벗어난 변경이 있습니다. JpaConfig의 auditing 설정 변경은 별도 PR로 분리하거나, 이번 기능과의 직접적 필요성을 코드로 설명해 주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 38.89% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 공고 관심없음/취소 및 사유 제출 API 구현이라는 핵심 변경을 정확히 요약합니다.
Linked Issues check ✅ Passed 이슈 #28의 관심없음, 취소, 사유 제출 3개 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.

@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: 5

🤖 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/leets7th/job_is_be/domain/deck/dto/DismissReasonRequest.java`:
- Around line 3-5: Update the DismissReasonRequest record so its first request
field matches the public API name “reason”, either by renaming reasonCode or
mapping it with `@JsonProperty`("reason"); preserve the existing comment field and
behavior.
- Around line 3-6: Validate dismissal reason requests according to the API
contract: in
src/main/java/com/leets7th/job_is_be/domain/deck/dto/DismissReasonRequest.java
lines 3-6, add a maximum-length constraint of 200 to comment and align
reasonCode validation with its persistence constraint; in
src/main/java/com/leets7th/job_is_be/domain/deck/controller/CardController.java
lines 48-53, annotate the request body with `@Valid`; and add
spring-boot-starter-validation to build.gradle so validation is enabled.

In `@src/main/java/com/leets7th/job_is_be/domain/deck/entity/Card.java`:
- Around line 50-51: Update CardService.submitDismissReason to make the read,
UserAction save, and reasonSubmitted update atomic under concurrent requests by
applying row locking, optimistic locking, or a conditional UPDATE on Card;
handle any conflict by returning CARD_DISMISS_REASON_ALREADY_SUBMITTED.

In `@src/main/java/com/leets7th/job_is_be/domain/deck/service/CardService.java`:
- Around line 60-69: Update the dismiss operation around CardService’s card
status check and card.dismiss() so the read, validation, state transition, and
UserAction save are protected atomically under concurrency. Apply the project’s
established `@Version` optimistic locking or pessimistic lock mechanism to the
relevant Card retrieval/entity, ensuring concurrent requests cannot both
transition the card or create duplicate UserAction records.

In
`@src/test/java/com/leets7th/job_is_be/domain/deck/service/RecommendationServiceTest.java`:
- Line 78: Update the stubs in RecommendationServiceTest around the
cardService.getDeckCards calls to match the userId with eq(1L) instead of any().
In both tests, verify that getDeckCards was invoked with the expected userId and
corresponding deck argument, including the second test even if it does not
assert the returned value.
🪄 Autofix (Beta)

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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5db31e33-699b-45f1-abee-b81b0024087d

📥 Commits

Reviewing files that changed from the base of the PR and between 6f586f0 and 10d06ee.

📒 Files selected for processing (14)
  • src/main/java/com/leets7th/job_is_be/domain/deck/controller/CardController.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/dto/DismissReasonRequest.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/entity/Card.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/entity/UserAction.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/repository/UserActionRepository.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/service/BriefingService.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/service/CardService.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/service/RecommendationService.java
  • src/main/java/com/leets7th/job_is_be/global/config/JpaConfig.java
  • src/main/java/com/leets7th/job_is_be/global/status/ErrorStatus.java
  • src/main/java/com/leets7th/job_is_be/global/status/SuccessStatus.java
  • src/test/java/com/leets7th/job_is_be/domain/deck/service/BriefingServiceTest.java
  • src/test/java/com/leets7th/job_is_be/domain/deck/service/CardServiceTest.java
  • src/test/java/com/leets7th/job_is_be/domain/deck/service/RecommendationServiceTest.java

Comment thread src/main/java/com/leets7th/job_is_be/domain/deck/dto/DismissReasonRequest.java Outdated
Comment thread src/main/java/com/leets7th/job_is_be/domain/deck/entity/Card.java
sky-0131
sky-0131 previously approved these changes Jul 22, 2026
yukyoungs
yukyoungs previously approved these changes Jul 22, 2026

@yukyoungs yukyoungs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

코드래빗 리뷰만 수정해주세요~~ 귯

@jihoonkim501
jihoonkim501 dismissed stale reviews from yukyoungs and sky-0131 via 41092b2 July 23, 2026 05:33

@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

🤖 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/leets7th/job_is_be/global/exception/GeneralExceptionAdvice.java`:
- Around line 43-49: Update handleOptimisticLockingFailureException in
GeneralExceptionAdvice so it no longer maps every
OptimisticLockingFailureException to the card-specific
ErrorStatus.CARD_STATE_CONFLICT (DECK_409_1); restrict card-specific conversion
to CardService or return the generic conflict status from this global handler.
🪄 Autofix (Beta)

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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4639b227-fb57-4ad4-9b52-bd47ee00fa10

📥 Commits

Reviewing files that changed from the base of the PR and between 10d06ee and 41092b2.

📒 Files selected for processing (7)
  • build.gradle
  • src/main/java/com/leets7th/job_is_be/domain/deck/controller/CardController.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/dto/DismissReasonRequest.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/entity/Card.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/service/CardService.java
  • src/main/java/com/leets7th/job_is_be/global/exception/GeneralExceptionAdvice.java
  • src/main/java/com/leets7th/job_is_be/global/status/ErrorStatus.java
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/main/java/com/leets7th/job_is_be/domain/deck/entity/Card.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/controller/CardController.java
  • src/main/java/com/leets7th/job_is_be/domain/deck/service/CardService.java

@jihoonkim501
jihoonkim501 merged commit b558150 into develop Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feat 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 유저 리액션 (공고 관심없음/취소 , 관심없음 사유 제출) API 구현

3 participants