Skip to content

Develop#500

Merged
minij02 merged 4 commits into
mainfrom
develop
May 23, 2026
Merged

Develop#500
minij02 merged 4 commits into
mainfrom
develop

Conversation

@minij02
Copy link
Copy Markdown
Collaborator

@minij02 minij02 commented May 23, 2026

📌 기능 설명

📌 구현 내용

📌 구현 결과

📌 논의하고 싶은 점

minij02 and others added 4 commits May 23, 2026 22:30
#485에서 Refunded 상태가 도입됐으나 결제내역(GET /api/prompts/purchases)
응답에 status 정보가 없어 환불된 거래를 식별할 수 없었음. 환불 표시 추가.

- PurchaseRepository.findSucceededByUser → findPurchaseHistory로 rename
  - status IN (Succeed, Refunded) 양쪽 모두 조회
  - payment.status / refund.refunded_at include
- PurchaseHistoryItemDTO 확장: purchased_at(stale dto 정정) + status + refunded_at
- PurchaseHistoryService.list: status, refunded_at 매핑
- Swagger 응답 schema에 status enum + refunded_at 필드 추가

프론트는 status='Refunded' 항목에 환불 뱃지/메시지 표시 가능.
직전 commit에서 jsdoc 인덴트가 ' * *  ' 형태로 별표 두 개가 들어가 YAML 파싱 실패.
swagger 빌드 깨짐. ' * '로 정정.
- 쿼리 파라미터 page(기본 1), limit(기본 10, 최대 100) 추가
- repository:
  - findSalesByMonth에 skip/take 적용 (페이지 데이터만 반환)
  - countSalesByMonth 신규 (페이지네이션 메타)
  - aggregateSalesByMonth 신규 (raw SQL로 월 전체 합계 — Refunded 분리 포함)
- service: 세 호출 병렬 + items/summary/pagination 매핑
- summary의 의미를 페이지 단위 → 월 전체 합계로 정합화 (페이지네이션 도입과
  함께 통계 정확성 우선). 응답 형식 동일 (count/total_sales/total_settled/
  total_fee/refunded_count/refunded_amount).
- DTO에 pagination 필드 추가
- Swagger 갱신: query params + pagination 응답 + summary description 보강
- swagger.json 재생성
[FEAT] 구매/정산 - 결제내역 환불 표시 + 월별 판매내역 페이지네이션 (#497)
@minij02 minij02 merged commit 783344d into main May 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant