From bf3bf9dc7b80cf54cca9a592e46ba59343214cb3 Mon Sep 17 00:00:00 2001 From: zhangwq Date: Mon, 10 Dec 2018 11:09:04 +0800 Subject: [PATCH] =?UTF-8?q?1.=E7=94=B1=E9=85=8D=E7=BD=AE=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=9F=A5=E8=AF=A2=E9=BB=98=E8=AE=A4=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=89=8D=E4=BA=94=E5=88=86?= =?UTF-8?q?=E9=92=9F=202.=E6=8A=A5=E8=A1=A8Action=E6=A3=80=E7=B4=A2?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nis/domain/log/BaseLogEntity.java | 2 +- .../nis/web/controller/BaseController.java | 34 ++++++++++++++++--- src/main/webapp/WEB-INF/views/report/list.jsp | 10 +++--- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/nis/domain/log/BaseLogEntity.java b/src/main/java/com/nis/domain/log/BaseLogEntity.java index 6e9e98c04..e1c53ff14 100644 --- a/src/main/java/com/nis/domain/log/BaseLogEntity.java +++ b/src/main/java/com/nis/domain/log/BaseLogEntity.java @@ -40,7 +40,7 @@ public class BaseLogEntity extends BaseEntity { protected String searchFoundStartTime;//开始时间,格式为yyyy-mm-dd hh24:mi:ss protected String searchFoundEndTime;//结束时间,格式同上 - protected String isLogTotalSearch;//由配置列表点击日志总量进行查询的标识 + protected String isLogTotalSearch;//由配置界面跳转日志查询标识 protected String orderBy;//排序参数 //新增字段 diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index 098c4c729..c956e956c 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -486,7 +486,34 @@ public class BaseController { protected void initReportCondition(Model model, SearchReport report) { List serviceList = DictUtils.getFunctionServiceDictList(report.getFunctionId()); + // HTTP(+keyword)报表处理 + if(report.getFunctionId() == 8){ + serviceList.addAll(DictUtils.getFunctionServiceDictList(635)); + for (FunctionServiceDict serviceDict : serviceList) { + if(serviceDict.getFunctionId() == report.getFunctionId()){ + if(serviceDict.getAction() == Constants.MONIT_ACTION){ + serviceDict.setActionCode("log_search_http_monit"); + }else if(serviceDict.getAction() == Constants.REJECT_ACTION){ + serviceDict.setActionCode("log_search_http_reject"); + } + }else{ + if(serviceDict.getAction() == Constants.MONIT_ACTION){ + serviceDict.setActionCode("log_search_keyword_monit"); + }else if(serviceDict.getAction() == Constants.REJECT_ACTION){ + serviceDict.setActionCode("log_search_keyword_reject"); + } + } + } + }else{ + String prefix = "action_"; + for (FunctionServiceDict serviceDict : serviceList) { + if(!serviceDict.getActionCode().contains(prefix)){ + serviceDict.setActionCode(prefix+serviceDict.getActionCode()); + } + } + } model.addAttribute("serviceList", serviceList); + if (StringUtils.isBlank(report.getReportTime())) { report.setReportTime(DateUtils.formatDate(new Date(), "yyyy-MM-dd")); } @@ -809,15 +836,14 @@ public class BaseController { // 判断是否是从配置界面过来的日志查询 if (StringUtils.isNotBlank(entry.getIsLogTotalSearch())) { Calendar time = Calendar.getInstance(); - time.add(Calendar.MINUTE, -5); String searchEndTime = DateUtils.formatDateTime(time.getTime()); - params.put("searchFoundEndTime", searchEndTime); - entry.setSearchFoundEndTime(searchEndTime); - time.add(Calendar.MINUTE, -5); String searchStartTime = DateUtils.formatDateTime(time.getTime()); + params.put("searchFoundStartTime", searchStartTime); + params.put("searchFoundEndTime", searchEndTime); entry.setSearchFoundStartTime(searchStartTime); + entry.setSearchFoundEndTime(searchEndTime); // 判断startTime是否有值 /* diff --git a/src/main/webapp/WEB-INF/views/report/list.jsp b/src/main/webapp/WEB-INF/views/report/list.jsp index 73e590569..e482825cb 100644 --- a/src/main/webapp/WEB-INF/views/report/list.jsp +++ b/src/main/webapp/WEB-INF/views/report/list.jsp @@ -373,21 +373,21 @@ white-space:nowrap;
-<%-- --%>

@@ -415,7 +415,7 @@ white-space:nowrap; - +