Repository navigation
[feat] 백오피스에서 회원의 유료 토큰을 조회하고 직접 지급·회수한다 - #267
Open
theminjunchoi wants to merge 3 commits into
Open
theminjunchoi wants to merge 3 commits into
theminjunchoi wants to merge 3 commits into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 23 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
theminjunchoi
force-pushed
the
feat/241-admin-paid-token
branch
from
November 20, 2026 07:53
a3158bf to
ba173ac
Compare
Test Coverage
|
This branch has not been deployed
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.
🔗 연관 이슈
📌 개요
백오피스 회원 상세에서 유료 토큰 잔액과 원장을 보고, 처리자와 사유를 남겨 직접 지급·회수한다. 결제 연동 전에도 dev에서 유료 잔액을 만들어 #239 차감 흐름을 검증할 수 있다.
🔧 주요 변경사항
GET /api/admin/members/{id}/paid-tokens: 잔액과 원장(최신순,PageResponse). 주체 매핑이 없는 회원은 잔액 0과 빈 목록POST /api/admin/members/{id}/paid-tokens/grant,/revoke: 본문{ idempotencyKey, amount, reason }.TokenWalletService.apply로ADMIN_GRANT,ADMIN_REVOKE를 반영하고ConflictRetry로 감싼다admin:<uuid>로ref_id에 들어간다. 같은 키로 다시 오면replayed=true로 처음 결과를 돌려준다AdminPrincipal.email)와 사유를AdminNote로 묶어 원장에 남긴다. 관리자 타입에만 붙일 수 있다🌐 API · DB 영향
/api/admin/**라 기존hasRole("ADMIN")규칙이 그대로 적용된다V49token_ledger에admin_email VARCHAR(255) NULL,reason VARCHAR(500) NULL추가💬 리뷰 포인트
이슈에 없던 결정이다.
409 PAID_TOKEN_SUBJECT_NOT_FOUNDcheck가 500을 내므로, 먼저 조회해409 IDEMPOTENCY_KEY_REUSED로 돌려준다amount상한 1억. 자릿수 오타 방지용으로, 가장 큰 상품의 100배다AdminNote는 도메인에서 선택값이고 API에서 필수로 받는다. 도메인에서 필수로 하면 관리자 타입을 쓰는 기존 테스트 6곳을 고쳐야 해서 그렇게 뒀다머지 순서