feat: 网元直连修复查询data数据类型转换异常
This commit is contained in:
@@ -88,7 +88,13 @@ func IMSUeSessionList(neInfo model.NeInfo, data map[string]string) ([]map[string
|
||||
|
||||
// 固定返回字段,方便前端解析
|
||||
if v, ok := resData["data"]; ok && v != nil {
|
||||
return v.([]map[string]any), nil
|
||||
if arr := v.([]any); len(arr) > 0 {
|
||||
result := make([]map[string]any, len(arr))
|
||||
for i, item := range arr {
|
||||
result[i] = item.(map[string]any)
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
}
|
||||
return []map[string]any{}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user