Skip to content

Conversation

@baekjaehyuk
Copy link
Collaborator

@baekjaehyuk baekjaehyuk commented May 14, 2025

📌 작업 개요

  • 해당 조직에 지출된 금액을 월별로 조회가 가능하도록 구현

✅ 작업 내용

  1. 비즈니스 도메인 서비스 로직에서 지출된 금액을 월별로 그룹으로 묶어 DetailExpenseResult 반환
  2. 프론트 요구사항에 맞춰 각 응답값에 따른 고유 UUID 반환
    • 이는 년도와 월별에 따른 UUID 값 생성으로 호출 시 값이 변경되지 않습니다.

📂 리뷰 요구사항

  • 현재 UseCase 분리가 필요할 듯 하여 추후 리팩토링을 통해 도메인과 유스케이스를 분리할 예정입니다.
  • 추가로 Copilot이 단 nitPick의 경우 영수증 승인일시는 YYYY-MM 포맷팅 형식으로 DB에 저장되어 있어 별도의 값 반환시 포맷팅 설정이 불필요하다고 판단하여 추가하지 않았습니다.

@baekjaehyuk baekjaehyuk requested review from Copilot and tiemo0708 May 14, 2025 08:26
@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 implements a monthly expense retrieval API for receipts by introducing a new domain model (DetailExpenseResult) and corresponding service, DTO, and API endpoint changes.

  • Adds a new method in ReceiptEditor to calculate monthly expenses.
  • Introduces DetailExpenseResult and ReceiptExpenseResponse to encapsulate monthly expense data.
  • Updates service, use case, and controller layers to support the new API endpoint.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ReceiptEditor.java Adds calculateExpense with monthly grouping of receipts.
DetailExpenseResult.java Introduces the domain model for representing monthly expense results.
FindReceiptService.java Implements the service method mapping expense data to response DTOs.
FindReceiptUseCase.java Extends the use case interface with expense list retrieval.
ReceiptExpenseResponse.java Creates a new DTO for monthly expense data with a builder-based factory method.
FindReceiptApi.java Defines the API endpoint for querying monthly expense data.
FindReceiptController.java Exposes a new GET endpoint to retrieve monthly expense information.
Comments suppressed due to low confidence (1)

src/main/java/com/ClubAccount_BE/receipt/domain/service/ReceiptEditor.java:54

  • [nitpick] Consider renaming 'calculateExpense' to 'calculateMonthlyExpense' to better reflect the operation performed.
public List<DetailExpenseResult> calculateExpense(List<Receipt> receiptList, int year) {

@sonarqubecloud
Copy link

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.

추후에 말씀해주신대로 usecase분리 해주시면 될거 같습니다!
고생하셨습니다

@baekjaehyuk baekjaehyuk merged commit 752494a into develop May 14, 2025
2 checks passed
@baekjaehyuk baekjaehyuk deleted the TB-28 branch May 14, 2025 09: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