✨ OMF-336 설문 기본정보 조회 시 섹션 개수 반환하도록 수정#156
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough이 PR은 설문 참여 정보 조회 흐름을 통합 VO 패턴으로 재설계합니다. 새로운 ChangesParticipation Metadata VO Consolidation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: 2
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/OneQ/OnSurvey/domain/survey/service/query/SurveyQueryService.java (1)
18-27: 🧹 Nitpick | 🔵 Trivial | 💤 Low value중복된 임포트 정리 권고.
26번 줄에서
OneQ.OnSurvey.domain.survey.model.dto.*와일드카드 임포트가 추가되어, 18~25번 줄의 동일 패키지 단일 클래스 임포트들이 모두 중복됩니다. IDE의 자동 임포트 정리(Optimize Imports)로 한쪽만 남기시는 것을 권장합니다.♻️ 제안 정리
-import OneQ.OnSurvey.domain.survey.model.dto.OngoingSurveyStats; -import OneQ.OnSurvey.domain.survey.model.dto.ScreeningIntroData; -import OneQ.OnSurvey.domain.survey.model.dto.ScreeningViewData; -import OneQ.OnSurvey.domain.survey.model.dto.SurveyDetailData; -import OneQ.OnSurvey.domain.survey.model.dto.SurveyListView; -import OneQ.OnSurvey.domain.survey.model.dto.SurveySearchQuery; -import OneQ.OnSurvey.domain.survey.model.dto.SurveySegmentation; -import OneQ.OnSurvey.domain.survey.model.dto.SurveyWithEligibility; import OneQ.OnSurvey.domain.survey.model.dto.*;(또는 반대로 와일드카드를 제거하고
ParticipationInfoVO만 단일 임포트로 추가)🤖 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/OneQ/OnSurvey/domain/survey/service/query/SurveyQueryService.java` around lines 18 - 27, There are duplicate imports: both explicit imports (e.g., OngoingSurveyStats, ScreeningIntroData, ScreeningViewData, SurveyDetailData, SurveyListView, SurveySearchQuery, SurveySegmentation, SurveyWithEligibility) and a wildcard import OneQ.OnSurvey.domain.survey.model.dto.*; remove the redundancy by either deleting the explicit single-class imports and keeping the wildcard or (preferably) removing the wildcard and keeping explicit imports (or adding only the missing ParticipationInfoVO explicitly), then run your IDE's "Optimize Imports" to apply the cleanup consistently.
🤖 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/OneQ/OnSurvey/domain/survey/repository/SurveyRepositoryImpl.java`:
- Around line 297-328: The current inner join on section in SurveyRepositoryImpl
(the .join(section).on(survey.id.eq(section.surveyId))) causes ONGOING surveys
with zero sections to be filtered out; change that to a left join
(.leftJoin(section).on(...)) and replace the section count expression passed to
ParticipationInfoVO (currently section.sectionId.countDistinct().intValue())
with a coalesced expression so zero is returned when no sections exist (e.g.
coalesce(section.sectionId.countDistinct(), 0).intValue()); alternatively, if
zero-section ONGOING surveys are invalid, add a clear comment near the join to
document that intent.
In
`@src/main/java/OneQ/OnSurvey/domain/survey/service/query/SurveyQueryService.java`:
- Around line 181-187: 로그 메시지가 실제 원인 범위를 좁게 표현하고 있으니 SurveyQueryService의
surveyRepository.getParticipationInfoVO 반환값(vo) == null 분기에서 사용하는 로그를 더 일반화하세요;
현재 "[SURVEY:QUERY] 마감된 설문 참여 불가 - surveyId: {}" 대신 "조회 불가/존재하지 않는 설문 또는 관련 데이터
누락 - surveyId: {}"와 같이 섹션 누락, 엔티티 미존재, 상태 불일치 등 다양한 원인을 포괄하도록 수정해 주세요.
---
Outside diff comments:
In
`@src/main/java/OneQ/OnSurvey/domain/survey/service/query/SurveyQueryService.java`:
- Around line 18-27: There are duplicate imports: both explicit imports (e.g.,
OngoingSurveyStats, ScreeningIntroData, ScreeningViewData, SurveyDetailData,
SurveyListView, SurveySearchQuery, SurveySegmentation, SurveyWithEligibility)
and a wildcard import OneQ.OnSurvey.domain.survey.model.dto.*; remove the
redundancy by either deleting the explicit single-class imports and keeping the
wildcard or (preferably) removing the wildcard and keeping explicit imports (or
adding only the missing ParticipationInfoVO explicitly), then run your IDE's
"Optimize Imports" to apply the cleanup consistently.
🪄 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: Path: .coderabbit.yml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 8637e4fe-da7e-4bee-88c6-8ee58807bda3
📒 Files selected for processing (8)
src/main/java/OneQ/OnSurvey/domain/survey/controller/ParticipationController.javasrc/main/java/OneQ/OnSurvey/domain/survey/model/dto/ParticipationInfoVO.javasrc/main/java/OneQ/OnSurvey/domain/survey/model/response/DeprecatedQuestionResponse.javasrc/main/java/OneQ/OnSurvey/domain/survey/model/response/ParticipationInfoResponse.javasrc/main/java/OneQ/OnSurvey/domain/survey/repository/SurveyRepository.javasrc/main/java/OneQ/OnSurvey/domain/survey/repository/SurveyRepositoryImpl.javasrc/main/java/OneQ/OnSurvey/domain/survey/service/query/SurveyQuery.javasrc/main/java/OneQ/OnSurvey/domain/survey/service/query/SurveyQueryService.java
💤 Files with no reviewable changes (3)
- src/main/java/OneQ/OnSurvey/domain/survey/service/query/SurveyQuery.java
- src/main/java/OneQ/OnSurvey/domain/survey/model/response/DeprecatedQuestionResponse.java
- src/main/java/OneQ/OnSurvey/domain/survey/controller/ParticipationController.java
✨ Related Issue
📌 Task Details
💬 Review Requirements (Optional)
Summary by CodeRabbit
릴리스 노트