f
This commit is contained in:
@@ -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{} {
|
||||
|
||||
Reference in New Issue
Block a user