feat(channel-donation-calculate): 채널 후원 정산 응답에 기간 합계를 추가한다

This commit is contained in:
2026-02-26 19:44:37 +09:00
parent 19d3544c72
commit e6ecf8aca1
17 changed files with 213 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
- [x] Admin 채널 후원 정산 조회 흐름(Controller/Service/Repository/DTO) 확인
- [x] Creator 정산 조회 흐름(Controller/Service/Repository/DTO) 확인
- [x] 날짜 기준 비페이징 합계 조회 방식 결정 및 반영
- [x] `GetAdminChannelDonationSettlementResponse`에 합계 필드 추가
- [x] `GetCreatorChannelDonationSettlementResponse`에 합계 필드 추가
- [x] 관련 테스트/빌드/진단 실행 및 결과 기록
## 검증 기록
### 1차 구현
- 무엇을: 관리자/크리에이터 관리자 채널 후원 정산 응답에 날짜 범위 전체(비페이징) 합계(`total`)를 추가하고, QueryRepository에 합계 전용 집계 쿼리를 추가했다.
- 왜: 기존 응답이 페이지 내 `items``totalCount`만 제공해 날짜 범위 전체 정산 합계를 확인할 수 없었기 때문이다.
- 어떻게:
- 응답 DTO 확장
- `GetAdminChannelDonationSettlementResponse``total` 필드 추가
- `GetCreatorChannelDonationSettlementResponse``total` 필드 추가
- 합계 DTO/QueryData 추가: `GetAdminChannelDonationSettlementTotal`, `GetCreatorChannelDonationSettlementTotal`, 각 `*TotalQueryData`
- 서비스/리포지토리 반영
- 관리자: `AdminChannelDonationCalculateQueryRepository.getChannelDonationByCreatorTotal(...)` 추가 후 서비스에서 `total` 매핑
- 크리에이터 관리자: `CreatorAdminChannelDonationCalculateQueryRepository.getChannelDonationSettlementTotal(...)` 추가 후 서비스에서 `total` 매핑
- 테스트 반영
- 컨트롤러/서비스/리포지토리 테스트에서 `total` 필드와 합계 집계 검증 추가
- 검증 명령 및 결과
- `lsp_diagnostics`(Kotlin 대상): `.kt` LSP 서버 미설정으로 진단 불가(환경 제약)
- `./gradlew test --tests "*channelDonation*"` → 성공
- `./gradlew build` → 1차 실패(ktlint max line length), 코드 포맷 수정 후 재실행 성공