- 在 `risk_suitability_log` 表中新增 `check_source` 枚举值 `platform`,支持代销平台的适当性检查。 - 更新相关 SQL 脚本以适应新的数据结构,确保数据一致性。 - 修改文档以反映 API 的最新状态和测试基线,确保文档与实现保持一致。 - 测试基线更新至 530 passed, 0 skipped,确保系统稳定性。 此更新为代销平台提供了更全面的适当性检查能力,提升了系统的功能性与可维护性。
44 lines
1.1 KiB
PowerShell
44 lines
1.1 KiB
PowerShell
#Requires -Version 5.1
|
|
<#
|
|
.SYNOPSIS
|
|
重置 jinrong_core 模拟库并同步到 agent / Neo4j
|
|
#>
|
|
param(
|
|
[string]$MysqlUser = "root",
|
|
[string]$MysqlHost = "127.0.0.1",
|
|
[switch]$SkipNeo4j
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$Root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
|
|
Set-Location $Root
|
|
|
|
function Invoke-SqlFile($path) {
|
|
Write-Host ">> $path"
|
|
python (Join-Path $Root "scripts/dev/run_sql_file.py") $path
|
|
}
|
|
|
|
Write-Host "=== Drop & recreate jinrong_core ==="
|
|
mysql -h $MysqlHost -u $MysqlUser -p -e "DROP DATABASE IF EXISTS jinrong_core;"
|
|
|
|
$files = @(
|
|
"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"
|
|
)
|
|
foreach ($f in $files) { Invoke-SqlFile (Join-Path $Root $f) }
|
|
|
|
Write-Host "=== Sync advisor rel ==="
|
|
python scripts/sync/sync_advisor_rel.py
|
|
|
|
if (-not $SkipNeo4j) {
|
|
Write-Host "=== Sync Neo4j ==="
|
|
python scripts/sync/sync_neo4j.py
|
|
}
|
|
|
|
Write-Host "Done."
|