- Introduced `battery_report.json` for local data analysis, excluding it from the database. - Enhanced `AGENTS.md` to reflect updated test baseline with 795 passed tests. - Added new metrics for trade flow in `dict_service.py`, improving transaction data analysis. - Updated regex patterns in `guardrail.py` to better handle numeric extraction and prevent misinterpretation of tokens. - Expanded course modules with new content on FR-8/9/10 capabilities and L3 role management. - Improved concurrency handling in transaction processing to ensure accurate alert generation. This update enhances data analysis capabilities and improves the overall structure and clarity of course materials.
63 lines
2.0 KiB
PowerShell
63 lines
2.0 KiB
PowerShell
#Requires -Version 5.1
|
|
<#
|
|
.SYNOPSIS
|
|
风控演示一键灌库(对齐 演示SOP-风控模块.md §2 脚本化方式)
|
|
|
|
.DESCRIPTION
|
|
双库 DROP → Core 种子 → Agent 共用底座 + 专用表 → AML 名单 → 风控演示测评 → 顾问归属同步。
|
|
reset.ps1 只重建 jinrong_core;本脚本覆盖走查所需的 agent 侧数据。
|
|
|
|
.EXAMPLE
|
|
.\scripts\demo\prepare_all.ps1
|
|
.\scripts\demo\prepare_all.ps1 -MysqlHost 127.0.0.1 -SkipAdvisorSync
|
|
#>
|
|
param(
|
|
[string]$MysqlUser = "root",
|
|
[string]$MysqlHost = "127.0.0.1",
|
|
[switch]$SkipAdvisorSync
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$Root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
|
|
Set-Location $Root
|
|
|
|
function Invoke-SqlFile($path) {
|
|
$full = Join-Path $Root $path
|
|
if (-not (Test-Path $full)) {
|
|
throw "SQL file not found: $full"
|
|
}
|
|
Write-Host ">> $path"
|
|
python (Join-Path $Root "scripts/dev/run_sql_file.py") $full
|
|
}
|
|
|
|
Write-Host "=== Drop jinrong_core + jinrong_agent ==="
|
|
mysql -h $MysqlHost -u $MysqlUser -p -e "DROP DATABASE IF EXISTS jinrong_core; DROP DATABASE IF EXISTS jinrong_agent;"
|
|
|
|
$sqlFiles = @(
|
|
"scripts/core/00-create-database.sql",
|
|
"scripts/core/01-ddl.sql",
|
|
"scripts/core/02-seed-base.sql",
|
|
"scripts/core/03-seed-customers.sql",
|
|
"scripts/core/04-seed-holdings.sql",
|
|
"scripts/core/05-seed-trades.sql",
|
|
"scripts/core/06-seed-nav.sql",
|
|
"docs/项目框架设计/表设计/01-mysql-共用底座.sql",
|
|
"docs/项目框架设计/表设计/02-mysql-agent专用.sql",
|
|
"scripts/agent/seed-aml-list.sql",
|
|
"scripts/demo/prepare_risk_demo.sql"
|
|
)
|
|
|
|
foreach ($f in $sqlFiles) {
|
|
Invoke-SqlFile $f
|
|
}
|
|
|
|
if (-not $SkipAdvisorSync) {
|
|
Write-Host "=== Sync advisor rel ==="
|
|
python (Join-Path $Root "scripts/sync/sync_advisor_rel.py")
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "=== prepare_all 完成 ==="
|
|
Write-Host "预期:AML 名单 8 条 · prepare_risk_demo 测评就位 · sync_advisor_rel upsert 行数输出"
|
|
Write-Host "下一步:uvicorn app.main:app --reload · 走查见 docs/项目框架设计/演示SOP-风控模块.md"
|