Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements the receipt deletion functionality by adding a service, controller, and API interface while also updating related components for image upload and error handling.
- Implements deletion of receipts along with associated images from the S3 bucket.
- Introduces a new DeleteReceiptService and corresponding UseCase, API, and Controller.
- Updates existing CreateReceiptService and its tests to use the new UploadReceiptImagePort and refines error codes.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| CreateReceiptServiceTest.java | Updated import to use UploadReceiptImagePort for consistency in receipt image uploads. |
| ReceiptEditor.java | Added a method to generate the list of receipt image URLs to delete, skipping the default image. |
| DeleteReceiptService.java | Introduces logic to delete receipts and their images by integrating with the editor and the deletion ports. |
| CreateReceiptService.java | Updated to use UploadReceiptImagePort for handling receipt image uploads. |
| DeleteReceiptUseCase.java | Added an interface for deleting receipts. |
| DeleteReceiptApi.java | Defines the API for receipt deletion with proper documentation annotations. |
| DeleteReceiptController.java | Implements the deletion endpoint but may lead to redundant endpoint URLs. |
| LoginUser.java | Updated with hidden Swagger parameter annotation. |
| ErrorCode.java | Added a new error code for failure to delete receipts. |
src/main/java/com/ClubAccount_BE/receipt/adapter/in/web/DeleteReceiptController.java
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
tiemo0708
reviewed
May 21, 2025
src/main/java/com/ClubAccount_BE/receipt/application/port/out/DeleteReceiptPort.java
Outdated
Show resolved
Hide resolved
|
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.



📌 작업 개요
✅ 작업 내용
📂 리뷰 요구사항
orphanRemoval = true로 정의가 되어 있습니다. 여러 개의 영수증 객체를 삭제해야 하기에deleteAllByIdInBatch로 처리하고자 하였으나 영속성 컨텍스트의 상태와 동기화 문제가 생길 수 있기에 개별적으로 삭제를 처리하는 로직으로 구현했습니다.