diff --git a/database/upgrade/upgrade.sql b/database/upgrade/upgrade.sql index 5b50ec25..d6065eab 100644 --- a/database/upgrade/upgrade.sql +++ b/database/upgrade/upgrade.sql @@ -12,4 +12,6 @@ MODIFY COLUMN `user_expiration` date NULL DEFAULT NULL AFTER `status`; ALTER TABLE `omc_db`.`config` ADD COLUMN IF NOT EXISTS `comment` varchar(255) NULL AFTER `update_time`; ALTER TABLE `omc_db`.`nbi_operation_log` -MODIFY COLUMN `created_at` datetime NULL DEFAULT NULL AFTER `log_time`; \ No newline at end of file +MODIFY COLUMN `created_at` datetime NULL DEFAULT NULL AFTER `log_time`; +ALTER TABLE `omc_db`.`permission` +ADD COLUMN IF NOT EXISTS `management` varchar(32) NULL DEFAULT '*' AFTER `method`; \ No newline at end of file diff --git a/features/fm/alarm.go b/features/fm/alarm.go index db3edf8c..89b630ae 100644 --- a/features/fm/alarm.go +++ b/features/fm/alarm.go @@ -341,8 +341,8 @@ func PostAlarmFromNF(w http.ResponseWriter, r *http.Request) { var currentSeq string has, err = xEngine.Table("alarm"). Where("ne_type=? and ne_id=?", alarmData.NeType, alarmData.NeId). - //Desc("alarm_seq"). - Desc("event_time"). + Desc("alarm_seq"). + //Desc("event_time"). Cols("alarm_seq"). Limit(1). Get(¤tSeq) @@ -575,6 +575,7 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) { // for alarm forward time format alarmData.EventTime = eventTime } else { + activeAlarmNum++ has, err := xEngine.Table("alarm"). Where("alarm_id=? and ne_type=? and ne_id=? and alarm_status=1", alarmData.AlarmId, alarmData.NeType, alarmData.NeId). @@ -587,8 +588,8 @@ func GetAlarmFromNF(w http.ResponseWriter, r *http.Request) { var currentSeq string has, err = xEngine.Table("alarm"). Where("ne_type=? and ne_id=?", alarmData.NeType, alarmData.NeId). - //Desc("alarm_seq"). - Desc("event_time"). + Desc("alarm_seq"). + //Desc("event_time"). Cols("alarm_seq"). Limit(1). Get(¤tSeq) diff --git a/restagent/config/config.go b/restagent/config/config.go index 03f04321..0e1cb4e0 100644 --- a/restagent/config/config.go +++ b/restagent/config/config.go @@ -292,8 +292,8 @@ const defaultConfigFile = "./etc/restconf.yaml" func init() { cfile := flag.String("c", defaultConfigFile, "config file") - pv := flag.Bool("v", false, "print version") - ph := flag.Bool("h", false, "print help") + pv := flag.Bool("version", false, "print version") + ph := flag.Bool("help", false, "print help") global.BuildTime = "Wed May 31 18:24:04 CST 2023" global.GoVer = "go version go1.15.7 linux/arm64" diff --git a/tools/casign/ca_cert - 副本.pem b/tools/casign/ca.cer similarity index 100% rename from tools/casign/ca_cert - 副本.pem rename to tools/casign/ca.cer diff --git a/tools/casign/public.cer b/tools/casign/public.cer new file mode 100644 index 00000000..a85d9e48 --- /dev/null +++ b/tools/casign/public.cer @@ -0,0 +1,8 @@ +-----BEGIN RSA PUBLIC KEY----- +MIIBCgKCAQEAlE3BYk9Rk2avUTik7lpuiHxbYTusrLYRCnr8JICRg0QsBfiuq8d4 ++4s0w3y5F7puTj23Hf8ohAeNGK6vV9nJF9utMRvT4w5hlGqvKubM2vORoNoa1usI +ixfcvMmCt/7++9endMurLY7e9aR+eeEffJtMx5G5JqxRGoFkeXBKFTOjD2adsHQ5 +zhQQUYgdQa2xzKQBYiierKKptcoVMAnnkfx7NPSRfCnzhYVeKgBFbxNXL4h7nAhL +ywWhusQc2yr2Fdojj7urtqPNfMKYapkmWKI9/zuPxMlYL49VXUqppE0rnYoiISwG +vP9iSq1tb+8BUI0ZMDcHX4elEeZYiFMJOwIDAQAB +-----END RSA PUBLIC KEY-----