Skip to content

Conversation

@baekjaehyuk
Copy link
Collaborator

📌 작업 개요

  • 영수증 상세 조회 API 응답 DTO 구조 변경

✅ 작업 내용

  1. ReceiptDetailRespone로 반환하던 영수증 상세 조회 API의 응답 DTO 수정
  2. 기존 반환하던 응답 DTO 대신 ReceiptItemResponse 응답값 반환
  3. 그에 따른 리턴 타입 수정 및 불필요한 메서드 제거

📂 리뷰 요구사항

  • 리팩토링한 코드 바탕으로 리뷰 부탁드리겠습니다.

@baekjaehyuk baekjaehyuk requested review from Copilot and tiemo0708 May 14, 2025 13:52
@baekjaehyuk baekjaehyuk self-assigned this May 14, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the receipt detail API response by replacing the single detailed response with a list of receipt item responses. Key changes include:

  • Changing the service and interface methods from returning ReceiptDetailResponse to a list of ReceiptItemResponse.
  • Removing the ReceiptDetailResponse file.
  • Updating API endpoints in the controller and API interface to reflect the new DTO structure.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main/java/com/ClubAccount_BE/receipt/application/service/FindReceiptService.java Updated method signature and implementation to stream receipt items.
src/main/java/com/ClubAccount_BE/receipt/application/port/in/FindReceiptUseCase.java Updated interface method to return a list of receipt items.
src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/dto/response/ReceiptItemResponse.java Modified fields to use BigDecimal and removed redundant list mapping method.
src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/dto/response/ReceiptDetailResponse.java Removed since the new DTO covers response needs.
src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/api/FindReceiptApi.java Adjusted API operation annotations and method return type.
src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/FindReceiptController.java Updated controller method signature and invocation to match the refactored service.
Comments suppressed due to low confidence (4)

src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/FindReceiptController.java:42

  • The controller method signature has been updated; ensure that both the routing and the consumers are adapted to receive a list of receipt items.
public List<ReceiptItemResponse> getReceiptItem(UUID link, Long receiptId) {

src/main/java/com/ClubAccount_BE/receipt/application/service/FindReceiptService.java:38

  • The method name and return type have been updated to reflect a list of receipt items rather than a detailed receipt response. Verify that all API consumers and related documentation are updated accordingly.
public List<ReceiptItemResponse> getReceiptItem(UUID link, Long receiptId) {

src/main/java/com/ClubAccount_BE/receipt/application/port/in/FindReceiptUseCase.java:24

  • Ensure the interface method change aligns with the overall API design and that consumers are aware of the updated return type from a single object to a list.
List<ReceiptItemResponse> getReceiptItem(UUID link, Long receiptId);

src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/api/FindReceiptApi.java:35

  • [nitpick] Review the operation summary and description to ensure they accurately reflect the new API behavior returning a list of receipt items.
@Operation(summary = "영수증 상세 목록 조회", description = "파싱된 영수증 상세 아이템을 조회한다.")

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented May 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...eceipt/application/service/FindReceiptService.java 0.00% 4 Missing ⚠️
...apter/in/web/dto/response/ReceiptItemResponse.java 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@tiemo0708 tiemo0708 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!!
바로 머지하셔도 될것같습니다

@baekjaehyuk baekjaehyuk merged commit db647bb into develop May 15, 2025
3 checks passed
@baekjaehyuk baekjaehyuk deleted the TB-29 branch May 15, 2025 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants