ref: 多core表结构和代码调整修改

This commit is contained in:
TsMask
2025-06-10 17:50:54 +08:00
parent c7501a952d
commit cfe6ab61e3
189 changed files with 2159 additions and 3195 deletions

View File

@@ -83,13 +83,13 @@ func PostMML2ToNF(w http.ResponseWriter, r *http.Request) {
}
log.Debug("neType:", neType, "neId", neId)
neInfoArr := neService.NewNeInfo.Find(neModel.NeInfo{NeType: neType, NeId: neId}, false, true)
neInfoArr := neService.NewNeInfo.Find(neModel.NeInfo{NeType: neType, NeUID: neId}, false, true)
if len(neInfoArr) < 1 {
services.ResponseInternalServerError500DatabaseOperationFailed(w)
return
}
neInfo := neInfoArr[0]
if neInfo.NeId != neId || neInfo.IP == "" || len(neInfo.Hosts) < 2 {
if neInfo.NeUID != neId || neInfo.IPAddr == "" || len(neInfo.Hosts) < 2 {
services.ResponseWithJson(w, 200, map[string]any{
"code": 0,
"msg": "neInfo not found",
@@ -235,13 +235,13 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
return
}
neInfoArr := neService.NewNeInfo.Find(neModel.NeInfo{NeType: neType, NeId: neId}, false, true)
neInfoArr := neService.NewNeInfo.Find(neModel.NeInfo{NeType: neType, NeUID: neId}, false, true)
if len(neInfoArr) < 1 {
services.ResponseInternalServerError500DatabaseOperationFailed(w)
return
}
neInfo := neInfoArr[0]
if neInfo.NeId != neId || neInfo.IP == "" || len(neInfo.Hosts) < 2 {
if neInfo.NeUID != neId || neInfo.IPAddr == "" || len(neInfo.Hosts) < 2 {
services.ResponseWithJson(w, 200, map[string]any{
"code": 0,
"msg": "neInfo not found",
@@ -619,7 +619,7 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
// UDM 特殊命令处理
if neType == "UDM" && mml == "dec key" {
output, err := neService.NewNeInfo.NeRunSSHCmd(neInfo.NeType, neInfo.NeId, "cat /usr/local/etc/udm/ueKeyProfile.tmp")
output, err := neService.NewNeInfo.NeRunSSHCmd(neInfo.CoreUID, neInfo.NeUID, "cat /usr/local/etc/udm/ueKeyProfile.tmp")
if err != nil {
mmlResult = append(mmlResult, err.Error())
} else {
@@ -645,13 +645,13 @@ func PostMMLToOMC(w http.ResponseWriter, r *http.Request) {
}
log.Debug("neType:", neType, "neId", neId)
neInfoArr := neService.NewNeInfo.Find(neModel.NeInfo{NeType: neType, NeId: neId}, false, false)
neInfoArr := neService.NewNeInfo.Find(neModel.NeInfo{NeType: neType, NeUID: neId}, false, false)
if len(neInfoArr) < 1 {
services.ResponseInternalServerError500DatabaseOperationFailed(w)
return
}
neInfo := neInfoArr[0]
if neInfo.NeId != neId || neInfo.IP == "" {
if neInfo.NeUID != neId || neInfo.IPAddr == "" {
services.ResponseWithJson(w, 200, map[string]any{
"code": 0,
"msg": "neInfo not found",
@@ -667,7 +667,7 @@ func PostMMLToOMC(w http.ResponseWriter, r *http.Request) {
}
log.Trace("Body:", string(body))
hostUri := fmt.Sprintf("http://%s:%d", neInfo.IP, neInfo.Port)
hostUri := fmt.Sprintf("http://%s:%d", neInfo.IPAddr, neInfo.Port)
omcMmlVar := &mmlp.MmlVar{
Version: global.Version,
Output: mmlp.DefaultFormatType,