feat:风控Agent(规则引擎+前置拦截+人工处置+工单闭环)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
"""单号生成:前缀 + 日期 + 随机序列(唯一性由 DB 唯一键兜底)。"""
|
||||
from __future__ import annotations
|
||||
|
||||
import secrets
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
def gen_order_no(prefix: str = "PO") -> str:
|
||||
"""生成全局唯一单号,如 PO20260912A1B2C3D4。
|
||||
|
||||
- PO:交易申请单(trade_order.order_no)
|
||||
- TR:成交流水(fin_transaction.transaction_no)
|
||||
- WO:业务工单(biz_work_order.work_order_no)
|
||||
"""
|
||||
return f"{prefix}{datetime.now():%Y%m%d}{secrets.token_hex(4).upper()}"
|
||||
Reference in New Issue
Block a user