Conversation
카테고리, 그룹 네임으로 응답
WalkthroughROP 응답 DTO에서 Changes
Sequence DiagramsequenceDiagram
participant Client
participant RopService
participant RopRepository
participant PartRepository
participant CategoryRepository
participant PartGroupRepository
rect rgba(200,230,255,0.4)
Client->>RopService: getRops(params, pageable)
RopService->>RopRepository: search(params, pageable)
RopRepository-->>RopService: Page<RopResDto> (category/group IDs removed)
end
rect rgba(230,255,220,0.4)
RopService->>PartRepository: findByCodeIn(List<partCodes>)
PartRepository-->>RopService: List<Part>
RopService->>CategoryRepository: findAllById(Set<categoryIds>)
CategoryRepository-->>RopService: List<Category>
RopService->>PartGroupRepository: findAllById(Set<groupIds>)
PartGroupRepository-->>RopService: List<PartGroup>
RopService->>RopService: map names -> each RopResDto.categoryName/groupName
RopService-->>Client: PageImpl<RopResDto> (names attached)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/java/com/sampoom/backend/api/rop/dto/RopResDto.java(2 hunks)src/main/java/com/sampoom/backend/api/rop/repository/RopQueryRepositoryImpl.java(0 hunks)src/main/java/com/sampoom/backend/api/rop/service/RopService.java(3 hunks)
💤 Files with no reviewable changes (1)
- src/main/java/com/sampoom/backend/api/rop/repository/RopQueryRepositoryImpl.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (java-kotlin)
🔇 Additional comments (3)
src/main/java/com/sampoom/backend/api/rop/dto/RopResDto.java (3)
10-12: DTO 가변성에 대한 고려
@Setter와@AllArgsConstructor추가는 현재 서비스 계층 구현(attachNames메서드에서 setter 사용)과 일치하지만, DTO의 불변성을 감소시켜 서비스 계층과의 결합도를 높입니다.N+1 쿼리 문제를 해결하고 쿼리 단계에서 JOIN을 통해 categoryName과 groupName을 직접 조회하도록 리팩토링하면,
@Setter를 제거하고 DTO를 불변으로 유지할 수 있습니다.
17-18: LGTM!카테고리와 그룹의 ID를 이름으로 변경한 것은 PR 목표와 일치하며, API 응답이 더 명확해집니다.
28-41: LGTM!
@QueryProjection생성자에서 categoryId와 groupId 제거는 새로운 필드 구조와 일치하며, 쿼리 리포지토리의 QRopResDto 사용과 호환됩니다.
src/main/java/com/sampoom/backend/api/rop/service/RopService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/main/java/com/sampoom/backend/api/order/service/PurchaseOrderService.java (1)
69-109: 배치 enrichment 패턴이 올바르게 구현되었습니다.구현이 효율적이며 null 처리도 적절합니다. AI 요약에 따르면 RopService에서도 동일한 패턴이 사용되고 있습니다. 향후 공통 유틸리티로 리팩토링하는 것을 고려해 보세요.
참고: RopService와 PurchaseOrderService 모두에서 Part → Category/PartGroup 매핑을 통한 이름 부착 로직이 반복됩니다. 이를 공통 헬퍼 메서드나 유틸리티 클래스로 추출하면 유지보수성이 향상됩니다.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/main/java/com/sampoom/backend/api/order/service/PurchaseOrderService.java(2 hunks)src/main/java/com/sampoom/backend/api/part/repository/PartRepository.java(1 hunks)src/main/java/com/sampoom/backend/api/rop/service/RopService.java(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/java/com/sampoom/backend/api/rop/service/RopService.java
🔇 Additional comments (3)
src/main/java/com/sampoom/backend/api/part/repository/PartRepository.java (1)
13-13: LGTM!배치 조회를 위한 표준 Spring Data JPA 메서드입니다. 여러 Part 엔터티를 효율적으로 조회할 수 있습니다.
src/main/java/com/sampoom/backend/api/order/service/PurchaseOrderService.java (2)
18-18: LGTM!배치 처리 로직에 필요한 import들이 정확하게 추가되었습니다.
Also applies to: 26-31
57-67: LGTM!페이지네이션 메타데이터를 유지하면서 DTO를 배치 방식으로 enrichment하는 올바른 구현입니다.
📝 Summary
카테고리, 그룹 네임으로 응답
🙏 Question & PR point
📬 Reference
Summary by CodeRabbit
릴리스 노트