fix: UE事件MME类型结果保持和AMF一致
This commit is contained in:
@@ -121,10 +121,12 @@ func (s *MMEController) UEExport(c *gin.Context) {
|
|||||||
"D1": "Result",
|
"D1": "Result",
|
||||||
"E1": "Time",
|
"E1": "Time",
|
||||||
}
|
}
|
||||||
// 读取字典数据 UE 事件类型MME
|
// 读取字典数据 UE 事件类型
|
||||||
dictUEEventMMEType := sysService.NewSysDictDataImpl.SelectDictDataByType("ue_event_mme_type")
|
dictUEEventType := sysService.NewSysDictDataImpl.SelectDictDataByType("ue_event_type")
|
||||||
// 读取字典数据 UE 事件结果MME
|
// 读取字典数据 UE 事件认证代码类型
|
||||||
dictUEEventMMEResult := sysService.NewSysDictDataImpl.SelectDictDataByType("ue_event_mme_result")
|
dictUEAauthCode := sysService.NewSysDictDataImpl.SelectDictDataByType("ue_auth_code")
|
||||||
|
// 读取字典数据 UE 事件CM状态
|
||||||
|
dictUEEventCmState := sysService.NewSysDictDataImpl.SelectDictDataByType("ue_event_cm_state")
|
||||||
// 从第二行开始的数据
|
// 从第二行开始的数据
|
||||||
dataCells := make([]map[string]any, 0)
|
dataCells := make([]map[string]any, 0)
|
||||||
for i, row := range rows {
|
for i, row := range rows {
|
||||||
@@ -144,7 +146,7 @@ func (s *MMEController) UEExport(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
// 取类型
|
// 取类型
|
||||||
eventType := row.EventType
|
eventType := row.EventType
|
||||||
for _, v := range dictUEEventMMEType {
|
for _, v := range dictUEEventType {
|
||||||
if row.EventType == v.DictValue {
|
if row.EventType == v.DictValue {
|
||||||
eventType = i18n.TKey(language, v.DictLabel)
|
eventType = i18n.TKey(language, v.DictLabel)
|
||||||
break
|
break
|
||||||
@@ -154,13 +156,23 @@ func (s *MMEController) UEExport(c *gin.Context) {
|
|||||||
eventResult := ""
|
eventResult := ""
|
||||||
if v, ok := eventJSON["result"]; ok && v != nil {
|
if v, ok := eventJSON["result"]; ok && v != nil {
|
||||||
eventResult = v.(string)
|
eventResult = v.(string)
|
||||||
for _, v := range dictUEEventMMEResult {
|
if row.EventType == "auth-result" {
|
||||||
|
for _, v := range dictUEAauthCode {
|
||||||
if eventResult == v.DictValue {
|
if eventResult == v.DictValue {
|
||||||
eventResult = i18n.TKey(language, v.DictLabel)
|
eventResult = i18n.TKey(language, v.DictLabel)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if row.EventType == "cm-state" {
|
||||||
|
for _, v := range dictUEEventCmState {
|
||||||
|
if eventResult == v.DictValue {
|
||||||
|
eventResult = i18n.TKey(language, v.DictLabel)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 取时间
|
// 取时间
|
||||||
timeStr := ""
|
timeStr := ""
|
||||||
if v, ok := eventJSON["timestamp"]; ok && v != nil {
|
if v, ok := eventJSON["timestamp"]; ok && v != nil {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ type UEEventMME struct {
|
|||||||
NeName string `json:"neName" gorm:"column:ne_name"`
|
NeName string `json:"neName" gorm:"column:ne_name"`
|
||||||
RmUID string `json:"rmUID" gorm:"column:rm_uid"` // 可能没有
|
RmUID string `json:"rmUID" gorm:"column:rm_uid"` // 可能没有
|
||||||
Timestamp int64 `json:"timestamp" gorm:"column:timestamp"`
|
Timestamp int64 `json:"timestamp" gorm:"column:timestamp"`
|
||||||
EventType string `json:"eventType" gorm:"column:event_type"` // 事件类型 ECM STATUS, EMM STATUS
|
EventType string `json:"eventType" gorm:"column:event_type"` // 事件类型 auth-result detach cm-state
|
||||||
EventJSONStr string `json:"eventJSON" gorm:"column:event_json"`
|
EventJSONStr string `json:"eventJSON" gorm:"column:event_json"`
|
||||||
CreatedAt time.Time `json:"createdAt" gorm:"column:created_at;default:CURRENT_TIMESTAMP"`
|
CreatedAt time.Time `json:"createdAt" gorm:"column:created_at;default:CURRENT_TIMESTAMP"`
|
||||||
}
|
}
|
||||||
@@ -19,7 +19,7 @@ type UEEventMMEQuery struct {
|
|||||||
NeType string `json:"neType" form:"neType" binding:"required"` // 网元类型, 暂时支持MME
|
NeType string `json:"neType" form:"neType" binding:"required"` // 网元类型, 暂时支持MME
|
||||||
NeID string `json:"neId" form:"neId" binding:"required"`
|
NeID string `json:"neId" form:"neId" binding:"required"`
|
||||||
RmUID string `json:"rmUID" form:"rmUID"`
|
RmUID string `json:"rmUID" form:"rmUID"`
|
||||||
EventType string `json:"eventType" form:"eventType"` // 事件类型 ECM STATUS, EMM STATUS
|
EventType string `json:"eventType" form:"eventType"` // 事件类型 auth-result detach cm-state
|
||||||
IMSI string `json:"imsi" form:"imsi"` // imsi
|
IMSI string `json:"imsi" form:"imsi"` // imsi
|
||||||
StartTime string `json:"startTime" form:"startTime"`
|
StartTime string `json:"startTime" form:"startTime"`
|
||||||
EndTime string `json:"endTime" form:"endTime"`
|
EndTime string `json:"endTime" form:"endTime"`
|
||||||
|
|||||||
Reference in New Issue
Block a user