Skip to content

[FEATURE/#109] 카드/계좌별 세부 거래내역 조회 API 구현 #110

Merged
seamooll merged 4 commits intomainfrom
feat/#109-asset-detail-api
Feb 14, 2026
Merged

[FEATURE/#109] 카드/계좌별 세부 거래내역 조회 API 구현 #110
seamooll merged 4 commits intomainfrom
feat/#109-asset-detail-api

Conversation

@seamooll
Copy link
Contributor

@seamooll seamooll commented Feb 14, 2026

🔗 Related Issue

📝 Summary

  • 신규 API 추가
    • 계좌 상세 조회: GET /api/assets/accounts/{accountId}/transactions
    • 카드 상세 조회: GET /api/assets/cards/{cardId}/transactions
      • ledger 테이블이 아닌, CardApprovalBankTransaction의 원본 데이터 조회
      • ledger 테이블로 변환되어 이미 카테고리가 지정된 내역은 해당 카테고리를 가져다 쓰고, ledger 테이블에 존재하지 않는(미분류된) 원본 내역에 대해서만 카테고리 매핑 실시

🔄 Changes

  • API 변경 (추가/수정)
  • 데이터 및 도메인 변경 (DB, 비즈니스 로직)
  • 설정 또는 인프라 관련 변경
  • 리팩토링

💬 Questions & Review Points

📸 API Test Results (Swagger)

image image

✅ Checklist

  • API 테스트 완료
  • 테스트 결과 사진 첨부
  • 빌드 성공 확인 (./gradlew build)

@seamooll seamooll self-assigned this Feb 14, 2026
@seamooll seamooll added ✨ feat 기능 구현 도희 도희 labels Feb 14, 2026
@seamooll seamooll linked an issue Feb 14, 2026 that may be closed by this pull request
2 tasks
@gemini-code-assist
Copy link

Summary of Changes

Hello @seamooll, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 사용자가 자신의 은행 계좌와 신용카드에 대한 상세 거래 내역을 조회할 수 있는 새로운 API 기능을 도입합니다. 기존 가계부(Ledger) 데이터와 원본 거래 데이터(BankTransaction, CardApproval)를 통합하여, 분류된 내역은 그대로 활용하고 미분류 내역은 동적으로 카테고리를 매핑하여 사용자에게 포괄적이고 분류된 금융 정보를 제공합니다. 이를 통해 재무 관리 기능이 강화되고 사용자 경험이 개선됩니다.

Highlights

  • 신규 API 엔드포인트 추가: 계좌 및 카드별 세부 거래내역을 조회하는 두 가지 새로운 API 엔드포인트가 추가되었습니다: GET /api/assets/accounts/{accountId}/transactions 및 GET /api/assets/cards/{cardId}/transactions.
  • 거래내역 카테고리 매핑 로직 개선: 기존 Ledger 테이블에 분류된 내역은 해당 카테고리를 사용하고, 미분류된 원본 내역(BankTransaction, CardApproval)에 대해서는 키워드 기반의 카테고리 매핑 로직이 적용됩니다. 이 로직은 CategoryMatchingService로 분리되어 재사용성과 유지보수성이 향상되었습니다.
  • 성능 최적화를 위한 DB 인덱스 추가: BankTransaction 및 CardApproval 테이블에 각각 bank_account_id, tr_datetime 및 card_id, used_datetime 컬럼에 대한 인덱스가 추가되어 거래내역 조회 성능이 향상되었습니다.
  • QueryDSL 기반의 거래내역 조회 리포지토리 도입: AssetTransactionQueryRepository가 새로 추가되어 QueryDSL을 활용한 유연하고 효율적인 거래내역 조회 쿼리를 제공합니다.
  • API 응답 및 오류 코드 정의: 새로운 거래내역 조회 API를 위한 성공 및 오류 코드가 AssetSuccessCode와 AssetErrorCode에 각각 추가되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/main/java/org/umc/valuedi/domain/asset/controller/AssetController.java
    • 계좌 및 카드 거래내역 조회를 위한 새로운 GET 엔드포인트가 추가되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/controller/AssetControllerDocs.java
    • 새로운 계좌 및 카드 거래내역 조회 API에 대한 Swagger 문서가 추가되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/converter/AssetConverter.java
    • AssetTransactionDetail 및 AssetTransactionResponse DTO 변환 메서드가 추가되었습니다.
    • CardInfo DTO에 cardId 필드가 추가되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/dto/res/AssetResDTO.java
    • 거래 상세 정보 및 페이지 응답을 위한 AssetTransactionDetail 및 AssetTransactionResponse DTO가 새로 정의되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/dto/res/CardResDTO.java
    • CardInfo DTO에 cardId 필드가 추가되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/entity/BankTransaction.java
    • bank_transaction 테이블에 bank_account_id와 tr_datetime 컬럼에 대한 인덱스가 추가되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/entity/CardApproval.java
    • card_approval 테이블에 card_id와 used_datetime 컬럼에 대한 인덱스가 추가되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/exception/code/AssetErrorCode.java
    • ACCOUNT_NOT_FOUND 및 CARD_NOT_FOUND 오류 코드가 추가되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/exception/code/AssetSuccessCode.java
    • ACCOUNT_TRANSACTIONS_FETCHED 및 CARD_TRANSACTIONS_FETCHED 성공 코드가 추가되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/repository/AssetTransactionQueryRepository.java
    • 은행 거래, 카드 승인 및 관련 가계부 항목을 QueryDSL 기반으로 조회하기 위한 새로운 리포지토리가 추가되었습니다.
  • src/main/java/org/umc/valuedi/domain/asset/service/query/AssetQueryService.java
    • 상세 거래내역을 가져오고 처리하기 위한 getAccountTransactions 및 getCardTransactions 메서드가 새로 구현되었습니다.
  • src/main/java/org/umc/valuedi/domain/ledger/service/command/LedgerSyncService.java
    • 카테고리 매칭 로직이 CategoryMatchingService로 위임되어 중복 메서드 및 @PostConstruct 초기화가 제거되었습니다.
  • src/main/java/org/umc/valuedi/domain/ledger/service/query/CategoryMatchingService.java
    • 카테고리 매칭 로직을 캡슐화하고 키워드 캐싱 및 카드 결제 식별 메서드를 포함하는 새로운 서비스가 추가되었습니다.
Activity
  • 새로운 API 엔드포인트 및 관련 서비스/리포지토리가 도입되었습니다.
  • 카테고리 매칭 로직이 전용 서비스로 크게 리팩토링되었습니다.
  • 성능 최적화를 위해 데이터베이스 인덱스가 추가되었습니다.
  • 새로운 API에 대한 Swagger 문서가 업데이트되었습니다.
  • 작성자가 API 테스트 결과를 스크린샷으로 제공했습니다.
  • 작성자가 체크리스트에서 API 테스트 및 빌드 성공을 완료로 표시했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@seamooll seamooll changed the title [FEATURE/#108] 카드/계좌별 세부 거래내역 조회 API 구현 [FEATURE/#109] 카드/계좌별 세부 거래내역 조회 API 구현 Feb 14, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 Pull Request는 계좌 및 카드별 상세 거래내역을 조회하는 신규 API를 구현합니다. 전반적으로 코드 구조가 잘 잡혀있고, 특히 카테고리 매칭 로직을 별도의 CategoryMatchingService로 분리하여 코드의 유지보수성과 관심사 분리를 개선한 점이 인상적입니다. 몇 가지 개선점을 제안드렸으며, 주로 파라미터 처리의 견고성과 데이터 조회 로직의 안정성에 관한 내용입니다. 자세한 내용은 각 파일의 주석을 참고해주세요.

@seamooll seamooll merged commit 9d49847 into main Feb 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat 기능 구현 도희 도희

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] 카드/계좌별 세부 거래내역 조회 API 구현

1 participant

Comments