-
Notifications
You must be signed in to change notification settings - Fork 0
[TB-30] 영수증 카테고리별 지출 조회 API 변경 #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this 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 updates the receipt APIs to return total expense amounts by category and by month instead of ratios.
- Replaced ratio-based logic with sum-based expense calculations in
ReceiptEditor - Renamed/added result DTOs and response classes to reflect “expense” terminology
- Updated service, controller, API definitions, security whitelist, and CORS origins accordingly
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| receipt/domain/service/ReceiptEditor.java | Switched from ratio to total expense aggregation |
| receipt/domain/ReceiptCategoryExpenseResult.java | Added DTO for category expense results |
| receipt/domain/ReceiptMonthlyExpenseResult.java | Renamed and repurposed monthly expense DTO |
| receipt/domain/DetailCategoryResult.java | Removed obsolete ratio-based result class |
| receipt/application/service/FindReceiptService.java | Updated method names and return types for expense |
| receipt/application/port/in/FindReceiptUseCase.java | Adjusted use-case interface signatures |
| receipt/adapter/in/web/dto/response/ReceiptCategoryExpenseResponse.java | Added response record for category expense |
| receipt/adapter/in/web/dto/response/ReceiptMonthlyExpenseResponse.java | Renamed and adapted monthly expense response record |
| receipt/adapter/in/web/dto/response/ReceiptCategoryResponse.java | Removed obsolete ratio response |
| receipt/adapter/in/web/api/FindReceiptApi.java | Updated endpoint definitions and descriptions |
| receipt/adapter/in/web/FindReceiptController.java | Renamed mappings to /category-expense & /monthly-expense |
| core/config/WebConfig.java | Added production CORS origin |
| core/config/SecurityConfig.java | Whitelisted new expense endpoints |
Comments suppressed due to low confidence (2)
src/main/java/com/ClubAccount_BE/receipt/domain/service/ReceiptEditor.java:38
- Consider adding unit tests for calculateCategoryExpense to verify correct aggregation of receipt amounts per category, including edge cases like an empty list and mixed categories.
public ReceiptCategoryExpenseResult calculateCategoryExpense(List<Receipt> receipts) {
src/main/java/com/ClubAccount_BE/receipt/domain/service/ReceiptEditor.java:58
- Add unit tests for calculateMonthlyExpense to ensure monthly grouping and default zero values are correct for all 12 months.
public List<ReceiptMonthlyExpenseResult> calculateMonthlyExpense(
|
tiemo0708
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다


📌 작업 개요
✅ 작업 내용
📂 리뷰 요구사항