[Feat] 유저 리액션 (공고 관심없음/취소 , 관심없음 사유 제출) API 구현#35
Conversation
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthrough카드 조회에 사용자 소유권 검증이 추가되고, 카드 기피·해제·기피 사유 제출 API와 상태 관리 및 사용자 액션 기록이 구현되었습니다. JPA 감사 시각 제공자는 Changes카드 기피 반응
JPA 감사 시각 설정
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (14)
src/main/java/com/leets7th/job_is_be/domain/deck/controller/CardController.javasrc/main/java/com/leets7th/job_is_be/domain/deck/dto/DismissReasonRequest.javasrc/main/java/com/leets7th/job_is_be/domain/deck/entity/Card.javasrc/main/java/com/leets7th/job_is_be/domain/deck/entity/UserAction.javasrc/main/java/com/leets7th/job_is_be/domain/deck/repository/UserActionRepository.javasrc/main/java/com/leets7th/job_is_be/domain/deck/service/BriefingService.javasrc/main/java/com/leets7th/job_is_be/domain/deck/service/CardService.javasrc/main/java/com/leets7th/job_is_be/domain/deck/service/RecommendationService.javasrc/main/java/com/leets7th/job_is_be/global/config/JpaConfig.javasrc/main/java/com/leets7th/job_is_be/global/status/ErrorStatus.javasrc/main/java/com/leets7th/job_is_be/global/status/SuccessStatus.javasrc/test/java/com/leets7th/job_is_be/domain/deck/service/BriefingServiceTest.javasrc/test/java/com/leets7th/job_is_be/domain/deck/service/CardServiceTest.javasrc/test/java/com/leets7th/job_is_be/domain/deck/service/RecommendationServiceTest.java
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
build.gradlesrc/main/java/com/leets7th/job_is_be/domain/deck/controller/CardController.javasrc/main/java/com/leets7th/job_is_be/domain/deck/dto/DismissReasonRequest.javasrc/main/java/com/leets7th/job_is_be/domain/deck/entity/Card.javasrc/main/java/com/leets7th/job_is_be/domain/deck/service/CardService.javasrc/main/java/com/leets7th/job_is_be/global/exception/GeneralExceptionAdvice.javasrc/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
#️⃣ 관련 이슈
closed #28
PR 유형
어떤 변경 사항이 있나요?
PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.
🧩 작업 내용
📸 스크린샷(선택)
📣 To Reviewers
Summary by CodeRabbit