[Feat] 공고 검색 및 필터링 로직 구현 - #26
Conversation
|
Warning Review limit reached
More reviews will be available in 39 minutes and 17 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?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 credits. 🚦 How do rate 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 see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughQueryDSL 의존성 및 ChangesQueryDSL 기반 공고 검색/필터링
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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: 4
🤖 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/ilson/spotwork/domain/job/controller/JobController.java`:
- Around line 46-48: The JobController search endpoint is currently mapped to
the base jobs path instead of the expected search path, which can conflict with
other job routes. Update the `@GetMapping` on the search method in JobController
so the search handler is exposed as /search under the jobs controller, and make
sure the existing search logic in search still serves GET /api/jobs/search as
required by the PR contract.
- Around line 53-55: In JobController, the search endpoint’s size parameter is
only validated with `@Positive`, so it can still be arbitrarily large and flow
into PageRequest and the downstream QueryDSL limit. Add an upper-bound
validation such as `@Max` on the size request parameter in the search method,
keeping the existing pagination setup with PageRequest.of and the controller
method signature otherwise unchanged.
In
`@src/main/java/com/ilson/spotwork/domain/job/repository/JobQueryRepositoryImpl.java`:
- Around line 28-38: `JobQueryRepositoryImpl`의 조회 쿼리는 `offset/limit`만 적용하고
`Pageable`의 정렬을 반영하지 않아 페이지 결과가 불안정합니다. `JobQueryRepositoryImpl`의
`queryFactory.selectFrom(job)` 체인에 `orderBy(...)`를 추가해 `pageable.getSort()`를
Querydsl 정렬로 변환해 적용하거나, 최소한 `createdAt DESC`가 항상 반영되도록 하세요. `content` 조회와 함께
`pageable.getOffset()`/`getPageSize()` 전에 정렬이 먼저 적용되도록 수정해 `JobController`에서 전달된
`PageRequest`의 순서가 실제 쿼리에 반영되게 하세요.
In `@src/main/java/com/ilson/spotwork/domain/job/service/JobService.java`:
- Around line 131-135: Update JobService.search so it also rejects negative wage
inputs before calling jobRepository.search. The current validation only checks
minWage > maxWage; extend the existing guard in search(JobSearchCondition,
Pageable) to throw CustomException(ErrorCode.INVALID_INPUT) when either
cond.getMinWage() or cond.getMaxWage() is below 0, alongside the current range
check.
🪄 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: 889eb6b7-3d41-4f67-b72f-38372fc02bca
📒 Files selected for processing (10)
build.gradlesrc/main/java/com/ilson/spotwork/common/config/QuerydslConfig.javasrc/main/java/com/ilson/spotwork/common/exception/GlobalExceptionHandler.javasrc/main/java/com/ilson/spotwork/domain/job/controller/JobController.javasrc/main/java/com/ilson/spotwork/domain/job/dto/JobSearchCondition.javasrc/main/java/com/ilson/spotwork/domain/job/dto/JobSummaryResponse.javasrc/main/java/com/ilson/spotwork/domain/job/repository/JobQueryRepository.javasrc/main/java/com/ilson/spotwork/domain/job/repository/JobQueryRepositoryImpl.javasrc/main/java/com/ilson/spotwork/domain/job/repository/JobRepository.javasrc/main/java/com/ilson/spotwork/domain/job/service/JobService.java
관련 이슈
closes #22
구현 내용
변경 사항
체크리스트
Summary by CodeRabbit
새 기능
버그 수정
보안