Skip to content

[FEAT] 품목 상세조회 추가#41

Merged
yangjiseonn merged 2 commits into
mainfrom
SPM-451
Nov 7, 2025
Merged

[FEAT] 품목 상세조회 추가#41
yangjiseonn merged 2 commits into
mainfrom
SPM-451

Conversation

@yangjiseonn
Copy link
Copy Markdown
Contributor

@yangjiseonn yangjiseonn commented Nov 7, 2025

📝 Summary

  • 품목 상세조회 api 추가

🙏 Question & PR point

📬 Reference

Summary by CodeRabbit

새로운 기능

  • 자재 상세 조회 API 추가 - 자재 ID를 통해 개별 자재의 상세 정보를 조회할 수 있는 새로운 엔드포인트 추가
  • 부품 상세 조회 API 추가 - 부품 ID를 통해 개별 부품의 상세 정보를 조회할 수 있는 새로운 엔드포인트 추가

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 7, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Material 및 Part 엔티티에 대한 ID 기반 조회 기능을 추가합니다. 각 도메인별 컨트롤러와 서비스에 getById 메서드를 추가하고, 응답 상태 코드도 함께 정의합니다.

Changes

Cohort / File(s) 변경 요약
Material 상세조회 기능
src/main/java/com/sampoom/backend/api/material/controller/MaterialController.java, src/main/java/com/sampoom/backend/api/material/service/MaterialService.java
GET /materials/{materialId} 엔드포인트 추가. 컨트롤러에서 materialService.getMaterialById(id)를 호출하고, 서비스에서는 Material을 조회하여 MaterialResponseDTO로 변환. 미존재 시 NotFoundException 발생
Part 상세조회 기능
src/main/java/com/sampoom/backend/api/part/controller/PartController.java, src/main/java/com/sampoom/backend/api/part/service/PartService.java
GET /parts/{partId} 엔드포인트 추가. 컨트롤러에서 partService.getPartById(id)를 호출하고, 서비스에서는 Part을 조회하여 PartListResponseDTO로 변환. Swagger 어노테이션(@Operation) 포함. 미존재 시 NotFoundException 발생
응답 상태 코드
src/main/java/com/sampoom/backend/common/response/SuccessStatus.java
PART_GET_SUCCESS(HttpStatus.OK, "부품 상세 조회 성공")와 MATERIAL_GET_SUCCESS(HttpStatus.OK, "자재 상세 조회 성공") 열거형 상수 추가

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 분

  • 일관된 패턴의 반복적인 추가: 두 도메인(Material, Part)에서 동일한 구조의 메서드 추가
  • 복잡한 비즈니스 로직 없음: 단순 조회 및 DTO 변환
  • 명확한 에러 처리: 기존 패턴(NotFoundException)을 따름

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • Lee-Jong-Jin
  • Sangyoon98
  • CHOOSLA
  • vivivim

Poem

🐰 새로운 조회 기능이 쏙쏙!
Material과 Part, 둘 다 조회되네 🎯
일관된 패턴, 깔끔하게 담고,
상태 코드도 짝을 맞춰 놨으니
이젠 디테일도 척척! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch SPM-451

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0203456 and 1446232.

📒 Files selected for processing (5)
  • src/main/java/com/sampoom/backend/api/material/controller/MaterialController.java (1 hunks)
  • src/main/java/com/sampoom/backend/api/material/service/MaterialService.java (1 hunks)
  • src/main/java/com/sampoom/backend/api/part/controller/PartController.java (1 hunks)
  • src/main/java/com/sampoom/backend/api/part/service/PartService.java (1 hunks)
  • src/main/java/com/sampoom/backend/common/response/SuccessStatus.java (2 hunks)

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 and usage tips.

Copy link
Copy Markdown
Contributor

@taemin3 taemin3 left a comment

Choose a reason for hiding this comment

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

확인

@yangjiseonn yangjiseonn merged commit 2705432 into main Nov 7, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants