From 8e5055e0ea5f39285e8e12b688ba6b6a8be1fb04 Mon Sep 17 00:00:00 2001 From: doufenghu Date: Thu, 17 Jan 2019 12:24:37 +0600 Subject: [PATCH] =?UTF-8?q?fix:=E9=A6=96=E9=A1=B5traffic=E5=B8=A6=E5=AE=BD?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=AD=A3=E4=B8=BAin=E4=B8=8Eout?= =?UTF-8?q?=E6=B5=81=E9=87=8F=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=B5=81=E9=87=8F?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E8=BD=AC=E6=8D=A2=E6=9B=B4=E6=96=B0sql?= =?UTF-8?q?=E8=AF=AD=E5=8F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/201901-update.sql | 15 ++++++++- db/init/galaxy_stru_ui_mysql.sql | 32 +++++++++++++++++-- .../web/dao/dashboard/NtcTotalReportDao.xml | 15 +++++---- 3 files changed, 52 insertions(+), 10 deletions(-) diff --git a/db/201901-update.sql b/db/201901-update.sql index 882c978..6d57125 100644 --- a/db/201901-update.sql +++ b/db/201901-update.sql @@ -1,2 +1,15 @@ --活跃端口统计增加传输层协议属性 -alter table traffic_port_active_statistic add trans_proto int(11) default 0 comment '6-tcp 17 -udp'; \ No newline at end of file +alter table traffic_port_active_statistic add trans_proto int(11) default 0 comment '6-tcp 17 -udp'; + + +alter table traffic_trans_statistic add direction int(11) comment '0-out 1-in'; + +alter table traffic_protocol_statistic add direction int(11) comment '0-out 1-in', +add addr_type varchar(32), add trans_type int(11) ; + + +alter table traffic_app_statistic add direction int(11) comment '0-out 1-in', +add addr_type varchar(32), add trans_type int(11) ; + + + diff --git a/db/init/galaxy_stru_ui_mysql.sql b/db/init/galaxy_stru_ui_mysql.sql index 9f41c6b..c7cb711 100644 --- a/db/init/galaxy_stru_ui_mysql.sql +++ b/db/init/galaxy_stru_ui_mysql.sql @@ -341,8 +341,36 @@ CREATE TABLE `di_rule` ( ) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@10.0.4.223:3306/nms/di_rule'; - - +DROP TABLE IF EXISTS `ui_sys_device_info`; +CREATE TABLE `ui_sys_device_info` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `device_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '设备类型', + `ip_addr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `device_id` int(11) NOT NULL COMMENT '设备ID,相同设备可对应多个运营商', + `link_id` int(11) NOT NULL COMMENT '链路号索引', + `isp` int(11) NOT NULL COMMENT '运营商编码,例如ktel-mxpe:1001', + `entrance_id` int(11) NOT NULL COMMENT '地域 1-astana 2-alamty', + `status` int(11) NOT NULL COMMENT '0-未接入 1-接入 2-部分接入', + `create_time` datetime(0) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@10.0.4.6:3306/ntc_db/sys_device_info'; +; + + + +DROP TABLE IF EXISTS `ui_sys_isp_info`; +CREATE TABLE `ui_sys_isp_info` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `isp_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '通信运营商名称', + `isp_code` int(11) NOT NULL COMMENT '通信运营商编码', + `business_type_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '业务类型名称', + `business_type_code` int(11) NOT NULL COMMENT '业务类型编码', + `isp_key_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '运营商唯一标识名称,例如ktel-mxpe:1001', + `isp_key_code` int(11) NOT NULL COMMENT '运营商唯一标识编码', + `create_time` datetime(0) NOT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@10.0.4.6:3306/ntc_db/sys_isp_info'; +; diff --git a/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml b/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml index 2b90249..eae2e11 100644 --- a/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml +++ b/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml @@ -32,13 +32,14 @@