feat: 审计链路
Some checks failed
构建并部署前端到测试环境 / build-and-deploy (push) Failing after 18s

This commit is contained in:
luo
2026-08-07 18:38:28 +08:00
parent b8b2854aa6
commit 9f7f619083
7 changed files with 105 additions and 54 deletions

View File

@@ -8,6 +8,22 @@ interface AuditResourceRouteOptions {
businessIdentifier?: string | null
}
interface AuditReferenceOptions {
currentId?: string | null
fidelity?: boolean | null
}
/** 仅保留非空、可靠且不会回到当前目标的显式调查引用。 */
export function resolveInvestigationReference(
value?: string | null,
options: AuditReferenceOptions = {}
): string | null {
if (options.fidelity === false) return null
const normalizedValue = value?.trim()
if (!normalizedValue || normalizedValue === options.currentId?.trim()) return null
return normalizedValue
}
/** 根据当前主体选择平台内部 ID 或主体安全业务标识。 */
export function resolveAuditResourceTarget(
options: AuditResourceRouteOptions