fix: 更新WebSocket组ID格式,移除冗余下划线

This commit is contained in:
TsMask
2025-03-03 18:14:33 +08:00
parent 195f1f78bf
commit 523ec55fb6
4 changed files with 13 additions and 13 deletions

View File

@@ -88,14 +88,14 @@ func PostCDREventFrom(w http.ResponseWriter, r *http.Request) {
switch neInfo.NeType {
case "IMS":
if v, ok := body.CDR["recordType"]; ok && (v == "MOC" || v == "MTSM") {
wsService.NewWSSend.ByGroupID(wsService.GROUP_IMS_CDR+neInfo.NeId, data)
wsService.NewWSSend.ByGroupID(fmt.Sprintf("%s_%s", wsService.GROUP_IMS_CDR, neInfo.NeId), data)
}
case "SMF":
wsService.NewWSSend.ByGroupID(wsService.GROUP_SMF_CDR+neInfo.NeId, data)
wsService.NewWSSend.ByGroupID(fmt.Sprintf("%s_%s", wsService.GROUP_SMF_CDR, neInfo.NeId), data)
case "SMSC":
wsService.NewWSSend.ByGroupID(wsService.GROUP_SMSC_CDR+neInfo.NeId, data)
wsService.NewWSSend.ByGroupID(fmt.Sprintf("%s_%s", wsService.GROUP_SMSC_CDR, neInfo.NeId), data)
case "SGWC":
wsService.NewWSSend.ByGroupID(wsService.GROUP_SGWC_CDR+neInfo.NeId, data)
wsService.NewWSSend.ByGroupID(fmt.Sprintf("%s_%s", wsService.GROUP_SGWC_CDR, neInfo.NeId), data)
}
services.ResponseStatusOK204NoContent(w)