fix: bugs-01
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
"""Transaction deduplication and matching engine.
|
||||
|
||||
Multi-layer strategy:
|
||||
1. Exact order_no match
|
||||
2. Amount + time-window + account-tail match
|
||||
3. Fuzzy text similarity (placeholder for LLM-assisted matching)
|
||||
Strategy:
|
||||
1. Deduplicate only by exact order_no match
|
||||
2. Mark transit (self-transfer) records for exclusion from fraud totals
|
||||
|
||||
Note:
|
||||
Highly similar records (same amount/time/counterparty) are preserved so they
|
||||
can be reviewed by officers in the assessment review stage.
|
||||
"""
|
||||
from uuid import UUID
|
||||
from datetime import timedelta
|
||||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.models.transaction import TransactionRecord
|
||||
|
||||
Reference in New Issue
Block a user