Skip to content

[#61] FEAT: 파트너 누적 총 인센티브 조회 API 추가#82

Merged
Hwan0518 merged 1 commit intodevelopfrom
feature/incentive/total
Jan 31, 2026
Merged

[#61] FEAT: 파트너 누적 총 인센티브 조회 API 추가#82
Hwan0518 merged 1 commit intodevelopfrom
feature/incentive/total

Conversation

@Hwan0518
Copy link
Contributor

Issue ✨

변경점 👍

  • 파트너 누적 총 인센티브 조회 API 추가
    • Admin API: GET /api/v1/incentive/admin/total/{partnerUuid}
    • Partner API: GET /api/v1/incentive/partner/total (본인 조회)

- Admin API: GET /api/v1/incentive/admin/total/{partnerUuid}
- Partner API: GET /api/v1/incentive/partner/total (본인 조회)
- 단위 테스트 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 31, 2026 03:07
@Hwan0518 Hwan0518 merged commit 7a8a2c1 into develop Jan 31, 2026
3 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds two new API endpoints for retrieving the total accumulated incentives for partners. The admin endpoint allows administrators to query any partner's total incentive, while the partner endpoint allows partners to query their own total incentive. The implementation includes service layer methods, repository queries, and comprehensive unit tests.

Changes:

  • Added getTotalIncentiveByPartnerUuid method across repository, service, and QueryDSL layers
  • Added two new REST endpoints: admin endpoint for querying any partner, and partner endpoint for self-query
  • Added unit tests for the new service method and mock repository implementation

Reviewed changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
GetIncentiveDataController.java Added two new endpoints for querying partner total incentives (admin and partner)
PartnerTotalIncentiveResponse.java New response DTO for total incentive data
GetIncentiveDataService.java Added service method to retrieve total incentive by partner UUID
IncentiveQueryRepository.java Added interface method for single partner total incentive query
IncentiveQueryRepositoryImpl.java Implemented repository method delegating to QueryDSL layer
IncentiveQuerydslRepository.java Implemented QueryDSL query to sum total incentives for a partner
GetIncentiveDataServiceUnitTest.java Added comprehensive unit tests for the new service method
IncentiveJobManagementServiceUnitTest.java Added mock implementation for testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +155 to +157
public ResponseEntity<BaseResponse<PartnerTotalIncentiveResponse>> adminGetPartnerTotalIncentive(
@PathVariable UUID partnerUuid
) {
Copy link

Copilot AI Jan 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The admin endpoint is missing the authentication parameter that is consistently used in similar endpoints throughout the codebase. All other admin endpoints for partner data queries include CustomUserDetails authentication parameter (e.g., GetTotalStatsController.java:50-51, GetRelationshipDataController.java:44, GetDailyStatsController.java:169-172). This parameter is typically used for audit logging or additional authorization checks. Consider adding @AuthenticationPrincipal CustomUserDetails authentication to maintain consistency with established patterns.

Copilot uses AI. Check for mistakes.
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