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
|
||||
|
||||
@@ -273,6 +273,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
|
||||
@@ -312,6 +313,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, // 基站名称 网元标记
|
||||
|
||||
@@ -43,6 +43,7 @@ func (s *NBState) Resolve(n oam.NBState) error {
|
||||
Name: n.Name,
|
||||
Position: n.Position,
|
||||
NbName: n.DeviceName,
|
||||
NbId: n.DeviceId,
|
||||
State: n.State,
|
||||
Time: date.ParseDateToStr(n.StateTime, time.RFC3339),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user