fix: AMF事件导出字段提取错误导致原因和时间缺少
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"be.ems/src/framework/i18n"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/ctx"
|
||||
"be.ems/src/framework/utils/date"
|
||||
"be.ems/src/framework/utils/file"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/framework/vo/result"
|
||||
@@ -224,6 +225,32 @@ func (s *AMFController) UEExport(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if timeStr == "" {
|
||||
if v, ok := eventJSON["timestamp"]; ok && v != nil {
|
||||
rowTime := parse.Number(v) * 1000
|
||||
timeStr = date.ParseDateToStr(rowTime, date.YYYY_MM_DD_HH_MM_SS_GMT_TZ)
|
||||
}
|
||||
}
|
||||
if eventResult == "" {
|
||||
if v, ok := eventJSON["result"]; ok && v != nil {
|
||||
eventResult = v.(string)
|
||||
if row.EventType == "cm-state" {
|
||||
for _, v := range dictUEEventCmState {
|
||||
if eventResult == v.DictValue {
|
||||
eventResult = i18n.TKey(language, v.DictLabel)
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for _, v := range dictUEAauthCode {
|
||||
if eventResult == v.DictValue {
|
||||
eventResult = i18n.TKey(language, v.DictLabel)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// for multi-tenancy, get tenant name
|
||||
tenantName := row.TenantName
|
||||
|
||||
|
||||
Reference in New Issue
Block a user