feat: 자동인식 분류 학습 — 같은 메모 키워드는 과거 분류로 자동 채움

- 알림 자동등록 시 memo(가맹점) 키워드로 과거에 '확정'한 내역의 분류를
  찾아(가장 많이 쓴 분류) pending 내역에 미리 채운다.
- 메모 포함관계 매칭('스타벅스' ↔ '스타벅스 강남점'), 같은 type(수입/지출)만.
- 안전상 '확인 필요' 상태는 유지(분류만 선반영) — 무검토 오확정 방지.
- AccountEntryMapper.findLearnedCategory 추가.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ByungCheol
2026-06-12 22:22:54 +09:00
co-authored by Claude Opus 4.8
parent 120e042971
commit a0fc546ad8
3 changed files with 33 additions and 3 deletions
@@ -66,6 +66,11 @@ public interface AccountEntryMapper {
/** 미확인(확인 필요) 내역 개수 */
int countPending(@Param("memberId") Long memberId);
/** 자동인식 분류 학습: 같은 메모 키워드로 과거에 가장 많이 쓴 분류 1건(없으면 null) */
String findLearnedCategory(@Param("memberId") Long memberId,
@Param("type") String type,
@Param("memo") String memo);
/** 미확인 내역 확정 (pending=0, 분류/계좌 보정) */
int confirm(@Param("id") Long id, @Param("memberId") Long memberId,
@Param("category") String category, @Param("walletId") Long walletId);