ref: 多core表结构和代码调整修改
This commit is contained in:
@@ -80,8 +80,8 @@ func PostUEEventFromAMF(c *gin.Context) {
|
||||
}
|
||||
|
||||
// 是否存在网元
|
||||
neInfo := neService.NewNeInfo.FindByRmuid(data.RmUID)
|
||||
if neInfo.NeType != "AMF" || neInfo.RmUID != data.RmUID {
|
||||
neInfo := neService.NewNeInfo.FindByCoreUidAndNeUid("*", data.RmUID)
|
||||
if neInfo.NeType != "AMF" || neInfo.NeUID != data.RmUID {
|
||||
services.ResponseInternalServerError500ProcessError(c.Writer, fmt.Errorf("network element does not exist"))
|
||||
return
|
||||
}
|
||||
@@ -165,7 +165,7 @@ func PostUEEventFromAMF(c *gin.Context) {
|
||||
// 推送到ws订阅组
|
||||
if data.NeType == "AMF" {
|
||||
wsService.NewWSSend.ByGroupID(wsService.GROUP_AMF_UE, data)
|
||||
wsService.NewWSSend.ByGroupID(wsService.GROUP_AMF_UE+"_"+neInfo.NeId, data)
|
||||
wsService.NewWSSend.ByGroupID(fmt.Sprintf("%s_%s_%s", wsService.GROUP_AMF_UE, neInfo.CoreUID, neInfo.NeUID), data)
|
||||
}
|
||||
|
||||
services.ResponseStatusOK204NoContent(c.Writer)
|
||||
@@ -195,8 +195,8 @@ func PostUEEvent(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 是否存在网元
|
||||
neInfo := neService.NewNeInfo.FindByRmuid(body.RmUID)
|
||||
if neInfo.NeType != body.NeType || neInfo.RmUID != body.RmUID {
|
||||
neInfo := neService.NewNeInfo.FindByCoreUidAndNeUid("*", body.RmUID)
|
||||
if neInfo.NeType != body.NeType || neInfo.NeUID != body.RmUID {
|
||||
services.ResponseInternalServerError500ProcessError(w, fmt.Errorf("network element does not exist"))
|
||||
return
|
||||
}
|
||||
@@ -237,11 +237,11 @@ func PostUEEvent(w http.ResponseWriter, r *http.Request) {
|
||||
// 推送到ws订阅组
|
||||
if body.NeType == "MME" {
|
||||
wsService.NewWSSend.ByGroupID(wsService.GROUP_MME_UE, data)
|
||||
wsService.NewWSSend.ByGroupID(wsService.GROUP_MME_UE+"_"+neInfo.NeId, data)
|
||||
wsService.NewWSSend.ByGroupID(fmt.Sprintf("%s_%s_%s", wsService.GROUP_MME_UE, neInfo.CoreUID, neInfo.NeUID), data)
|
||||
}
|
||||
if body.NeType == "AMF" {
|
||||
wsService.NewWSSend.ByGroupID(wsService.GROUP_AMF_UE, data)
|
||||
wsService.NewWSSend.ByGroupID(wsService.GROUP_AMF_UE+"_"+neInfo.NeId, data)
|
||||
wsService.NewWSSend.ByGroupID(fmt.Sprintf("%s_%s_%s", wsService.GROUP_AMF_UE, neInfo.CoreUID, neInfo.NeUID), data)
|
||||
}
|
||||
|
||||
services.ResponseStatusOK204NoContent(w)
|
||||
|
||||
Reference in New Issue
Block a user