-
Notifications
You must be signed in to change notification settings - Fork 0
[TB-27] 영수증 금액 검증에 따른 API 수정 #32
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
영수증 수정할 경우에도 적용, 영수증 조회 시에 boolean 값으로 반환
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 introduces a new receipt amount validation logic by comparing the receipt’s total price with the sum of its items, and reflects the result through the new isAmountMatched field.
- Added the isAmountMatched field to the Receipt domain, mapper, and response DTOs.
- Implemented a check in ReceiptEditor to verify the amount match and updated both create and update services accordingly.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/ClubAccount_BE/receipt/mapper/ReceiptMapper.java | Added mapping for the new isAmountMatched field. |
| src/main/java/com/ClubAccount_BE/receipt/domain/service/ReceiptEditor.java | Introduced checkAmountMatch method to validate receipt amounts. |
| src/main/java/com/ClubAccount_BE/receipt/domain/Receipt.java | Extended the domain model with the isAmountMatched field and its setter. |
| src/main/java/com/ClubAccount_BE/receipt/application/service/UpdateReceiptService.java | Updated receipt amount verification logic in the update flow. |
| src/main/java/com/ClubAccount_BE/receipt/application/service/CreateReceiptService.java | Updated receipt amount verification logic in the create flow. |
| src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/dto/response/ReceiptResponse.java | Updated DTO to include the isAmountMatched field. |
| src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/dto/response/ReceiptDetailResponse.java | Updated detailed DTO to include the isAmountMatched field. |
Comments suppressed due to low confidence (1)
src/main/java/com/ClubAccount_BE/receipt/domain/Receipt.java:90
- [nitpick] The method name 'checkAmountMatched' is used to set the match status, which could be misleading. Consider renaming it to 'setAmountMatched' for better clarity.
public void checkAmountMatched(boolean isAmountMatched) {
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
고생하셨습니다!
리뷰단거만 한번 확인해주세요
src/main/java/com/ClubAccount_BE/receipt/application/service/CreateReceiptService.java
Show resolved
Hide resolved
|



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