feat: 基站状态补充randId字段信息
This commit is contained in:
@@ -9,6 +9,7 @@ type NBState struct {
|
||||
CreateTime int64 `json:"createTime" gorm:"column:create_time"` // 创建时间
|
||||
Address string `json:"address" gorm:"column:address"` // 基站IP地址
|
||||
NbName string `json:"nbName" gorm:"column:nb_name"` // 基站设备名称
|
||||
NbId int64 `json:"nbId" gorm:"column:nb_id"` // 基站设备ID
|
||||
Name string `json:"name" gorm:"column:name"` // 基站名称
|
||||
Position string `json:"position" gorm:"column:position"` // 基站位置
|
||||
State string `json:"state" gorm:"column:state"` // 基站状态 OFF ON
|
||||
|
||||
@@ -80,6 +80,7 @@ func AMFGnbStateList(neInfo model.NeInfo) ([]map[string]any, error) {
|
||||
// "onTime": "2024-12-30T15:41:59+08:00",
|
||||
// "state": "OFF",
|
||||
// "nbName": "SA",
|
||||
// "ranId": 217,
|
||||
// "ueNum": 1
|
||||
// },
|
||||
// ]
|
||||
|
||||
@@ -274,6 +274,7 @@ func (s APIRestController) ResolveNBState(c *gin.Context) {
|
||||
Name string `json:"name" `
|
||||
Position string `json:"position" `
|
||||
NbName string `json:"nbName" `
|
||||
RanId int64 `json:"ranId" `
|
||||
State string `json:"state" ` // "OFF" or "ON"
|
||||
OffTime string `json:"offTime" ` //if State=OFF, will set it
|
||||
OnTime string `json:"onTime" ` //if State=ON , will set it
|
||||
@@ -313,6 +314,7 @@ func (s APIRestController) ResolveNBState(c *gin.Context) {
|
||||
RecordTime: time.Now().UnixMilli(), // 记录时间 时间戳毫秒,Push时自动填充
|
||||
Address: v.Address, // 基站地址
|
||||
DeviceName: v.NbName, // 基站设备名称
|
||||
DeviceId: v.RanId, // 基站设备ID
|
||||
State: stateStr, // 基站状态 ON/OFF
|
||||
StateTime: stateTime.UnixMilli(), // 基站状态时间 时间戳毫秒
|
||||
Name: v.Name, // 基站名称 网元标记
|
||||
|
||||
@@ -40,9 +40,10 @@ func (s *NBState) Resolve(n oam.NBState) error {
|
||||
NeId: neInfo.NeId,
|
||||
RmUid: neInfo.RmUID,
|
||||
Address: n.Address,
|
||||
NbName: n.DeviceName,
|
||||
NbId: n.DeviceId,
|
||||
Name: n.Name,
|
||||
Position: n.Position,
|
||||
NbName: n.DeviceName,
|
||||
State: n.State,
|
||||
Time: date.ParseDateToStr(n.StateTime, time.RFC3339),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user