From 6553fd92ee998313908b0b1a57d4fbc827c3e92e Mon Sep 17 00:00:00 2001 From: renkaige Date: Mon, 10 Dec 2018 10:23:48 +0600 Subject: [PATCH] =?UTF-8?q?1:=E6=9B=B4=E6=94=B9=E9=A6=96=E9=A1=B5=E6=B5=81?= =?UTF-8?q?=E9=87=8F=E7=BB=9F=E8=AE=A1=E7=9A=84sql=202:=E6=9B=B4=E6=94=B9t?= =?UTF-8?q?opic=E6=95=B0=E6=8D=AE=E7=9A=84=E8=8E=B7=E5=8F=96=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=203:=E4=BF=AE=E6=94=B9sql=E4=B8=ADwhere=E9=94=99?= =?UTF-8?q?=E8=AF=AF=204:=E4=BF=AE=E6=94=B9=E8=A1=A8=E7=BB=93=E6=9E=84sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/init/galaxy_stru_ui_mysql.sql | 4 +- .../web/dao/dashboard/NtcTotalReportDao.xml | 13 +- .../dashboard/TrafficHttpStatisticDao.java | 6 +- .../dao/dashboard/TrafficHttpStatisticDao.xml | 183 +++--- .../dashboard/TrafficProtocolStatisticDao.xml | 2 +- .../java/com/nis/web/service/BaseService.java | 188 +++--- .../web/service/restful/DashboardService.java | 572 ++++++++++-------- 7 files changed, 547 insertions(+), 421 deletions(-) diff --git a/db/init/galaxy_stru_ui_mysql.sql b/db/init/galaxy_stru_ui_mysql.sql index 90c61a8..409505e 100644 --- a/db/init/galaxy_stru_ui_mysql.sql +++ b/db/init/galaxy_stru_ui_mysql.sql @@ -161,8 +161,10 @@ CREATE TABLE `ui_code_protocol_type_dic` ( `id` int(11) NOT NULL AUTO_INCREMENT, `protocol_type` varchar(255) DEFAULT '', `view_code` varchar(255) DEFAULT NULL, + `service_id` int(11) DEFAULT NULL, + `remarks` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@192.168.10.204:3306/gwall/code_protocol_type_dic'; +) ENGINE=FEDERATED AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 CONNECTION='mysql://root:111111@10.0.4.6:3306/ntc_db/code_protocol_type_dic'; CREATE TABLE `ui_code_service_type_dic` ( 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 f5fd6fe..1c713b5 100644 --- a/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml +++ b/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml @@ -32,8 +32,17 @@ - SELECT stat_time statTime FROM traffic_http_statistic order by stat_time desc limit 1 - - - - - - - - - - - - - - - - - + SELECT stat_time statTime FROM traffic_http_statistic order by stat_time + desc limit 1 + + + + + + + + + + + + + + + + + + + + + + + and stat_time > DATE_SUB(#{statTime},INTERVAL 1 hour) + \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/dashboard/TrafficProtocolStatisticDao.xml b/src/main/java/com/nis/web/dao/dashboard/TrafficProtocolStatisticDao.xml index ed6396d..56d4760 100644 --- a/src/main/java/com/nis/web/dao/dashboard/TrafficProtocolStatisticDao.xml +++ b/src/main/java/com/nis/web/dao/dashboard/TrafficProtocolStatisticDao.xml @@ -17,7 +17,7 @@