[WTH-426] 회비 유저 사이드 api 구현#86
Hidden character warning
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 33 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughReceipt 도메인(엔티티·매퍼·유스케이스·컨트롤러) 전체 삭제, ChangesAccount 도메인 리팩토링 및 부원 API 신설
Sequence Diagram(s)sequenceDiagram
participant Client
participant AccountController
participant GetMyAccountTransactionQueryService
participant MemberAccountAccessResolver
participant AccountTransactionRepository
participant FileReader
participant MemberTransactionMapper
Client->>AccountController: GET /{cardinal}/transactions?filter=ALL&page=0
AccountController->>GetMyAccountTransactionQueryService: findTransactions(clubId, cardinal, filter, sort, page, size, userId)
GetMyAccountTransactionQueryService->>MemberAccountAccessResolver: resolve(clubId, cardinal, userId)
MemberAccountAccessResolver-->>GetMyAccountTransactionQueryService: MemberAccountAccess(account, member)
GetMyAccountTransactionQueryService->>AccountTransactionRepository: findMemberVisibleTransactions(accountId, clubMemberId, publicTypes, includeRefund, pageable)
AccountTransactionRepository-->>GetMyAccountTransactionQueryService: Slice<AccountTransaction>
GetMyAccountTransactionQueryService->>FileReader: findAll(ACCOUNT_TRANSACTION, transactionIds)
FileReader-->>GetMyAccountTransactionQueryService: Map<ownerId, List<File>>
GetMyAccountTransactionQueryService->>AccountTransactionRepository: sumNetDuesAmountByAccountId(accountId)
GetMyAccountTransactionQueryService->>AccountTransactionRepository: countMemberVisibleTransactions(...)
GetMyAccountTransactionQueryService->>MemberTransactionMapper: toResponse(transaction, hasReceipt)
GetMyAccountTransactionQueryService-->>AccountController: MemberAccountTransactionsResponse(counts, duesSummary, transactions)
AccountController-->>Client: 200 OK
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (4)
src/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountTransactionUseCaseTest.kt (2)
67-67: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win여기도 등록자 이름을 문자열 리터럴로 고정하지 않는 편이 좋습니다.
"적순"대신adminMember.user.name을 쓰면 fixture 기본값 변경에 덜 취약하고, 테스트가 유스케이스 계약만 검증하게 됩니다.Also applies to: 152-152
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountTransactionUseCaseTest.kt` at line 67, The test setup is hardcoding the registrar/admin member name instead of using the fixture value, which makes it brittle. In ManageAccountTransactionUseCaseTest, replace the fixed string reference with adminMember.user.name wherever the expected registrar name is asserted, so the test stays aligned with ClubMemberTestFixture and UserTestFixture defaults and only verifies the use case contract.
115-116: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win영수증 교체 케이스가 “새 파일이 응답에 반영되는지”는 아직 못 잡습니다.
fileMapper.toFileResponse(any())가 항상 같은receiptResponse를 돌려서, 구현이 실수로oldReceipt를 응답에 매핑해도 이 테스트는 통과합니다.oldReceipt/newReceipt에 서로 다른 응답을 매핑하거나fileMapper.toFileResponse(newReceipt)호출을 직접 검증해 두는 편이 안전합니다.Also applies to: 287-309
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountTransactionUseCaseTest.kt` around lines 115 - 116, The receipt replacement test is too permissive because `fileMapper.toFileResponse(any())` always returns the same `receiptResponse`, so it cannot detect if `ManageAccountTransactionUseCase` maps `oldReceipt` instead of `newReceipt`. Update the test setup around `fileMapper.toFileResponse` and the `ManageAccountTransactionUseCase` flow so `oldReceipt` and `newReceipt` produce different responses, or explicitly verify `fileMapper.toFileResponse(newReceipt)` is called and reflected in the result.src/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountPaymentUseCaseTest.kt (1)
53-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win등록자 이름 기대값은 fixture 값에서 읽어오세요.
지금은
"적순"을 하드코딩해서UserTestFixture의 기본 이름만 바뀌어도 유스케이스 계약과 무관하게 테스트가 깨집니다. 기대값을adminMember.user.name으로 두면 검증 대상이registeredByName = admin.user.name계약에만 남습니다.수정 예시
- it.first().registeredByName == "적순" + it.first().registeredByName == adminMember.user.name ... - it.first().registeredByName == "적순" + it.first().registeredByName == adminMember.user.nameAlso applies to: 90-91, 160-161
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountPaymentUseCaseTest.kt` around lines 53 - 57, The tests are hardcoding the expected registrant name instead of deriving it from the fixture, which makes them fragile against unrelated fixture changes. Update the assertions in ManageAccountPaymentUseCaseTest to use adminMember.user.name as the expected value wherever the registered-by name is checked, so the test only validates the registeredByName = admin.user.name contract and stays aligned with UserTestFixture and ClubMemberTestFixture.src/test/kotlin/com/weeth/domain/account/presentation/AccountControllerTest.kt (1)
22-156: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win컨트롤러 계약은 MVC 테스트로 한 번 더 고정하세요.
지금처럼 메서드를 직접 호출하면 서비스 위임만 보이고,@CurrentUser주입·@RequestParam기본값·CommonResponse<T>응답 형태는 놓칠 수 있습니다. 대표 케이스 1개는@WebMvcTest+@MockkBean으로 추가하는 편이 안전합니다.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/kotlin/com/weeth/domain/account/presentation/AccountControllerTest.kt` around lines 22 - 156, Add a WebMvcTest for AccountController to lock down the controller contract, since the current direct method calls only verify service delegation. Create one representative MVC test using AccountController with `@MockkBean` mocks for GetMyAccountQueryService and GetMyAccountTransactionQueryService, and assert `@CurrentUser/`@RequestParam binding, default parameter handling, and the CommonResponse<T> shape are returned correctly.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/kotlin/com/weeth/domain/account/application/dto/request/SavePaymentTargetsRequest.kt`:
- Around line 5-13: The SavePaymentTargetsRequest.targetedClubMemberIds field is
currently defaulting to emptyList(), which makes a missing JSON field
indistinguishable from an intentional empty selection; update the
SavePaymentTargetsRequest data class so targetedClubMemberIds is required with
no default value, and keep the Schema metadata/example aligned with that
stricter contract to ensure callers must explicitly provide the list.
In
`@src/main/kotlin/com/weeth/domain/account/application/usecase/command/RegisterAccountUseCase.kt`:
- Around line 279-339: The `savePaymentTargets` use case currently only locks
the account via `getAccountWithLock()` and can still mutate an ACTIVE account’s
payment targets. Add an explicit status guard in
`RegisterAccountUseCase.savePaymentTargets` (using
`account`/`AccountRegistrationStep` or the account’s current state) so this
registration-only path accepts only DRAFT accounts and rejects ACTIVE ones
before any `paymentTargetRepository` changes. Keep the check near the start of
the method, after loading `account`, so no TARGETED/EXCLUDED updates or new
`AccountPaymentTarget.createTargeted` rows can be applied to operational
ledgers.
In
`@src/main/kotlin/com/weeth/domain/account/application/usecase/query/GetMyAccountTransactionQueryService.kt`:
- Around line 66-73: In GetMyAccountTransactionQueryService, the paging branch
is nulling out both duesSummary and counts, but the review asks to keep counts
available on follow-up pages. Update the logic around countByFilter and
MemberAccountTransactionsResponse.DuesSummaryResponse so only duesSummary is
first-page-only, while counts is returned consistently for every page, or
otherwise align the response contract and client usage if counts is truly meant
to be first-page-only.
In
`@src/main/kotlin/com/weeth/domain/account/domain/repository/AccountPaymentTargetRepository.kt`:
- Around line 201-205: The KDoc example in AccountPaymentTargetRepository is
inconsistent with the stated rule because it uses addition instead of
subtraction for deriving the excluded count. Update the documentation near the
countActiveClubMemberTargetsByAccountIdAndTargetStatus reference so the example
matches the invariant “active roster − active TARGETED” and clearly shows
subtraction-based derivation, keeping the wording aligned with
AccountTargetStatus.
In
`@src/main/kotlin/com/weeth/domain/account/presentation/AccountRegisterController.kt`:
- Around line 171-177: The OpenAPI docs in AccountRegisterController are
inconsistent: the PUT endpoint for payment targets is documented as a full
snapshot/replace operation, but the related `findPaymentTargets()` description
still tells clients to send only changed members as deltas. Update the
`findPaymentTargets()` operation text to match the snapshot contract used by
`registration/payment-targets`, and ensure the wording clearly states that
omitted members are excluded and that the full target set should be handled
consistently by the frontend.
In `@src/main/resources/db/migration/V6__drop_legacy_account_receipt.sql`:
- Line 10: The V6 migration currently drops only the receipt table, but it also
needs to account for legacy RECEIPT-owned file data tied to
FileOwnerType.RECEIPT. Update the migration around the receipt cleanup step to
either delete or migrate any remaining RECEIPT file records before dropping the
table, or add a guard/assertion that fails if such rows still exist, so no
orphaned data or enum-mapping issues remain after the migration.
---
Nitpick comments:
In
`@src/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountPaymentUseCaseTest.kt`:
- Around line 53-57: The tests are hardcoding the expected registrant name
instead of deriving it from the fixture, which makes them fragile against
unrelated fixture changes. Update the assertions in
ManageAccountPaymentUseCaseTest to use adminMember.user.name as the expected
value wherever the registered-by name is checked, so the test only validates the
registeredByName = admin.user.name contract and stays aligned with
UserTestFixture and ClubMemberTestFixture.
In
`@src/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountTransactionUseCaseTest.kt`:
- Line 67: The test setup is hardcoding the registrar/admin member name instead
of using the fixture value, which makes it brittle. In
ManageAccountTransactionUseCaseTest, replace the fixed string reference with
adminMember.user.name wherever the expected registrar name is asserted, so the
test stays aligned with ClubMemberTestFixture and UserTestFixture defaults and
only verifies the use case contract.
- Around line 115-116: The receipt replacement test is too permissive because
`fileMapper.toFileResponse(any())` always returns the same `receiptResponse`, so
it cannot detect if `ManageAccountTransactionUseCase` maps `oldReceipt` instead
of `newReceipt`. Update the test setup around `fileMapper.toFileResponse` and
the `ManageAccountTransactionUseCase` flow so `oldReceipt` and `newReceipt`
produce different responses, or explicitly verify
`fileMapper.toFileResponse(newReceipt)` is called and reflected in the result.
In
`@src/test/kotlin/com/weeth/domain/account/presentation/AccountControllerTest.kt`:
- Around line 22-156: Add a WebMvcTest for AccountController to lock down the
controller contract, since the current direct method calls only verify service
delegation. Create one representative MVC test using AccountController with
`@MockkBean` mocks for GetMyAccountQueryService and
GetMyAccountTransactionQueryService, and assert `@CurrentUser/`@RequestParam
binding, default parameter handling, and the CommonResponse<T> shape are
returned correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 759fdb0e-1aee-4863-9663-112b6d2f8510
📒 Files selected for processing (68)
src/main/kotlin/com/weeth/domain/account/application/dto/request/AccountSaveRequest.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/request/AccountTransactionFilter.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/request/ReceiptSaveRequest.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/request/ReceiptUpdateRequest.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/request/SaveAccountTransactionRequest.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/request/SavePaymentTargetsRequest.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/request/UpdateAccountTransactionRequest.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/response/AccountCardinalResponse.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/response/AccountResponse.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/response/AccountTransactionResponse.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/response/MemberAccountTransactionsResponse.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/response/MemberTransactionDetailResponse.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/response/MemberTransactionResponse.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/response/MyAccountResponse.ktsrc/main/kotlin/com/weeth/domain/account/application/dto/response/ReceiptResponse.ktsrc/main/kotlin/com/weeth/domain/account/application/exception/AccountErrorCode.ktsrc/main/kotlin/com/weeth/domain/account/application/exception/ReceiptAccountMismatchException.ktsrc/main/kotlin/com/weeth/domain/account/application/exception/ReceiptNotFoundException.ktsrc/main/kotlin/com/weeth/domain/account/application/mapper/AccountMapper.ktsrc/main/kotlin/com/weeth/domain/account/application/mapper/AccountTransactionMapper.ktsrc/main/kotlin/com/weeth/domain/account/application/mapper/MemberTransactionMapper.ktsrc/main/kotlin/com/weeth/domain/account/application/mapper/MyAccountMapper.ktsrc/main/kotlin/com/weeth/domain/account/application/mapper/ReceiptMapper.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/MemberAccountAccessResolver.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountPaymentUseCase.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountTransactionUseCase.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountUseCase.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/command/ManageReceiptUseCase.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/command/RegisterAccountUseCase.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/query/GetAccountQueryService.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/query/GetAccountTransactionQueryService.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/query/GetMyAccountQueryService.ktsrc/main/kotlin/com/weeth/domain/account/application/usecase/query/GetMyAccountTransactionQueryService.ktsrc/main/kotlin/com/weeth/domain/account/domain/entity/Account.ktsrc/main/kotlin/com/weeth/domain/account/domain/entity/AccountTransaction.ktsrc/main/kotlin/com/weeth/domain/account/domain/entity/Receipt.ktsrc/main/kotlin/com/weeth/domain/account/domain/enums/AccountTargetStatus.ktsrc/main/kotlin/com/weeth/domain/account/domain/repository/AccountPaymentTargetRepository.ktsrc/main/kotlin/com/weeth/domain/account/domain/repository/AccountRepository.ktsrc/main/kotlin/com/weeth/domain/account/domain/repository/AccountTransactionRepository.ktsrc/main/kotlin/com/weeth/domain/account/domain/repository/ReceiptRepository.ktsrc/main/kotlin/com/weeth/domain/account/presentation/AccountController.ktsrc/main/kotlin/com/weeth/domain/account/presentation/AccountRegisterController.ktsrc/main/kotlin/com/weeth/domain/account/presentation/AccountResponseCode.ktsrc/main/kotlin/com/weeth/domain/account/presentation/ReceiptAdminController.ktsrc/main/kotlin/com/weeth/domain/file/domain/enums/FileOwnerType.ktsrc/main/kotlin/com/weeth/global/common/response/SliceResponse.ktsrc/main/resources/db/migration/V6__drop_legacy_account_receipt.sqlsrc/main/resources/db/migration/V7__add_account_transaction_registered_by_name.sqlsrc/test/kotlin/com/weeth/domain/account/application/dto/request/AccountTransactionRequestValidationTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountPaymentUseCaseTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountTransactionUseCaseTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountUseCaseTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageReceiptUseCaseTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/command/MembershipFeeRegistrationIntegrationTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/command/RegisterAccountUseCaseTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/query/GetAccountQueryServiceTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/query/GetAccountRegistrationQueryServiceTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/query/GetAccountTransactionQueryServiceTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/query/GetMyAccountQueryServiceTest.ktsrc/test/kotlin/com/weeth/domain/account/application/usecase/query/GetMyAccountTransactionQueryServiceTest.ktsrc/test/kotlin/com/weeth/domain/account/domain/entity/AccountTest.ktsrc/test/kotlin/com/weeth/domain/account/domain/entity/ReceiptTest.ktsrc/test/kotlin/com/weeth/domain/account/domain/repository/AccountRepositoryTest.ktsrc/test/kotlin/com/weeth/domain/account/fixture/AccountTestFixture.ktsrc/test/kotlin/com/weeth/domain/account/fixture/ReceiptTestFixture.ktsrc/test/kotlin/com/weeth/domain/account/presentation/AccountControllerTest.ktsrc/test/kotlin/com/weeth/domain/file/domain/repository/FileRepositoryTest.kt
💤 Files with no reviewable changes (23)
- src/main/kotlin/com/weeth/domain/account/application/dto/response/AccountResponse.kt
- src/main/kotlin/com/weeth/domain/account/application/exception/ReceiptAccountMismatchException.kt
- src/main/kotlin/com/weeth/domain/account/domain/repository/ReceiptRepository.kt
- src/test/kotlin/com/weeth/domain/account/domain/entity/ReceiptTest.kt
- src/main/kotlin/com/weeth/domain/account/application/dto/request/ReceiptUpdateRequest.kt
- src/test/kotlin/com/weeth/domain/account/application/usecase/command/ManageReceiptUseCaseTest.kt
- src/main/kotlin/com/weeth/domain/account/application/dto/request/AccountSaveRequest.kt
- src/main/kotlin/com/weeth/domain/account/application/mapper/ReceiptMapper.kt
- src/main/kotlin/com/weeth/domain/file/domain/enums/FileOwnerType.kt
- src/main/kotlin/com/weeth/domain/account/application/dto/request/ReceiptSaveRequest.kt
- src/main/kotlin/com/weeth/domain/account/application/exception/ReceiptNotFoundException.kt
- src/main/kotlin/com/weeth/domain/account/application/dto/response/ReceiptResponse.kt
- src/main/kotlin/com/weeth/domain/account/domain/entity/Receipt.kt
- src/test/kotlin/com/weeth/domain/account/fixture/ReceiptTestFixture.kt
- src/main/kotlin/com/weeth/domain/account/application/usecase/command/ManageReceiptUseCase.kt
- src/main/kotlin/com/weeth/domain/account/application/usecase/query/GetAccountQueryService.kt
- src/test/kotlin/com/weeth/domain/account/application/usecase/query/GetAccountRegistrationQueryServiceTest.kt
- src/test/kotlin/com/weeth/domain/account/application/usecase/query/GetAccountQueryServiceTest.kt
- src/main/kotlin/com/weeth/domain/account/application/mapper/AccountMapper.kt
- src/test/kotlin/com/weeth/domain/account/domain/repository/AccountRepositoryTest.kt
- src/test/kotlin/com/weeth/domain/account/domain/entity/AccountTest.kt
- src/main/kotlin/com/weeth/domain/account/application/usecase/command/ManageAccountUseCase.kt
- src/main/kotlin/com/weeth/domain/account/presentation/ReceiptAdminController.kt
| val (counts, duesSummary) = | ||
| if (pageable.pageNumber == 0) { | ||
| val duesTotalAmount = transactionRepository.sumNetDuesAmountByAccountId(account.id).toInt() | ||
| countByFilter(account.id, member.id, duesTotalAmount) to | ||
| MemberAccountTransactionsResponse.DuesSummaryResponse(totalAmount = duesTotalAmount) | ||
| } else { | ||
| null to null | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
후속 페이지에서도 counts를 비우지 마세요.
Line 66-73은 duesSummary뿐 아니라 counts도 함께 null로 만듭니다. 이렇게 되면 탭 카운트도 첫 응답을 별도로 캐시해야 해서 API 계약이 달라집니다. counts는 모든 페이지에서 유지하거나, 정말 첫 페이지 전용이라면 응답 스펙과 클라이언트 계약을 함께 정리한 뒤 머지하는 편이 안전합니다. Based on PR objectives: duesSummary만 첫 페이지에서 반환되고 프런트가 이를 캐시한다고 명시돼 있습니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@src/main/kotlin/com/weeth/domain/account/application/usecase/query/GetMyAccountTransactionQueryService.kt`
around lines 66 - 73, In GetMyAccountTransactionQueryService, the paging branch
is nulling out both duesSummary and counts, but the review asks to keep counts
available on follow-up pages. Update the logic around countByFilter and
MemberAccountTransactionsResponse.DuesSummaryResponse so only duesSummary is
first-page-only, while counts is returned consistently for every page, or
otherwise align the response contract and client usage if counts is truly meant
to be first-page-only.
soo0711
left a comment
There was a problem hiding this comment.
수고하셨습니다!! 코드래빗 피드백만 보면 될 것 같습니닷 👍
# Conflicts: # src/main/kotlin/com/weeth/domain/account/domain/repository/AccountPaymentTargetRepository.kt
📌 Summary
회비 유저 사이드 API 구현
📝 Changes
What
회비 유저 사이드 API 구현
Why
유저 사이드 기능 완성을 위해
How
📸 Screenshots / Logs
💡 Reviewer 참고사항
우선 빠르게 테스트해볼 수 있는 시나리오는 해봤는데, 아직 부족할 수 있습니다. 엣지는 프론트 연동 + QA 하면서 찾고 한 번에 수정하는게 좋을 것 같아요!
@dalzzy GET API들 보면 필터가 많은데, 기존처럼 전부 조회해서 프론트에서 자체 필터링 하는게 첫 번째고, 필요시 필터를 포함한 조회를 할 수 있게 부가적으로 열어둔 필터라고 생각해주시면 됩니다! ALL이 기본!
거래 내역 목록 API에서 duesSummary가 있는데 얘는 첫 페이지(무한 스크롤 초기 조회) 에서만 값을 주고 있어용. 그래서 첫 조회시 해당 정보를 캐싱해서 사용하고, 나머지만 업데이트 하는 방식으로 구현 부탁드립니닷. 회비 집계를 매번 반복할 수 없어서 이렇게 구현 했어요
✅ Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Breaking Changes