完成所有日志查询接口
This commit is contained in:
@@ -75,16 +75,16 @@ public abstract class LogEntity<T> implements Serializable {
|
|||||||
@ApiModelProperty(value = "用户自定义域", required = true)
|
@ApiModelProperty(value = "用户自定义域", required = true)
|
||||||
private String userRegion;
|
private String userRegion;
|
||||||
|
|
||||||
protected String searchCfgId;
|
protected String searchCfgId;//配置id
|
||||||
protected String searchTransProto;
|
protected String searchTransProto;//协议类型
|
||||||
protected String searchDIp;
|
protected String searchDIp;//服务端ip地址
|
||||||
protected String searchSIp;
|
protected String searchSIp;//客户端ip地址
|
||||||
protected String searchDirection;
|
protected String searchDirection;//传输方向
|
||||||
protected String searchService;
|
protected String searchService;//业务类型
|
||||||
protected String searchEntranceId;
|
protected String searchEntranceId;//出入口编号
|
||||||
protected String searchCapIp;
|
protected String searchCapIp;//处理机IP
|
||||||
protected String searchFoundStartTime;
|
protected String searchFoundStartTime;//开始发现时间
|
||||||
protected String searchFoundEndTime;
|
protected String searchFoundEndTime;//结束发现时间
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前实体分页对象
|
* 当前实体分页对象
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ import com.nis.util.DateUtils;
|
|||||||
import com.nis.util.HiveJDBC;
|
import com.nis.util.HiveJDBC;
|
||||||
import com.nis.util.JsonMapper;
|
import com.nis.util.JsonMapper;
|
||||||
import com.nis.web.controller.BaseRestController;
|
import com.nis.web.controller.BaseRestController;
|
||||||
import com.nis.web.service.BaseLogService;
|
|
||||||
import com.nis.web.service.HiveSqlService;
|
import com.nis.web.service.HiveSqlService;
|
||||||
import com.nis.web.service.SaveRequestLogThread;
|
import com.nis.web.service.SaveRequestLogThread;
|
||||||
import com.nis.web.service.ServicesRequestLogService;
|
import com.nis.web.service.ServicesRequestLogService;
|
||||||
@@ -76,7 +75,7 @@ public class LogController extends BaseRestController {
|
|||||||
ntcIpLogPage = new Page<NtcIpLog>();
|
ntcIpLogPage = new Page<NtcIpLog>();
|
||||||
String orderBy = "";
|
String orderBy = "";
|
||||||
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
orderBy = page.getOrderBySql(NtcIpLog.class.getSimpleName(), page.getOrderBy());
|
orderBy = Page.getOrderBySql(NtcIpLog.class.getSimpleName(), page.getOrderBy());
|
||||||
} else {
|
} else {
|
||||||
orderBy = "found_Time";
|
orderBy = "found_Time";
|
||||||
}
|
}
|
||||||
@@ -99,6 +98,7 @@ public class LogController extends BaseRestController {
|
|||||||
List<NtcIpLog> List = (java.util.List<NtcIpLog>) JsonMapper.fromJsonList(jsonString,
|
List<NtcIpLog> List = (java.util.List<NtcIpLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
NtcIpLog.class);
|
NtcIpLog.class);
|
||||||
ntcIpLogPage.setList(List);
|
ntcIpLogPage.setList(List);
|
||||||
|
ntcIpLogPage.setCount(List.size());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ntcIpLogPage.setList(new ArrayList());
|
ntcIpLogPage.setList(new ArrayList());
|
||||||
@@ -109,7 +109,7 @@ public class LogController extends BaseRestController {
|
|||||||
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
logger.error(e);
|
logger.error(e);
|
||||||
if (!(e instanceof RestServiceException)) {
|
if (!(e instanceof RestServiceException)) {
|
||||||
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "HTTP协议请求日志检索失败");
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "IP地址日志检索失败");
|
||||||
}
|
}
|
||||||
throw ((RestServiceException) e);
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
@@ -125,13 +125,49 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcHttpLog> ntcHttpLogPage = new Page<>();
|
Page<NtcHttpLog> ntcHttpLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcHttpLogPage = testService.findNtcHttpLogPage(new Page<NtcHttpLog>(request, response, NtcHttpLog.class),
|
testService.queryConditionCheck(auditLogThread, start, ntcHttpLog, NtcHttpLog.class, page);
|
||||||
ntcHttpLog);
|
ntcHttpLogPage = new Page<NtcHttpLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcHttpLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcHttpLog,
|
||||||
|
Configurations.getStringProperty(NtcHttpLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcHttpLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcHttpLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcHttpLog> List = (java.util.List<NtcHttpLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcHttpLog.class);
|
||||||
|
ntcHttpLogPage.setList(List);
|
||||||
|
ntcHttpLogPage.setCount(List.size());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntcHttpLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "Http日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Http日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Http日志检索成功",
|
||||||
@@ -146,13 +182,49 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcDnsLog> ntcDnsLogPage = new Page<>();
|
Page<NtcDnsLog> ntcDnsLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcDnsLogPage = testService.findNtcDnsLogPage(new Page<NtcDnsLog>(request, response, NtcDnsLog.class),
|
testService.queryConditionCheck(auditLogThread, start, ntcDnsLog, NtcDnsLog.class, page);
|
||||||
ntcDnsLog);
|
ntcDnsLogPage = new Page<NtcDnsLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcDnsLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcDnsLog,
|
||||||
|
Configurations.getStringProperty(NtcDnsLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcDnsLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcDnsLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcDnsLog> List = (java.util.List<NtcDnsLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcDnsLog.class);
|
||||||
|
ntcDnsLogPage.setList(List);
|
||||||
|
ntcDnsLogPage.setCount(List.size());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntcDnsLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "Dns日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Dns日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Dns日志检索成功",
|
||||||
@@ -167,13 +239,49 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcMailLog> ntcMailLogPage = new Page<>();
|
Page<NtcMailLog> ntcMailLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcMailLogPage = testService.findNtcMailLogPage(new Page<NtcMailLog>(request, response, NtcMailLog.class),
|
testService.queryConditionCheck(auditLogThread, start, ntcMailLog, NtcMailLog.class, page);
|
||||||
ntcMailLog);
|
ntcMailLogPage = new Page<NtcMailLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcMailLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcMailLog,
|
||||||
|
Configurations.getStringProperty(NtcMailLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcMailLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcMailLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcMailLog> List = (java.util.List<NtcMailLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcMailLog.class);
|
||||||
|
ntcMailLogPage.setList(List);
|
||||||
|
ntcMailLogPage.setCount(List.size());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntcMailLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "Mail日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Mail日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Mail日志检索成功",
|
||||||
@@ -188,13 +296,49 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcSslLog> ntcSslLogPage = new Page<>();
|
Page<NtcSslLog> ntcSslLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcSslLogPage = testService.findNtcSslLogPage(new Page<NtcSslLog>(request, response, NtcSslLog.class),
|
testService.queryConditionCheck(auditLogThread, start, ntcSslLog, NtcSslLog.class, page);
|
||||||
ntcSslLog);
|
ntcSslLogPage = new Page<NtcSslLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcSslLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcSslLog,
|
||||||
|
Configurations.getStringProperty(NtcSslLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcSslLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcSslLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcSslLog> List = (java.util.List<NtcSslLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcSslLog.class);
|
||||||
|
ntcSslLogPage.setList(List);
|
||||||
|
ntcSslLogPage.setCount(List.size());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntcSslLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "SSL日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "SSL日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "SSL日志检索成功",
|
||||||
@@ -209,13 +353,48 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcPptpLog> ntcPptpLogPage = new Page<>();
|
Page<NtcPptpLog> ntcPptpLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcPptpLogPage = testService.findNtcPptpLogPage(new Page<NtcPptpLog>(request, response, NtcPptpLog.class),
|
testService.queryConditionCheck(auditLogThread, start, ntcPptpLog, NtcPptpLog.class, page);
|
||||||
ntcPptpLog);
|
ntcPptpLogPage = new Page<NtcPptpLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcPptpLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcPptpLog,
|
||||||
|
Configurations.getStringProperty(NtcPptpLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcPptpLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcPptpLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcPptpLog> List = (java.util.List<NtcPptpLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcPptpLog.class);
|
||||||
|
ntcPptpLogPage.setList(List);
|
||||||
|
ntcPptpLogPage.setCount(List.size());
|
||||||
|
} else {
|
||||||
|
ntcPptpLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "PPTP日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "PPTP日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "PPTP日志检索成功",
|
||||||
@@ -230,13 +409,49 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcL2tpLog> ntcL2tpLogPage = new Page<>();
|
Page<NtcL2tpLog> ntcL2tpLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcL2tpLogPage = testService.findNtcL2tpLogPage(new Page<NtcL2tpLog>(request, response, NtcL2tpLog.class),
|
testService.queryConditionCheck(auditLogThread, start, ntcL2tpLog, NtcL2tpLog.class, page);
|
||||||
ntcL2tpLog);
|
ntcL2tpLogPage = new Page<NtcL2tpLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcL2tpLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcL2tpLog,
|
||||||
|
Configurations.getStringProperty(NtcL2tpLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcL2tpLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcL2tpLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcL2tpLog> List = (java.util.List<NtcL2tpLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcL2tpLog.class);
|
||||||
|
ntcL2tpLogPage.setList(List);
|
||||||
|
ntcL2tpLogPage.setCount(List.size());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntcL2tpLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "L2TP日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "L2TP日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "L2TP日志检索成功",
|
||||||
@@ -251,13 +466,49 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcOpenvpnLog> ntcOpenvpnLogPage = new Page<>();
|
Page<NtcOpenvpnLog> ntcOpenvpnLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcOpenvpnLogPage = testService.findNtcOpenvpnLogPage(
|
testService.queryConditionCheck(auditLogThread, start, ntcOpenvpnLog, NtcOpenvpnLog.class, page);
|
||||||
new Page<NtcOpenvpnLog>(request, response, NtcOpenvpnLog.class), ntcOpenvpnLog);
|
ntcOpenvpnLogPage = new Page<NtcOpenvpnLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcOpenvpnLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcOpenvpnLog,
|
||||||
|
Configurations.getStringProperty(NtcOpenvpnLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcOpenvpnLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcOpenvpnLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcOpenvpnLog> List = (java.util.List<NtcOpenvpnLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcOpenvpnLog.class);
|
||||||
|
ntcOpenvpnLogPage.setList(List);
|
||||||
|
ntcOpenvpnLogPage.setCount(List.size());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntcOpenvpnLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "Openvpn日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Openvpn日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "Openvpn日志检索成功",
|
||||||
@@ -272,13 +523,49 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcIpsecLog> ntcIpsecLogPage = new Page<>();
|
Page<NtcIpsecLog> ntcIpsecLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcIpsecLogPage = testService
|
testService.queryConditionCheck(auditLogThread, start, ntcIpsecLog, NtcIpsecLog.class, page);
|
||||||
.findNtcIpsecLogPage(new Page<NtcIpsecLog>(request, response, NtcIpsecLog.class), ntcIpsecLog);
|
ntcIpsecLogPage = new Page<NtcIpsecLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcIpsecLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcIpsecLog,
|
||||||
|
Configurations.getStringProperty(NtcIpsecLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcIpsecLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcIpsecLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcIpsecLog> List = (java.util.List<NtcIpsecLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcIpsecLog.class);
|
||||||
|
ntcIpsecLogPage.setList(List);
|
||||||
|
ntcIpsecLogPage.setCount(List.size());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntcIpsecLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "IPSEC日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "IPSEC日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "IPSEC日志检索成功",
|
||||||
@@ -293,13 +580,49 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcSshLog> ntcSshLogPage = new Page<>();
|
Page<NtcSshLog> ntcSshLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcSshLogPage = testService.findNtcSshLogPage(new Page<NtcSshLog>(request, response, NtcSshLog.class),
|
testService.queryConditionCheck(auditLogThread, start, ntcSshLog, NtcSshLog.class, page);
|
||||||
ntcSshLog);
|
ntcSshLogPage = new Page<NtcSshLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcSshLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcSshLog,
|
||||||
|
Configurations.getStringProperty(NtcSshLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcSshLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcSshLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcSshLog> List = (java.util.List<NtcSshLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcSshLog.class);
|
||||||
|
ntcSshLogPage.setList(List);
|
||||||
|
ntcSshLogPage.setCount(List.size());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntcSshLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "SSH日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "SSH日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "SSH日志检索成功",
|
||||||
@@ -314,15 +637,50 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<NtcFtpLog> ntcFtpLogPage = new Page<>();
|
Page<NtcFtpLog> ntcFtpLogPage = null;
|
||||||
try {
|
try {
|
||||||
ntcFtpLogPage = testService.findNtcFtpLogPage(new Page<NtcFtpLog>(request, response, NtcSshLog.class),
|
testService.queryConditionCheck(auditLogThread, start, ntcFtpLog, NtcFtpLog.class, page);
|
||||||
ntcFtpLog);
|
ntcFtpLogPage = new Page<NtcFtpLog>();
|
||||||
|
String orderBy = "";
|
||||||
|
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||||
|
orderBy = Page.getOrderBySql(NtcFtpLog.class.getSimpleName(), page.getOrderBy());
|
||||||
|
} else {
|
||||||
|
orderBy = "found_Time";
|
||||||
|
}
|
||||||
|
ResultSet rs = HiveSqlService.getResultSet(page, ntcFtpLog,
|
||||||
|
Configurations.getStringProperty(NtcFtpLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||||
|
getCol2Col(), orderBy, null);
|
||||||
|
Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcFtpLog.class, "foundTime",
|
||||||
|
"recvTime");
|
||||||
|
if (tableMapping == null) {
|
||||||
|
ntcFtpLogPage.setList(new ArrayList());
|
||||||
|
} else {
|
||||||
|
List list = new ArrayList();
|
||||||
|
if (tableMapping.get("obj").size() > page.getPageSize()) {
|
||||||
|
list = tableMapping.get("obj").subList(0, page.getPageSize());
|
||||||
|
} else {
|
||||||
|
list = tableMapping.get("obj").subList(0, tableMapping.get("obj").size());
|
||||||
|
}
|
||||||
|
if (list.size() > 0) {
|
||||||
|
String jsonString = JsonMapper.toJsonString(list);
|
||||||
|
List<NtcFtpLog> List = (java.util.List<NtcFtpLog>) JsonMapper.fromJsonList(jsonString,
|
||||||
|
NtcFtpLog.class);
|
||||||
|
ntcFtpLogPage.setList(List);
|
||||||
|
ntcFtpLogPage.setCount(List.size());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ntcFtpLogPage.setList(new ArrayList());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||||
|
logger.error(e);
|
||||||
|
if (!(e instanceof RestServiceException)) {
|
||||||
|
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "FTP日志检索失败");
|
||||||
|
}
|
||||||
|
throw ((RestServiceException) e);
|
||||||
}
|
}
|
||||||
|
|
||||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "FTP日志检索成功",
|
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "FTP日志检索成功",
|
||||||
ntcFtpLogPage, 0);
|
ntcFtpLogPage, 0);
|
||||||
}
|
}
|
||||||
@@ -335,7 +693,7 @@ public class LogController extends BaseRestController {
|
|||||||
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
SaveRequestLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||||
request, null);
|
request, null);
|
||||||
|
|
||||||
Page<?> ntcPzReportPage = new Page<>();
|
Page<?> ntcPzReportPage = null;
|
||||||
try {
|
try {
|
||||||
ntcPzReportPage = testService.findNtcPzReport(new Page<NtcPzReport>(request, response, NtcPzReport.class),
|
ntcPzReportPage = testService.findNtcPzReport(new Page<NtcPzReport>(request, response, NtcPzReport.class),
|
||||||
ntcPzReport);
|
ntcPzReport);
|
||||||
|
|||||||
@@ -41,6 +41,276 @@
|
|||||||
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="NtcHttpLogMap" type="com.nis.domain.restful.NtcHttpLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
|
||||||
|
<result column="url" jdbcType="VARCHAR" property="url" />
|
||||||
|
<result column="req_hdr_file" jdbcType="VARCHAR" property="reqHdrFile" />
|
||||||
|
<result column="req_body_file" jdbcType="VARCHAR" property="reqBodyFile" />
|
||||||
|
<result column="res_hdr_file" jdbcType="VARCHAR" property="resHdrFile" />
|
||||||
|
<result column="res_body_file" jdbcType="VARCHAR" property="resBodyFile" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="NtcDnsLogMap" type="com.nis.domain.restful.NtcDnsLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
<result column="rd" jdbcType="INTEGER" property="rd" />
|
||||||
|
<result column="qr" jdbcType="INTEGER" property="qr" />
|
||||||
|
<result column="ra" jdbcType="INTEGER" property="ra" />
|
||||||
|
<result column="rr" jdbcType="VARCHAR" property="rr" />
|
||||||
|
<result column="qtype" jdbcType="INTEGER" property="qType" />
|
||||||
|
<result column="qclass" jdbcType="INTEGER" property="qclass" />
|
||||||
|
<result column="opcode" jdbcType="INTEGER" property="opcode" />
|
||||||
|
<result column="qname" jdbcType="VARCHAR" property="qname" />
|
||||||
|
<result column="cname" jdbcType="VARCHAR" property="cname" />
|
||||||
|
<result column="dns_sub" jdbcType="INTEGER" property="dnsSub" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="NtcMailLogMap" type="com.nis.domain.restful.NtcMailLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
<result column="mail_proto" jdbcType="VARCHAR" property="mailProto" />
|
||||||
|
<result column="mail_from" jdbcType="VARCHAR" property="mailFrom" />
|
||||||
|
<result column="mail_to" jdbcType="VARCHAR" property="mailTo" />
|
||||||
|
<result column="subject" jdbcType="VARCHAR" property="subject" />
|
||||||
|
<result column="eml_file" jdbcType="VARCHAR" property="emlFile" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="NtcSslLogMap" type="com.nis.domain.restful.NtcSslLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
<result column="version" jdbcType="VARCHAR" property="version" />
|
||||||
|
<result column="sni" jdbcType="VARCHAR" property="sni" />
|
||||||
|
<result column="san" jdbcType="VARCHAR" property="san" />
|
||||||
|
<result column="ca" jdbcType="VARCHAR" property="ca" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="NtcPptpLogMap" type="com.nis.domain.restful.NtcPptpLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
<result column="tunnel_type" jdbcType="INTEGER" property="tunnelType" />
|
||||||
|
<result column="encrypt_mode" jdbcType="INTEGER" property="encryptMode" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="NtcL2tpLogMap" type="com.nis.domain.restful.NtcL2tpLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
<result column="tunnel_type" jdbcType="INTEGER" property="tunnelType" />
|
||||||
|
<result column="encrypt_mode" jdbcType="INTEGER" property="encryptMode" />
|
||||||
|
<result column="chap_name" jdbcType="VARCHAR" property="chapName" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="NtcOpenvpnLogMap" type="com.nis.domain.restful.NtcOpenvpnLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
<result column="version" jdbcType="VARCHAR" property="version" />
|
||||||
|
<result column="encrypt_mode" jdbcType="VARCHAR" property="encryptMode" />
|
||||||
|
<result column="hmac" jdbcType="INTEGER" property="hmac" />
|
||||||
|
<result column="tunnel_type" jdbcType="INTEGER" property="tunnelType" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="NtcIpsecLogMap" type="com.nis.domain.restful.NtcIpsecLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
<result column="ex_protocol" jdbcType="INTEGER" property="exProtocol" />
|
||||||
|
<result column="isakmp_mode" jdbcType="INTEGER" property="isakmpMode" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="NtcSshLogMap" type="com.nis.domain.restful.NtcSshLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
<result column="version" jdbcType="VARCHAR" property="version" />
|
||||||
|
<result column="host_key" jdbcType="VARCHAR" property="hostKey" />
|
||||||
|
<result column="host_cookie" jdbcType="VARCHAR" property="hostCookie" />
|
||||||
|
<result column="encrypt_mode" jdbcType="VARCHAR" property="encryptMode" />
|
||||||
|
<result column="mac" jdbcType="VARCHAR" property="mac" />
|
||||||
|
<result column="tunnel_type" jdbcType="INTEGER" property="tunnelType" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="NtcFtpLogMap" type="com.nis.domain.restful.NtcFtpLog">
|
||||||
|
<result column="cfg_id" jdbcType="BIGINT" property="cfgId" />
|
||||||
|
<result column="found_Time" jdbcType="TIMESTAMP" property="foundTime" />
|
||||||
|
<result column="recv_Time" jdbcType="TIMESTAMP" property="recvTime" />
|
||||||
|
<result column="trans_proto" jdbcType="VARCHAR" property="transProto" />
|
||||||
|
<result column="addr_type" jdbcType="INTEGER" property="addrType" />
|
||||||
|
<result column="d_ip" jdbcType="VARCHAR" property="dIp" />
|
||||||
|
<result column="s_ip" jdbcType="VARCHAR" property="sIp" />
|
||||||
|
<result column="d_port" jdbcType="VARCHAR" property="dPort" />
|
||||||
|
<result column="s_port" jdbcType="VARCHAR" property="sPort" />
|
||||||
|
<result column="service" jdbcType="INTEGER" property="service" />
|
||||||
|
<result column="entrance_id" jdbcType="BIGINT" property="entranceId" />
|
||||||
|
<result column="device_id" jdbcType="INTEGER" property="deviceId" />
|
||||||
|
<result column="direction" jdbcType="INTEGER" property="direction" />
|
||||||
|
<result column="stream_dir" jdbcType="INTEGER" property="streamDir" />
|
||||||
|
<result column="cap_ip" jdbcType="VARCHAR" property="capIp" />
|
||||||
|
<result column="addr_list" jdbcType="VARCHAR" property="addrList" />
|
||||||
|
<result column="user_region" jdbcType="VARCHAR" property="userRegion" />
|
||||||
|
|
||||||
|
<result column="ftp_url" jdbcType="VARCHAR" property="ftpUrl" />
|
||||||
|
<result column="ftp_content" jdbcType="VARCHAR" property="ftpContent" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ bonecp.hive.statementsCacheSize=100
|
|||||||
#####################################################################################################################################
|
#####################################################################################################################################
|
||||||
#redis.host=10.0.6.228
|
#redis.host=10.0.6.228
|
||||||
redis.host=10.0.6.249
|
redis.host=10.0.6.249
|
||||||
redis.port=6380
|
redis.port=6379
|
||||||
redis.pass=
|
redis.pass=
|
||||||
redis.maxIdle=5
|
redis.maxIdle=5
|
||||||
redis.maxTotal=250
|
redis.maxTotal=250
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
#####################################################################################################################################
|
|
||||||
##redis连接
|
|
||||||
#####################################################################################################################################
|
|
||||||
redis.host=10.0.6.228
|
|
||||||
redis.port=6379
|
|
||||||
redis.pass=
|
|
||||||
redis.maxIdle=10
|
|
||||||
redis.maxTotal=15
|
|
||||||
redis.maxWaitMillis=1000
|
|
||||||
redis.testOnBorrow=true
|
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
#由于数据中心hive日志表的表名会变动,所以本系统中将日志的表名提取到配置文件中方便后期修改,key是bean的名称+HiveTable,value是hive的实际表名
|
#由于数据中心hive日志表的表名会变动,所以本系统中将日志的表名提取到配置文件中方便后期修改,key是bean的名称+HiveTable,value是hive的实际表名
|
||||||
NtcIpLogHiveTable=NTC_IP_LOG
|
NtcIpLogHiveTable=NTC_IP_LOG
|
||||||
NtcHttpLogHiveTable=NTC_HTTP_LOG
|
NtcHttpLogHiveTable=NTC_HTTP_LOG
|
||||||
|
NtcDnsLogHiveTable=NTC_DNS_LOG
|
||||||
|
NtcMailLogHiveTable=NTC_MAIL_LOG
|
||||||
|
NtcSslLogHiveTable=NTC_SSL_LOG
|
||||||
|
NtcPptpLogHiveTable=NTC_PPTP_LOG
|
||||||
|
NtcL2tpLogHiveTable=NTC_L2TP_LOG
|
||||||
|
NtcOpenvpnLogHiveTable=NTC_OPENVPN_LOG
|
||||||
|
NtcIpsecLogHiveTable=NTC_IPSEC_LOG
|
||||||
|
NtcSshLogHiveTable=NTC_SSH_LOG
|
||||||
|
NtcFtpLogHiveTable=NTC_FTP_LOG
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user