[DP-495] Free/Pro/Max 구독 플랜 구현#173
Merged
Merged
Conversation
added 4 commits
May 21, 2026 19:36
- 토스페이먼츠 빌링키 방식 결제/해지/환불 (7일 이내 + Free 기준치 이내)
- PRO ↔ MAX 플랜 변경 예약 (POST /subscriptions/change, 다음 결제 구간 전환)
- planExpiredAt null = 정기갱신, non-null = 해지 예정으로 의미 정리
- pendingPlanType 동일 플랜 요청 시 변경 예약 취소로 처리
- Redis 일/주간 횟수 제한 (PlanLimitService)
- GET /jobs/{jobId}/skill-gap 조회 + POST 시 DB 저장 (upsert)
- /users/me 응답에 pendingPlanType, lastBilledAt, limits 추가
- PAYMENT_006/007 에러코드 추가 (환불 불가 조건)
- JOB_004 에러코드 추가 (스킬갭 결과 없음)
- Prometheus 모니터링 설정 복원 (application.yml, SecurityConfig)
… 테스트 추가 — SonarCloud 커버리지 보강
AI 답변/질문개선 userId 분기, 모의면접/면접Q&A/스킬갭 주간 제한, WeeklyReportService FREE locked 분기, UserService checkAiLevelAccess 신규 테스트
|
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.



Summary
POST /subscriptions/change, 다음 결제 구간 전환)PlanLimitService) — AI 일 5/10/무제한, 채용 기능 주 2/7/무제한GET /jobs/{jobId}/skill-gap조회 엔드포인트 추가 + POST 시 DB 저장(upsert)/users/me응답에pendingPlanType,lastBilledAt,limits필드 추가PAYMENT_006(환불 기간 초과),PAYMENT_007(Free 기준 초과),JOB_004(스킬갭 없음)Key Decisions
planExpiredAt: null = 정기갱신 중, non-null = 해지 예정(해당일까지 유지 후 FREE 전환)POST /subscriptions/change { planType: 현재플랜 }→pendingPlanTypenull 초기화Test plan
POST /subscriptions/billing-auth→ planType PRO/MAX, planExpiredAt null 확인DELETE /subscriptions→ planExpiredAt 세팅, 자동결제 중단 확인POST /subscriptions/cancel→ 7일 이내 FREE 전환 / 초과 시 PAYMENT_006 / 사용량 초과 시 PAYMENT_007POST /subscriptions/change→ pendingPlanType 세팅, 동일 플랜 요청 시 취소 처리GET /jobs/{jobId}/skill-gap→ 저장 결과 200, 없으면 404 JOB_004GET /users/me→ limits, pendingPlanType, lastBilledAt 포함 확인