docs: 风控模块 PRD v1.0/规则附表/架构 v1.1/开发计划 v1.1 + 文档联动修正
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
-- =============================================================================
|
||||
-- AML 名单种子(jinrong_agent 库 · 需先执行 docs/项目框架设计/表设计/01-mysql-共用底座.sql
|
||||
-- 与 02-mysql-agent专用.sql 建 risk_aml_list 表)
|
||||
-- 依据:docs/PRD/PRD-风控监测Agent.md FR-5
|
||||
-- 说明:full_name 与 core_customer.display_name 同为脱敏展示名口径;
|
||||
-- AML-0001 故意与种子客户 CUST-1002 的展示名「客户·赵**」一致(演示命中,PRD A-5 用例;
|
||||
-- CUST-1002 测评已被 scripts/demo/prepare_risk_demo.sql 刷新,交易可成功走通 AML 链路)。
|
||||
-- =============================================================================
|
||||
|
||||
USE jinrong_agent;
|
||||
|
||||
INSERT INTO risk_aml_list
|
||||
(list_id, list_type, full_name, id_no, bank_card_no, match_threshold, source, list_version, effective_date) VALUES
|
||||
('AML-0001', 'sanction', '客户·赵**', NULL, NULL, 0.85, '外部名单镜像(模拟)', 'V2026.09', '2026-01-01'),
|
||||
('AML-0002', 'terror', '客户·测试命中**', NULL, NULL, 0.85, '外部名单镜像(模拟)', 'V2026.09', '2026-01-01'),
|
||||
('AML-0003', 'sanction', '客户·李**', NULL, NULL, 0.85, '外部名单镜像(模拟)', 'V2026.09', '2026-01-01'),
|
||||
('AML-0004', 'pep', '客户·王**', NULL, NULL, 0.85, '外部名单镜像(模拟)', 'V2026.09', '2026-01-01'),
|
||||
('AML-0005', 'sanction', '张某某', NULL, NULL, 0.85, '外部名单镜像(模拟)', 'V2026.09', '2026-01-01'),
|
||||
('AML-0006', 'terror', '客户·陈**', NULL, NULL, 0.85, '外部名单镜像(模拟)', 'V2026.09', '2026-01-01'),
|
||||
('AML-0007', 'pep', '客户·刘**', NULL, NULL, 0.85, '外部名单镜像(模拟)', 'V2026.09', '2026-01-01'),
|
||||
('AML-0008', 'sanction', '客户·周**', NULL, NULL, 0.85, '外部名单镜像(模拟)', 'V2026.09', '2026-01-01');
|
||||
|
||||
-- 校验
|
||||
SELECT list_id, list_type, full_name, is_active FROM risk_aml_list;
|
||||
@@ -44,6 +44,10 @@ INSERT INTO core_staff (staff_id, display_name, staff_type, roles) VALUES
|
||||
('STAFF-30001', '吴风控', 'risk_officer', '["risk_officer"]'),
|
||||
('STAFF-30002', '郑监测', 'risk_officer', '["risk_officer"]');
|
||||
|
||||
-- 1 风控演示账号(网关演示用,roles 含 risk_demo · 见 docs/PRD/PRD-风控监测Agent.md §10.1)
|
||||
INSERT INTO core_staff (staff_id, display_name, staff_type, roles) VALUES
|
||||
('STAFF-90001', '风控演示账号', 'risk_officer', '["risk_officer", "risk_demo"]');
|
||||
|
||||
-- 2 合规专员(兼 advisor 审计台场景用 compliance 单角色)
|
||||
INSERT INTO core_staff (staff_id, display_name, staff_type, roles) VALUES
|
||||
('STAFF-40001', '孙合规', 'compliance', '["compliance"]'),
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
-- =============================================================================
|
||||
-- 风控演示数据准备(PRD §10.2 · 每次 reset.ps1 重建全库后需重跑)
|
||||
-- 用途:刷新演示客户的风险测评日期,否则 SUIT-008(测评有效期 365 天)
|
||||
-- 会阻断所有演示交易;CUST-1004 保留过期,用于演示 SUIT-008 阻断路径。
|
||||
-- 依赖:scripts/core/reset.ps1 已执行(jinrong_core 已建库灌种子)
|
||||
-- 验收对照:docs/PRD/PRD-风控监测Agent.md §8 A-1~A-5
|
||||
-- =============================================================================
|
||||
|
||||
USE jinrong_core;
|
||||
|
||||
-- A-1 CUST-1001(C1) / A-2 CUST-4001(70岁C5) / A-3 CUST-3001(C3) / 其余为通用演示客户
|
||||
UPDATE core_customer_risk SET evaluated_at = CURDATE() - INTERVAL 90 DAY
|
||||
WHERE customer_id IN ('CUST-1001','CUST-1002','CUST-1003','CUST-3001','CUST-4001','CUST-9527');
|
||||
|
||||
-- 校验(执行后应看到 6 行 evaluated_at 为 90 天前;CUST-1004 保持 2025-01-10 过期)
|
||||
SELECT customer_id, risk_code, evaluated_at,
|
||||
DATEDIFF(CURDATE(), evaluated_at) AS days_since_eval
|
||||
FROM core_customer_risk
|
||||
WHERE customer_id IN ('CUST-1001','CUST-1002','CUST-1003','CUST-3001','CUST-4001','CUST-9527','CUST-1004')
|
||||
ORDER BY customer_id;
|
||||
Reference in New Issue
Block a user