diff --git a/db/init/galaxy_stru_mysql.sql b/db/init/galaxy_stru_mysql.sql index e403a81..4778f9f 100644 --- a/db/init/galaxy_stru_mysql.sql +++ b/db/init/galaxy_stru_mysql.sql @@ -1,6 +1,5 @@ /*Table structure for table `area` */ - DROP TABLE IF EXISTS `area`; DROP TABLE IF EXISTS `image_url`; DROP TABLE IF EXISTS `isp`; @@ -13,23 +12,28 @@ DROP TABLE IF EXISTS `nms_di_rule`; DROP TABLE IF EXISTS `ntc_attr_type_report`; DROP TABLE IF EXISTS `ntc_attr_type_stat_daily`; DROP TABLE IF EXISTS `ntc_attr_type_stat_hour`; +DROP TABLE IF EXISTS `ntc_attr_type_stat_month`; DROP TABLE IF EXISTS `ntc_destip_country_report`; DROP TABLE IF EXISTS `ntc_tag_report`; DROP TABLE IF EXISTS `ntc_destip_country_stat_daily`; DROP TABLE IF EXISTS `ntc_destip_country_stat_hour`; +DROP TABLE IF EXISTS `ntc_destip_country_stat_month`; DROP TABLE IF EXISTS `ntc_entrance_report`; DROP TABLE IF EXISTS `ntc_entrance_stat_daily`; DROP TABLE IF EXISTS `traffic_abnormal_machine`; DROP TABLE IF EXISTS `traffic_nmsserver_statistic`; DROP TABLE IF EXISTS `ntc_entrance_stat_hour`; +DROP TABLE IF EXISTS `ntc_entrance_stat_month`; DROP TABLE IF EXISTS `ntc_lwhh_report`; DROP TABLE IF EXISTS `ntc_lwhh_stat_daily`; DROP TABLE IF EXISTS `ntc_lwhh_stat_hour`; +DROP TABLE IF EXISTS `ntc_lwhh_stat_month`; DROP TABLE IF EXISTS `pz_control_report`; DROP TABLE IF EXISTS `ntc_device_info`; DROP TABLE IF EXISTS `ntc_pz_report`; DROP TABLE IF EXISTS `ntc_pz_stat_daily`; DROP TABLE IF EXISTS `ntc_pz_stat_hour`; +DROP TABLE IF EXISTS `ntc_pz_stat_month`; DROP TABLE IF EXISTS `ntc_radius_report`; DROP TABLE IF EXISTS `ntc_reject_url_statistic`; DROP TABLE IF EXISTS `ntc_reject_website_statistic`; @@ -38,11 +42,14 @@ DROP TABLE IF EXISTS `ntc_service_dic`; DROP TABLE IF EXISTS `ntc_service_report`; DROP TABLE IF EXISTS `ntc_service_stat_daily`; DROP TABLE IF EXISTS `ntc_service_stat_hour`; +DROP TABLE IF EXISTS `ntc_service_stat_month`; DROP TABLE IF EXISTS `ntc_srcip_domestic_report`; DROP TABLE IF EXISTS `ntc_srcip_domestic_stat_daily`; DROP TABLE IF EXISTS `ntc_srcip_domestic_stat_hour`; +DROP TABLE IF EXISTS `ntc_srcip_domestic_stat_month`; DROP TABLE IF EXISTS `ntc_tag_stat_daily`; DROP TABLE IF EXISTS `ntc_tag_stat_hour`; +DROP TABLE IF EXISTS `ntc_tag_stat_month`; DROP TABLE IF EXISTS `ntc_total_report`; DROP TABLE IF EXISTS `pxy_total_report`; DROP TABLE IF EXISTS `services_config_request_log`; @@ -69,6 +76,8 @@ DROP TABLE IF EXISTS `traffic_service_statistic`; DROP TABLE IF EXISTS `traffic_total_statistic`; DROP TABLE IF EXISTS `traffic_trans_statistic`; DROP TABLE IF EXISTS `traffic_ua_statistic`; +DROP TABLE IF EXISTS `sys_app_log_stat_status`; + CREATE TABLE `area` ( @@ -235,6 +244,7 @@ CREATE TABLE `ntc_attr_type_stat_daily` ( + CREATE TABLE `ntc_attr_type_stat_hour` ( `stat_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id自增', `service` int(11) NOT NULL COMMENT '业务类型', @@ -244,10 +254,18 @@ CREATE TABLE `ntc_attr_type_stat_hour` ( PRIMARY KEY (`stat_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.12. ntc性质小时报表'; +/*Table structure for table `ntc_attr_type_stat_month` */ +CREATE TABLE `ntc_attr_type_stat_month` ( + `stat_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增', + `service` int(11) NOT NULL COMMENT '业务类型', + `attr_type` int(11) NOT NULL COMMENT '性质', + `sum` bigint(20) NOT NULL DEFAULT 0 COMMENT '日志数量', + `report_time` datetime NOT NULL COMMENT '统计时间', + PRIMARY KEY (`stat_id`), + KEY `IDX_ATTR_TYPE_STAT_MONTH_TIME` (`report_time`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='ntc性质月报表'; + /*Table structure for table `ntc_destip_country_report` */ - - - CREATE TABLE `ntc_destip_country_report` ( `stat_id` bigint(20) NOT NULL AUTO_INCREMENT, `service` int(11) NOT NULL, @@ -283,6 +301,18 @@ CREATE TABLE `ntc_destip_country_stat_hour` ( PRIMARY KEY (`stat_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.10. ntc国家小时报表'; +/*Table structure for table `ntc_destip_country_stat_month` */ +CREATE TABLE `ntc_destip_country_stat_month` ( + `stat_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增', + `service` int(11) NOT NULL COMMENT '业务类型', + `dest_country` varchar(255) NOT NULL COMMENT '目的ip所属国家', + `sum` bigint(20) NOT NULL DEFAULT 0 COMMENT '日志数量', + `report_time` datetime NOT NULL COMMENT '统计时间', + PRIMARY KEY (`stat_id`), + KEY `IDX_DESTIP_COUNTRY_STAT_MONTH_TIME` (`report_time`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='ntc国家月报表'; + + /*Table structure for table `ntc_entrance_report` */ @@ -310,9 +340,6 @@ CREATE TABLE `ntc_entrance_stat_daily` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.15. ntc局点日报表'; /*Table structure for table `ntc_entrance_stat_hour` */ - - - CREATE TABLE `ntc_entrance_stat_hour` ( `stat_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id自增', `service` int(11) NOT NULL COMMENT '业务类型', @@ -322,6 +349,20 @@ CREATE TABLE `ntc_entrance_stat_hour` ( PRIMARY KEY (`stat_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.14. ntc局点小时报表'; +/*Table structure for table `ntc_entrance_stat_month` */ + +CREATE TABLE `ntc_entrance_stat_month` ( + `stat_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增', + `service` int(11) NOT NULL COMMENT '业务类型', + `entrance_id` int(11) NOT NULL COMMENT '局点(出入口)', + `sum` bigint(20) NOT NULL DEFAULT 0 COMMENT '日志数量', + `report_time` datetime NOT NULL COMMENT '统计时间', + PRIMARY KEY (`stat_id`), + KEY `IDX_ENTRANCE_STAT_MONTH_TIME` (`report_time`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='ntc局点月报表'; + + + /*Table structure for table `ntc_lwhh_report` */ @@ -349,9 +390,6 @@ CREATE TABLE `ntc_lwhh_stat_daily` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.17. ntc来文函号日报表'; /*Table structure for table `ntc_lwhh_stat_hour` */ - - - CREATE TABLE `ntc_lwhh_stat_hour` ( `stat_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id自增', `service` int(11) NOT NULL COMMENT '业务类型', @@ -361,6 +399,20 @@ CREATE TABLE `ntc_lwhh_stat_hour` ( PRIMARY KEY (`stat_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.16. ntc来文函号小时报表'; +/*Table structure for table `ntc_lwhh_stat_month` */ + +CREATE TABLE `ntc_lwhh_stat_month` ( + `stat_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增', + `service` int(11) NOT NULL COMMENT '业务类型', + `lwhh` int(11) NOT NULL COMMENT '来文函号', + `sum` bigint(20) NOT NULL DEFAULT 0 COMMENT '日志数量', + `report_time` datetime NOT NULL COMMENT '统计时间', + PRIMARY KEY (`stat_id`), + KEY `IDX_LWHH_STAT_MONTH_TIME` (`report_time`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='ntc来文函号月报表'; + + + /*Table structure for table `ntc_pz_report` */ @@ -428,6 +480,21 @@ CREATE TABLE `ntc_pz_stat_hour` ( PRIMARY KEY (`stat_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.2. ntc配置统计小时报表'; + +/*Table structure for table `ntc_pz_stat_month` */ + +CREATE TABLE `ntc_pz_stat_month` ( + `stat_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增', + `cfg_id` int(11) NOT NULL COMMENT '配置id', + `service` int(11) NOT NULL COMMENT '业务类型', + `sum` bigint(20) NOT NULL DEFAULT 0 COMMENT '日志数量', + `report_time` datetime NOT NULL COMMENT '统计时间', + PRIMARY KEY (`stat_id`), + KEY `IDX_PZ_STAT_MONTH_TIME` (`report_time`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='ntc配置统计月报表'; + + + /*Table structure for table `ntc_radius_report` */ @@ -527,6 +594,21 @@ CREATE TABLE `ntc_service_stat_hour` ( PRIMARY KEY (`stat_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.4. ntc业务类型小时报表'; + +/*Table structure for table `ntc_service_stat_month` */ + +CREATE TABLE `ntc_service_stat_month` ( + `stat_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增', + `service` int(11) NOT NULL COMMENT '业务类型', + `sum` bigint(20) NOT NULL DEFAULT 0 COMMENT '日志数量', + `report_time` datetime NOT NULL COMMENT '统计时间', + PRIMARY KEY (`stat_id`), + KEY `IDX_SERVICE_STAT_MONTH_TIME` (`report_time`) +) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=utf8mb4 COMMENT='ntc业务类型月报表'; + + + + /*Table structure for table `ntc_srcip_domestic_report` */ @@ -567,6 +649,19 @@ CREATE TABLE `ntc_srcip_domestic_stat_hour` ( PRIMARY KEY (`stat_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.8. ntc境内小时报表'; +/*Table structure for table `ntc_srcip_domestic_stat_month` */ + +CREATE TABLE `ntc_srcip_domestic_stat_month` ( + `stat_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增', + `service` int(11) NOT NULL COMMENT '业务类型', + `src_province` varchar(255) NOT NULL COMMENT '源ip所属省', + `src_city` varchar(255) DEFAULT '0' COMMENT '源ip所属市', + `sum` bigint(20) NOT NULL DEFAULT 0 COMMENT '日志数量', + `report_time` datetime NOT NULL COMMENT '统计时间', + PRIMARY KEY (`stat_id`), + KEY `IDX_SRCIP_STAT_MONTH_TIME` (`report_time`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='ntc境内月报表'; + /*Table structure for table `ntc_tag_report` */ @@ -604,6 +699,17 @@ CREATE TABLE `ntc_tag_stat_hour` ( PRIMARY KEY (`stat_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='9.6. ntc标签统计小时报表'; +/*Table structure for table `ntc_tag_stat_month` */ +CREATE TABLE `ntc_tag_stat_month` ( + `stat_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id自增', + `service` int(11) NOT NULL COMMENT '业务类型', + `tag` int(11) NOT NULL COMMENT '标签', + `sum` bigint(20) NOT NULL DEFAULT 0 COMMENT '日志数量', + `report_time` datetime NOT NULL COMMENT '统计时间', + PRIMARY KEY (`stat_id`), + KEY `IDX_TAG_STAT_MONTH_TIME` (`report_time`) +) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8mb4 COMMENT='ntc标签统计月报表'; + /*Table structure for table `ntc_total_report` */ @@ -1095,6 +1201,14 @@ CREATE TABLE `traffic_ua_statistic` ( PRIMARY KEY (`stat_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; +CREATE TABLE `sys_app_log_stat_status` ( + `log_id` INT(32) NOT NULL AUTO_INCREMENT, + `log_service` INT(20) NOT NULL COMMENT '业务类型:\r\n1.配置pz\r\n2.类型service\r\n3.标签tag\r\n4.境内srcipdomestic\r\n5.国家destipcountry\r\n6.性质attrtype\r\n7.局点entrance\r\n8.来文函号lwhh', + `log_time` DATETIME NOT NULL COMMENT '该统计时间', + `log_type` INT(20) NOT NULL COMMENT '统计类型:\r\n1.小时报\r\n2.日报\r\n3.月报', + PRIMARY KEY (`log_id`) +) ENGINE=INNODB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4; + CREATE INDEX IDX_TRAFFIC_HTTP_STAT_TIME ON traffic_http_statistic (stat_time); diff --git a/db/init/galaxy_stru_ui_mysql.sql b/db/init/galaxy_stru_ui_mysql.sql index 1d601e5..90c61a8 100644 --- a/db/init/galaxy_stru_ui_mysql.sql +++ b/db/init/galaxy_stru_ui_mysql.sql @@ -16,7 +16,7 @@ drop table if exists ui_request_info; drop table if exists ui_task_info; drop table if exists ui_config_group_info; drop table if exists ui_website_domain_topic; - +drop table if exists ui_http_url_cfg; CREATE TABLE `ui_asn_ip_cfg` ( `cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增', @@ -266,3 +266,43 @@ CREATE TABLE `ui_service_dict_info` ( `creator_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@192.168.10.204:3306/gwall/website_domain_topic'; + + + + +/*Table structure for table `ui_http_url_cfg` ,for keyword to url from url whitelist */ +CREATE TABLE `ui_http_url_cfg` ( + `cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增', + `cfg_desc` varchar(128) DEFAULT NULL, + `cfg_keywords` varchar(2048) NOT NULL, + `action` int(11) NOT NULL COMMENT '1:阻断,2:监测, 5: FD 白名单,6:监测白名单,7: FD 监测都白名单,应与业务ID所代表的逻辑相匹配,8-灰名单', + `is_valid` int(11) NOT NULL COMMENT '0无效,1有效,-1删除;1) 未审核时配置可删除;2) 审核通过,此字段置1;3) 取消审核通过,此字段置0', + `is_audit` int(11) NOT NULL COMMENT '0未审核,1审核通过,2审核未通过,3取消审核通过;1) 审核未通过,配置可修改;2) 审核通过,配置不可删除,只能取消审核通过', + `creator_id` int(11) NOT NULL COMMENT '取自sys_user.id', + `create_time` datetime NOT NULL, + `editor_id` int(11) DEFAULT NULL COMMENT '取自sys_user.id', + `edit_time` datetime DEFAULT NULL, + `auditor_id` int(11) DEFAULT NULL COMMENT '取自sys_user.id', + `audit_time` datetime DEFAULT NULL, + `service_id` int(11) NOT NULL COMMENT '参考系统业务类型管理表', + `request_id` int(11) NOT NULL COMMENT '取自request_info.id', + `compile_id` int(11) NOT NULL COMMENT '取自服务接口返回的maat配置的编译id,配置初始入库时获取。', + `is_area_effective` int(11) NOT NULL COMMENT '0否,1是', + `classify` varchar(128) DEFAULT NULL COMMENT '分类id,多个用英文逗号分隔', + `attribute` varchar(128) DEFAULT NULL COMMENT '性质id,多个用英文逗号分隔', + `lable` varchar(128) DEFAULT NULL COMMENT '标签id,多个用英文逗号分隔', + `expr_type` int(11) NOT NULL COMMENT '0:无表达式,1:与表达式', + `match_method` int(11) NOT NULL COMMENT 'expr_type:0时有意义,其它情况必须置0。0:子串匹配;1:右匹配;2:左匹配;3:完全匹配', + `is_hexbin` int(11) NOT NULL COMMENT '默认为0:大小写不敏感,且非HEX;1:HEX格式二进制;2:大小写敏感,且非HEX', + `area_effective_ids` varchar(1024) DEFAULT NULL COMMENT '多个英文逗号分隔', + `function_id` int(11) NOT NULL, + `cfg_region_code` int(11) DEFAULT NULL, + `cfg_type` varchar(64) DEFAULT NULL, + `ratelimit` varchar(10) DEFAULT NULL COMMENT '限速比例,0到1之间', + `user_region1` varchar(1024) DEFAULT '' COMMENT '预留自定义域1', + `user_region2` varchar(1024) DEFAULT '' COMMENT '预留自定义域2', + `user_region3` varchar(1024) DEFAULT '' COMMENT '预留自定义域3', + `user_region4` varchar(1024) DEFAULT '' COMMENT '预留自定义域4', + `user_region5` varchar(1024) DEFAULT '' COMMENT '预留自定义域5', + PRIMARY KEY (`cfg_id`) + ) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@192.168.10.204:3306/gwall/http_url_cfg'; \ No newline at end of file