Repository navigation
feat: 환불 계좌 입력·환불 완료와 입금 반환·종결 기록, 탈퇴 차단 #581
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /** | ||
| * auth(구매자 탈퇴)가 order에 묻는 "탈퇴를 막는 주문·환불 수" 읽기 포트. | ||
| * order → auth 의존(관리자 컨텍스트)이 이미 있어 auth가 OrderModule을 import하면 순환이라, 계약은 무의존 common에 두고 | ||
| * order가 구현을 제공한다. auth는 첫 호출 때 ModuleRef(strict: false)로 찾는다. | ||
| */ | ||
| export abstract class WithdrawalBlockingOrderQuery { | ||
| /** 진행 중 주문(입금 대기~제작 완료)과 송금이 끝나지 않은 환불(종류 무관) 수의 합. */ | ||
| abstract countByBuyer(accountId: bigint): Promise<number>; | ||
| } |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
If an administrator creates a deposit return for a canceled order after
countByBuyer()returns zero but beforesoftDeleteAccount()commits, withdrawal still succeeds with an unfinished refund.DepositRecordRepository.createReturn()andlinkToOrder()lock only the order, while account deletion runs in a separate transaction, so nothing prevents this interleaving. The buyer's sessions are then revoked, leaving anAWAITING_ACCOUNTrefund whose account they can no longer submit. Coordinate the check and deletion with refund creation through a shared lock and transaction protocol; merely counting before deletion does not enforce the new withdrawal restriction.Useful? React with 👍 / 👎.
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.
미반영(기록): 유효함. 막으려면 탈퇴 tx(계정 FOR UPDATE + 잠금 읽기 건수)와 입금 반환 생성(계정 FOR SHARE)이 같은 계정 행을 잠그는 auth·order 공용 잠금 프로토콜이 필요해 이 PR 범위를 넘는 새 장치. 관리자 수동 작업과 구매자 탈퇴가 같은 순간 겹쳐야 생기는 경합이라 후속 #582(탈퇴 검사 직렬화 항목)으로 넘김.