fix: 基站状态记录上报移除在线用户数字段

This commit is contained in:
TsMask
2025-02-08 19:42:21 +08:00
parent a10c09bec8
commit 2155d98754
5 changed files with 4 additions and 11 deletions

View File

@@ -13,7 +13,6 @@ CREATE TABLE `nb_state` (
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '基站名称',
`position` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '基站位置',
`nb_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '-' COMMENT '基站设备名称',
`ue_num` int DEFAULT '0' COMMENT '在线用户数',
`state` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'OFF' COMMENT '基站状态 OFF ON',
`time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '-' COMMENT '状态时间',
PRIMARY KEY (`id`) USING BTREE,

View File

@@ -12,7 +12,6 @@ CREATE TABLE IF NOT EXISTS `nb_state` (
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '基站名称',
`position` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '基站位置',
`nb_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '-' COMMENT '基站设备名称',
`ue_num` int DEFAULT '0' COMMENT '在线用户数',
`state` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT 'OFF' COMMENT '基站状态 OFF ON',
`time` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '-' COMMENT '状态时间',
PRIMARY KEY (`id`) USING BTREE,

View File

@@ -635,7 +635,6 @@ func PostNBInfoFromNF(w http.ResponseWriter, r *http.Request) {
Name string `json:"name" `
Position string `json:"position" `
NbName string `json:"nbName" `
UENum int64 `json:"ueNum" `
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
@@ -680,7 +679,6 @@ func PostNBInfoFromNF(w http.ResponseWriter, r *http.Request) {
Name: v.Name,
Position: v.Position,
NbName: v.NbName,
UeNum: v.UENum,
State: v.State,
Time: timeStr,
})

View File

@@ -9,7 +9,6 @@ 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"` // 基站设备名称
UeNum int64 `json:"ueNum" gorm:"column:ue_num"` // 在线用户数
Name string `json:"name" gorm:"column:name"` // 基站名称
Position string `json:"position" gorm:"column:position"` // 基站位置
State string `json:"state" gorm:"column:state"` // 基站状态 OFF ON

View File

@@ -55,9 +55,8 @@ func (r NBState) ExportXlsx(rows []model.NBState, fileName, language string) (st
"C1": i18n.TKey(language, "nbState.export.position"),
"D1": i18n.TKey(language, "nbState.export.address"),
"E1": i18n.TKey(language, "nbState.export.nbName"),
"F1": i18n.TKey(language, "nbState.export.ueNum"),
"G1": i18n.TKey(language, "nbState.export.state"),
"H1": i18n.TKey(language, "nbState.export.time"),
"F1": i18n.TKey(language, "nbState.export.state"),
"G1": i18n.TKey(language, "nbState.export.time"),
}
// 从第二行开始的数据
@@ -75,9 +74,8 @@ func (r NBState) ExportXlsx(rows []model.NBState, fileName, language string) (st
"C" + idx: row.Position,
"D" + idx: row.Address,
"E" + idx: row.NbName,
"F" + idx: row.UeNum,
"G" + idx: statusValue,
"H" + idx: row.Time,
"F" + idx: statusValue,
"G" + idx: row.Time,
})
}