diff --git a/.vscode/launch.json b/.vscode/launch.json index e06e37e0..5402fdd4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -45,6 +45,15 @@ "mode": "debug", "program": "d:/local.git/ems.agt/crontask", "console": "integratedTerminal" - } + }, + { + "name": "debug encyaml", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "d:/local.git/ems.agt/tools/encode", + //"args": ["-p","../../config/param/smf_param_config.yaml"], + "console": "integratedTerminal" + } ] } \ No newline at end of file diff --git a/database/upgrade/zupgrade.sql b/database/upgrade/zupgrade.sql index a00c35f8..0511b883 100644 --- a/database/upgrade/zupgrade.sql +++ b/database/upgrade/zupgrade.sql @@ -145,8 +145,11 @@ ALTER TABLE `omc_db`.`sys_dict_data` MODIFY COLUMN `dict_code` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '字典编码' FIRST; ALTER TABLE `omc_db`.`gold_kpi` -ADD COLUMN IF NOT EXISTS `granularity` tinyint NOT NULL DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `index`; +ADD COLUMN IF NOT EXISTS `granularity` tinyint DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `index`; ALTER TABLE `omc_db`.`ne_info` DROP PRIMARY KEY, -ADD PRIMARY KEY (`id`) USING BTREE; \ No newline at end of file +ADD PRIMARY KEY (`id`) USING BTREE; + +ALTER TABLE `omc_db`.`gold_kpi` +MODIFY COLUMN `granularity` tinyint(4) NULL DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `date`; \ No newline at end of file diff --git a/database/upgvue3/zupgrade.sql b/database/upgvue3/zupgrade.sql index 09617ede..0f8f4c9d 100644 --- a/database/upgvue3/zupgrade.sql +++ b/database/upgvue3/zupgrade.sql @@ -145,8 +145,11 @@ ALTER TABLE `omc_db`.`sys_dict_data` MODIFY COLUMN `dict_code` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '字典编码' FIRST; ALTER TABLE `omc_db`.`gold_kpi` -ADD COLUMN IF NOT EXISTS `granularity` tinyint NOT NULL DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `index`; +ADD COLUMN IF NOT EXISTS `granularity` tinyint DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `index`; ALTER TABLE `omc_db`.`ne_info` DROP PRIMARY KEY, -ADD PRIMARY KEY (`id`) USING BTREE; \ No newline at end of file +ADD PRIMARY KEY (`id`) USING BTREE; + +ALTER TABLE `omc_db`.`gold_kpi` +MODIFY COLUMN `granularity` tinyint(4) NULL DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `date`; \ No newline at end of file diff --git a/src/modules/crontask/processor/getStateFromNE/getStateFromNE.go b/src/modules/crontask/processor/getStateFromNE/getStateFromNE.go index b92e3d5f..fd7f6fba 100644 --- a/src/modules/crontask/processor/getStateFromNE/getStateFromNE.go +++ b/src/modules/crontask/processor/getStateFromNE/getStateFromNE.go @@ -117,7 +117,7 @@ func (s *BarProcessor) Execute(data any) (any, error) { state := new(SystemState) _ = json.Unmarshal(response.Body(), &state) var dateStr *string = nil - if state.ExpiryDate != "" { + if state.ExpiryDate != "" && state.ExpiryDate != "-" { dateStr = &state.ExpiryDate } neState := new(dborm.NeState)