summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoufenghu <[email protected]>2019-01-10 16:53:54 +0600
committerdoufenghu <[email protected]>2019-01-10 16:53:54 +0600
commit16ca3e70694daf2fa1a3a76f72e9ba01c23ab57e (patch)
treeb051a4fd4de6f6cf1c3e00730ae3f352660b5f93
parentacf2aff5ccfda32f7c979fb8d2323acd84521764 (diff)
fix(https监控):将https监控统计修改为,关注网站统计
-rw-r--r--src/main/java/com/nis/galaxy/template/ForEventsInterface.java3
-rw-r--r--src/main/java/com/nis/galaxy/web/dao/EventsDao.java2
-rw-r--r--src/main/java/com/nis/galaxy/web/service/EventsService.java2
-rw-r--r--src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java28
4 files changed, 33 insertions, 2 deletions
diff --git a/src/main/java/com/nis/galaxy/template/ForEventsInterface.java b/src/main/java/com/nis/galaxy/template/ForEventsInterface.java
index 644f4dc..9970f98 100644
--- a/src/main/java/com/nis/galaxy/template/ForEventsInterface.java
+++ b/src/main/java/com/nis/galaxy/template/ForEventsInterface.java
@@ -514,7 +514,8 @@ public class ForEventsInterface {
List contentValue = null;
String type = "HttpsMonitor";
try {
- contentValue = eventsService.getTypeMonitorReject(start, end, type);
+ // contentValue = eventsService.getTypeMonitorReject(start, end, type);
+ contentValue = eventsService.getFocusWebsite(start, end); //修改大屏为关注网站接口
} catch (Exception e) {
logger.error(logMark + "\t查询异常\trestTemplate", e);
}
diff --git a/src/main/java/com/nis/galaxy/web/dao/EventsDao.java b/src/main/java/com/nis/galaxy/web/dao/EventsDao.java
index 40c0794..85c4182 100644
--- a/src/main/java/com/nis/galaxy/web/dao/EventsDao.java
+++ b/src/main/java/com/nis/galaxy/web/dao/EventsDao.java
@@ -27,6 +27,8 @@ public interface EventsDao {
List<EventsSpecificWebsites> getSpecificWebsites(@Param("push") Date push);
+ List<EventsSpecificWebsites> getFocusWebsite(@Param("start") Date start, @Param("end") Date end);
+
List<EventsAudioMonitor> getEventsAudioMonitor(@Param("push") Date push, @Param("start") Date start, @Param("end") Date end);
Date getEventsAudioMonitorLastTime(@Param("end") Date end);
diff --git a/src/main/java/com/nis/galaxy/web/service/EventsService.java b/src/main/java/com/nis/galaxy/web/service/EventsService.java
index 15c2e89..2355cc4 100644
--- a/src/main/java/com/nis/galaxy/web/service/EventsService.java
+++ b/src/main/java/com/nis/galaxy/web/service/EventsService.java
@@ -62,7 +62,7 @@ public interface EventsService {
- List<EventsSpecificWebsites> getFocusWebsite(String start, String end);
+ List<EventsSpecificWebsites> getFocusWebsite(Date start, Date end);
/**
diff --git a/src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java b/src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java
index 4062e29..f5078aa 100644
--- a/src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java
+++ b/src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java
@@ -305,6 +305,34 @@ public class EventsServiceImpl implements EventsService {
return list;
}
+
+ @Override
+ public List<EventsSpecificWebsites> getFocusWebsite(Date start, Date end) {
+ List<EventsSpecificWebsites> list = new ArrayList<>();
+ long timeMillisStart = System.currentTimeMillis();
+ try {
+ list = eventsDao.getFocusWebsite(start, end);
+ } catch (Exception e) {
+ logger.error("特定网站监控\t查询异常\tserviceImpl", e);
+ }
+ logger.info("特定网站监控耗时:" + (System.currentTimeMillis() - timeMillisStart));
+ if (ListUtils.isEmptyList(list) && ConfigUtil.testData) {
+ logger.info("特定网站监控------->测试数据");
+ int i = (int) (Math.random() * 100);
+ list.add(new EventsSpecificWebsites(end, "Facebook", i + 100));
+ list.add(new EventsSpecificWebsites(end, "Wikipedia", i + 90));
+ list.add(new EventsSpecificWebsites(end, "Reddit", i + 80));
+ list.add(new EventsSpecificWebsites(end, "Qq", i + 50));
+ list.add(new EventsSpecificWebsites(end, "Taobao", i + 30));
+ list.add(new EventsSpecificWebsites(end, "Tmall", i + 25));
+ list.add(new EventsSpecificWebsites(end, "Baidu", i + 20));
+ list.add(new EventsSpecificWebsites(end, "Souhu", i + 15));
+ list.add(new EventsSpecificWebsites(end, "Google", i + 10));
+ list.add(new EventsSpecificWebsites(end, "Wikipedia", i + 6));
+ }
+ return list;
+ }
+
/**
* 事件监测
*