Merged
Conversation
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
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(
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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