This commit is contained in:
2026-07-08 21:56:39 +08:00
parent 9f985ea8c7
commit 9c933cd032
5 changed files with 199 additions and 17 deletions

View File

@@ -44,6 +44,18 @@ var riskCodeBitLevelMappings = map[int]string{
24: "E", // 5年前 SJTLAJ
}
// LevelFromPayload 从 FLXGDEA9 处理器输出或 nuoer 原始 payload 提取 level 字符串。
func LevelFromPayload(data map[string]interface{}) string {
if data == nil {
return "0"
}
result := mapNuoerIdRiskToResponse(data)
if level, ok := result["level"].(string); ok {
return level
}
return "0"
}
// mapNuoerIdRiskToResponse 将 nuoer 响应2json.md转为对外结构1json.md
// 解包 result将 riskCode 转为 level。
func mapNuoerIdRiskToResponse(data map[string]interface{}) map[string]interface{} {