3 Commits

Author SHA1 Message Date
zhangsz
4dfea691d1 chore: release 1.2508.1 2025-08-08 10:41:54 +08:00
zhangsz
758fa02f7f fix: ne ssh issu 2025-08-08 10:41:32 +08:00
zhangsz
4da891c883 fix: cb message issue 2025-08-08 10:41:03 +08:00
9 changed files with 26 additions and 23 deletions

View File

@@ -33,7 +33,5 @@ CREATE TABLE `ne_info` (
-- 初始网元数据
INSERT INTO `ne_info` VALUES (1, 'OMC', '001', '4400PSAPOMC001', 'PSAP门户管理中心', '172.16.5.100', 33030, 'PNF', '-', '-', '-', '-', '1,2', 0, '', '', 0, '', 0);
INSERT INTO `ne_info` VALUES (2, 'MF', '001', '4400PSAPMF0001', 'PSAP紧急呼叫中心', '172.16.5.110', 33030, 'PNF', '-', '-', '-', '-', '3,4', 0, '', '', 0, '', 0);
INSERT INTO `ne_info` VALUES (3, 'CBC', '001', '4400PSAPCBC001', 'PSAP小区广播中心', '172.16.5.120', 33030, 'PNF', '-', '-', '-', '-', '3,4', 0, '', '', 0, '', 0);
SET FOREIGN_KEY_CHECKS=1;

View File

@@ -27,9 +27,5 @@ CREATE TABLE `ne_license` (
-- 初始数据对应网元
INSERT INTO `ne_license` VALUES (1, 'OMC', '001', '', '', '', '', '0', '', 'supervisor', (UNIX_TIMESTAMP(NOW(3)) * 1000), '', 0);
INSERT INTO `ne_license` VALUES (2, 'CBC', '001', '', '', '', '', '0', '', 'supervisor', (UNIX_TIMESTAMP(NOW(3)) * 1000), '', 0);
INSERT INTO `ne_license` VALUES (3, 'MF', '001', '', '', '', '', '0', '', 'supervisor', (UNIX_TIMESTAMP(NOW(3)) * 1000), '', 0);
INSERT INTO `ne_license` VALUES (4, 'IMS', '001', '', '', '', '', '0', '', 'supervisor', (UNIX_TIMESTAMP(NOW(3)) * 1000), '', 0);
INSERT INTO `ne_license` VALUES (5, 'SMSC', '001', '', '', '', '', '0', '', 'supervisor', (UNIX_TIMESTAMP(NOW(3)) * 1000), '', 0);
SET FOREIGN_KEY_CHECKS=1;

View File

@@ -31,7 +31,5 @@ CREATE TABLE `ne_version` (
-- 初始数据对应网元
INSERT INTO `ne_version` VALUES (1, 'OMC', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0);
INSERT INTO `ne_version` VALUES (2, 'CBC', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0);
INSERT INTO `ne_version` VALUES (3, 'MF', '001', '', '', '', '', '', '', '', '', '', '0', 'supervisor', 1713928436957, '', 0);
SET FOREIGN_KEY_CHECKS=1;

View File

@@ -32,9 +32,5 @@ CREATE TABLE IF NOT EXISTS `ne_info` (
-- 初始网元数据
INSERT IGNORE INTO `ne_info` VALUES (1, 'OMC', '001', '4400PSAPOMC001', 'PSAP门户管理中心', '172.16.5.100', 33030, 'PNF', '-', '-', '-', '-', '1,2', 0, '', '', 0, '', 0);
INSERT IGNORE INTO `ne_info` VALUES (2, 'MF', '001', '4400PSAPMF0001', 'PSAP紧急呼叫中心', '172.16.5.110', 33030, 'PNF', '-', '-', '-', '-', '3,4', 0, '', '', 0, '', 0);
INSERT IGNORE INTO `ne_info` VALUES (3, 'CBC', '001', '4400PSAPCBC001', 'PSAP小区广播中心', '172.16.5.120', 33030, 'PNF', '-', '-', '-', '-', '3,4', 0, '', '', 0, '', 0);
INSERT IGNORE INTO `ne_info` VALUES (4, 'IMS', '001', '4400PSAPIMS001', 'PSAP彩铃中心', '172.16.5.130', 33030, 'PNF', '-', '-', '-', '-', '3,4', 0, '', '', 0, '', 0);
INSERT IGNORE INTO `ne_info` VALUES (5, 'SMSC', '001', '4400PSAPSMSC01', 'PSAP彩信中心', '172.16.5.140', 33030, 'PNF', '-', '-', '-', '-', '3,4', 0, '', '', 0, '', 0);
SET FOREIGN_KEY_CHECKS=1;

View File

@@ -200,12 +200,27 @@ func (s *CBMessageService) UpdateCBMessage(id int64, messageJson json.RawMessage
}
now := time.Now().UnixMicro()
if err := s.db.Table("cb_message").
Where("id = ?", id).
Updates(map[string]interface{}{
"message_json": messageJson,
"updated_at": now,
}).Error; err != nil {
err := s.db.Transaction(func(tx *gorm.DB) error {
// 在事务中更新
if err := tx.Table("cb_message").
Where("id = ?", id).
Updates(map[string]any{
"message_json": messageJson,
"updated_at": now,
}).Error; err != nil {
return fmt.Errorf("failed to update CBC message: %w", err)
}
// 在事务中查询更新后的记录
if err := tx.Table("cb_message").
Where("id = ?", id).
First(&msg).Error; err != nil {
return fmt.Errorf("failed to fetch updated CBC message: %w", err)
}
return nil
})
if err != nil {
return fmt.Errorf("failed to update CB message: %w", err)
}
@@ -488,7 +503,7 @@ func (s *CBMessageService) sendUpdateRequest(msg CBMessage) error {
return err
}
return client.PutMessage(msg.MessageJson)
return client.PostMessage(msg.MessageJson)
}
// 重构后的停用请求

View File

@@ -3,7 +3,7 @@
ProjectL = omc
ProjectU = OMC
PROJECT = $(ProjectL)
VERSION = 1.2507.1
VERSION = 1.2508.1
RelDate = `date +%Y%m%d`
Release = $(RelDate)
RelVer = $(VERSION)-$(RelDate)

View File

@@ -2,7 +2,7 @@
ProcList="restagent sshsvc"
ProjectL=omc
VERSION=1.2507.1
VERSION=1.2508.1
RelDate=`date +%Y%m%d`
Release=${RelDate}
RelVer=${VERSION}-${RelDate}

View File

@@ -1,7 +1,7 @@
# Makefile for rest agent project
PROJECT = OMC
VERSION = 1.2507.1
VERSION = 1.2508.1
PLATFORM = amd64
ARMPLATFORM = aarch64
BUILDDIR = ../../build

View File

@@ -1,7 +1,7 @@
# Makefile for OMC-OMC-crontask project
PROJECT = OMC
VERSION = 1.2507.1
VERSION = 1.2508.1
LIBDIR = be.ems/lib
BINNAME = sshsvc