style: 去除Impl接口声明层聚焦服务函数
This commit is contained in:
@@ -56,7 +56,7 @@ func PostCDREventFrom(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 发送到匹配的网元
|
||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByRmuid(cdrEvent.RmUID)
|
||||
neInfo := neService.NewNeInfo.SelectNeInfoByRmuid(cdrEvent.RmUID)
|
||||
if neInfo.RmUID == cdrEvent.RmUID {
|
||||
// 推送到ws订阅组
|
||||
switch neInfo.NeType {
|
||||
|
||||
@@ -157,7 +157,7 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
mapRow := make(map[string]interface{})
|
||||
row := map[string]interface{}{"affectedRows": affected}
|
||||
@@ -208,7 +208,7 @@ func PostNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
services.ResponseStatusOK204NoContent(w)
|
||||
return
|
||||
@@ -267,7 +267,7 @@ func PutNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
mapRow := make(map[string]interface{})
|
||||
row := map[string]interface{}{"affectedRows": affected}
|
||||
@@ -319,7 +319,7 @@ func PutNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
services.ResponseStatusOK204NoContent(w)
|
||||
return
|
||||
@@ -381,7 +381,7 @@ func DeleteNeInfo(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 刷新缓存,不存在结构体网元Id空字符串
|
||||
neService.NewNeInfoImpl.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
neService.NewNeInfo.RefreshByNeTypeAndNeID(neInfo.NeType, neInfo.NeId)
|
||||
|
||||
mapRow := make(map[string]interface{})
|
||||
row := map[string]interface{}{"affectedRows": affected}
|
||||
|
||||
@@ -39,7 +39,7 @@ func GetParamConfigFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
neInfo := neService.NewNeInfo.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
|
||||
var response services.DataResponse
|
||||
if neInfo.NeId == neId && neInfo.NeId != "" {
|
||||
@@ -76,7 +76,7 @@ func PostParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
neInfo := neService.NewNeInfo.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
|
||||
if neInfo.NeId != neId || neInfo.NeId == "" {
|
||||
log.Error("neId is empty")
|
||||
@@ -128,7 +128,7 @@ func PutParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
neId := ctx.GetQuery(r, "ne_id")
|
||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
neInfo := neService.NewNeInfo.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
|
||||
if neInfo.NeId != neId || neInfo.NeId == "" {
|
||||
log.Error("neId is empty")
|
||||
@@ -181,7 +181,7 @@ func DeleteParamConfigToNF(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
neId := ctx.GetQuery(r, "ne_id")
|
||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
neInfo := neService.NewNeInfo.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
|
||||
if neInfo.NeId != neId || neInfo.NeId == "" {
|
||||
log.Error("neId is empty")
|
||||
|
||||
@@ -99,7 +99,7 @@ func PostUEEvent(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 发送到匹配的网元
|
||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByRmuid(ueEvent.RmUID)
|
||||
neInfo := neService.NewNeInfo.SelectNeInfoByRmuid(ueEvent.RmUID)
|
||||
if neInfo.RmUID == ueEvent.RmUID {
|
||||
// 推送到ws订阅组
|
||||
if ueEvent.NeType == "MME" {
|
||||
|
||||
@@ -83,7 +83,7 @@ func PostMML2ToNF(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
log.Debug("neType:", neType, "neId", neId)
|
||||
|
||||
neInfoArr := neService.NewNeInfoImpl.SelectList(neModel.NeInfo{NeType: neType, NeId: neId}, false, true)
|
||||
neInfoArr := neService.NewNeInfo.SelectList(neModel.NeInfo{NeType: neType, NeId: neId}, false, true)
|
||||
if len(neInfoArr) < 1 {
|
||||
services.ResponseInternalServerError500DatabaseOperationFailed(w)
|
||||
return
|
||||
@@ -235,7 +235,7 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
neInfoArr := neService.NewNeInfoImpl.SelectList(neModel.NeInfo{NeType: neType, NeId: neId}, false, true)
|
||||
neInfoArr := neService.NewNeInfo.SelectList(neModel.NeInfo{NeType: neType, NeId: neId}, false, true)
|
||||
if len(neInfoArr) < 1 {
|
||||
services.ResponseInternalServerError500DatabaseOperationFailed(w)
|
||||
return
|
||||
@@ -635,7 +635,7 @@ func PostMMLToOMC(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
log.Debug("neType:", neType, "neId", neId)
|
||||
|
||||
neInfoArr := neService.NewNeInfoImpl.SelectList(neModel.NeInfo{NeType: neType, NeId: neId}, false, false)
|
||||
neInfoArr := neService.NewNeInfo.SelectList(neModel.NeInfo{NeType: neType, NeId: neId}, false, false)
|
||||
if len(neInfoArr) < 1 {
|
||||
services.ResponseInternalServerError500DatabaseOperationFailed(w)
|
||||
return
|
||||
|
||||
@@ -288,7 +288,7 @@ func PostKPIReportFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 发送到匹配的网元
|
||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByRmuid(kpiData.RmUid)
|
||||
neInfo := neService.NewNeInfo.SelectNeInfoByRmuid(kpiData.RmUid)
|
||||
// custom kpi report to FE
|
||||
kpiCEvent := map[string]any{
|
||||
// kip_id ...
|
||||
|
||||
@@ -253,7 +253,7 @@ func GetUEInfoFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
neInfo := neService.NewNeInfo.SelectNeInfoByNeTypeAndNeID(neType, neId)
|
||||
|
||||
var response services.MapResponse
|
||||
if neInfo.NeId == neId && neInfo.NeId != "" {
|
||||
|
||||
Reference in New Issue
Block a user