From d474ff7b3059408910e18306983e1cdc6190f884 Mon Sep 17 00:00:00 2001 From: shangguanyanfei Date: Sat, 26 Jan 2019 18:29:05 +0800 Subject: [PATCH] =?UTF-8?q?1.ASN=20Statistics=E9=A1=B5=E9=9D=A2=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0ASN=E7=9A=84?= =?UTF-8?q?=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2=202.ssl=E6=B3=9B=E6=94=B6?= =?UTF-8?q?=E5=92=8Chttp=E6=B3=9B=E6=94=B6=E5=A2=9E=E5=8A=A0page=E7=9A=84l?= =?UTF-8?q?ast=E5=B1=9E=E6=80=A7=E7=9A=84=E5=80=BC=E5=A4=A7=E4=BA=8E100?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E8=AE=BE=E7=BD=AE=E4=B8=BA100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/restful/NtcLogSearchController.java | 12 +++++------- .../nis/web/dao/dashboard/TrafficAsnStatisticDao.xml | 3 +++ .../nis/web/service/NtcHttpRecordLogsService.java | 3 +++ .../com/nis/web/service/NtcSslRecordLogsService.java | 3 +++ 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java b/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java index a69129d..9df8852 100644 --- a/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java +++ b/src/main/java/com/nis/web/controller/restful/NtcLogSearchController.java @@ -888,14 +888,13 @@ public class NtcLogSearchController extends BaseRestController { long start = System.currentTimeMillis(); AuditLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null); - Page pages= new Page<>(); try { resetTime(ntcSslRecordLog); ntcLogService.queryConditionCheck(auditLogThread, start, ntcSslRecordLog, NtcSslRecordLog.class, page); // logDataService.getData(page, ntcSslRecordLog); //将数据源切换到本地clickhouse CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_B); - pages=ntcSslRecordLogsService.getNtcSslRecordLogsList(page, ntcSslRecordLog); + ntcSslRecordLogsService.getNtcSslRecordLogsList(page, ntcSslRecordLog); CustomerContextHolder.clearCustomerType(); } catch (Exception e) { auditLogThread.setExceptionInfo("SSL泛收日志检索失败:" + e.getMessage()); @@ -911,8 +910,8 @@ public class NtcLogSearchController extends BaseRestController { "SSL泛收日志检索失败:" + e.getMessage(), RestBusinessCode.service_runtime_error.getValue()); } } - - return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "SSL泛收日志检索成功", pages, 0); + + return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "SSL泛收日志检索成功", page, 0); } @RequestMapping(value = "/ntcHttpRecordLogs", method = RequestMethod.GET) @@ -922,14 +921,13 @@ public class NtcLogSearchController extends BaseRestController { long start = System.currentTimeMillis(); AuditLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET, request, null); - Page pages= new Page<>(); try { resetTime(ntcHttpRecordLog); ntcLogService.queryConditionCheck(auditLogThread, start, ntcHttpRecordLog, NtcHttpRecordLog.class, page); // logDataService.getData(page, ntcHttpRecordLog); //将数据源切换到本地clickhouse CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_B); - pages=ntcHttpRecordLogsService.getNtcHttpRecordLogsList(page, ntcHttpRecordLog); + ntcHttpRecordLogsService.getNtcHttpRecordLogsList(page, ntcHttpRecordLog); CustomerContextHolder.clearCustomerType(); } catch (Exception e) { auditLogThread.setExceptionInfo("Http泛收日志检索失败:" + e.getMessage()); @@ -946,6 +944,6 @@ public class NtcLogSearchController extends BaseRestController { } } - return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Http泛收日志检索成功", pages, 0); + return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Http泛收日志检索成功", page, 0); } } diff --git a/src/main/java/com/nis/web/dao/dashboard/TrafficAsnStatisticDao.xml b/src/main/java/com/nis/web/dao/dashboard/TrafficAsnStatisticDao.xml index fae5037..bfeada0 100644 --- a/src/main/java/com/nis/web/dao/dashboard/TrafficAsnStatisticDao.xml +++ b/src/main/java/com/nis/web/dao/dashboard/TrafficAsnStatisticDao.xml @@ -24,6 +24,9 @@ + + AND asn like concat(concat('%',#{searchAsn}),'%') + ORDER BY bps DESC, pps DESC diff --git a/src/main/java/com/nis/web/service/NtcHttpRecordLogsService.java b/src/main/java/com/nis/web/service/NtcHttpRecordLogsService.java index cad2c9c..ac0b456 100644 --- a/src/main/java/com/nis/web/service/NtcHttpRecordLogsService.java +++ b/src/main/java/com/nis/web/service/NtcHttpRecordLogsService.java @@ -51,6 +51,9 @@ public class NtcHttpRecordLogsService extends BaseService{ entity.setPage(page); List findNtcHttpRecordLogList = ntcHttpRecordLogsDao.findNtcHttpRecordLogList(entity); page.setList(findNtcHttpRecordLogList); + if (page.getLast() > 100) { + page.setLast(100); + } return page; } } diff --git a/src/main/java/com/nis/web/service/NtcSslRecordLogsService.java b/src/main/java/com/nis/web/service/NtcSslRecordLogsService.java index 56040b8..0fcd92e 100644 --- a/src/main/java/com/nis/web/service/NtcSslRecordLogsService.java +++ b/src/main/java/com/nis/web/service/NtcSslRecordLogsService.java @@ -38,6 +38,9 @@ public class NtcSslRecordLogsService extends BaseService{ entity.setPage(page); List findNtcSslRecordLogList = ntcSslRecordLogsDao.findNtcSslRecordLogList(entity); page.setList(findNtcSslRecordLogList); + if (page.getLast() > 100) { + page.setLast(100); + } return page; }