1、ddos配置添加user_region字段;新增voip和流媒体业务;
2、ddos日志查询接口添加isBlock查询条件; 3、新增NTC VoIP、流媒体、文件摘要原始日志查询接口; 4、NTC BGP日志添加type、asNumber、route三个字段;
This commit is contained in:
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -19,6 +20,7 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.MmAvIpLog;
|
||||
import com.nis.domain.restful.MmAvUrlLog;
|
||||
import com.nis.domain.restful.MmFaceRecognizationLog;
|
||||
import com.nis.domain.restful.MmFileDigestLog;
|
||||
import com.nis.domain.restful.MmLogoDetectionLog;
|
||||
import com.nis.domain.restful.MmPicIpLog;
|
||||
import com.nis.domain.restful.MmPicUrlLog;
|
||||
@@ -275,7 +277,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "图片URL日志检索成功",
|
||||
logPage, 0);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@RequestMapping(value = "/mmVoipIpLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "VoIP IP日志查询", httpMethod = "GET", notes = "对日志功能“VoIP IP日志”提供数据基础查询服务")
|
||||
public Map<String, ?> mmVoipIpLogs(Page page, MmVoipIpLog mmVoipIpLog, Model model, HttpServletRequest request,
|
||||
@@ -329,6 +331,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "VoIP IP日志检索成功",
|
||||
logPage, 0);
|
||||
}
|
||||
@Deprecated
|
||||
@RequestMapping(value = "/mmVoipAccountLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "VoIP Account日志查询", httpMethod = "GET", notes = "对日志功能“VoIP Account日志”提供数据基础查询服务")
|
||||
public Map<String, ?> mmVoipAccountLogs(Page page, MmVoipAccountLog mmVoipLog, Model model, HttpServletRequest request,
|
||||
@@ -865,6 +868,60 @@ public class MmLogSearchController extends BaseRestController {
|
||||
logPage, 0);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/mmFileDigestLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "文件摘要日志查询", httpMethod = "GET", notes = "对日志功能“文件摘要日志”提供数据基础查询服务")
|
||||
public Map<String, ?> mmFileDigestLogs(Page page, MmFileDigestLog mmFileDigestLog, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
AuditLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||
request, null);
|
||||
|
||||
Page<MmFileDigestLog> logPage = null;
|
||||
try {
|
||||
resetTime(mmFileDigestLog);
|
||||
ntcLogService.queryConditionCheck(auditLogThread, start, mmFileDigestLog, MmFileDigestLog.class, page);
|
||||
logPage = new Page<MmFileDigestLog>();
|
||||
logPage.setPageNo(page.getPageNo());
|
||||
logPage.setPageSize(page.getPageSize());
|
||||
String orderBy = "";
|
||||
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||
orderBy = Page.getOrderBySql(MmFileDigestLog.class.getSimpleName(), page.getOrderBy());
|
||||
} else {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmFileDigestLog,
|
||||
getTableName(MmFileDigestLog.class.getSimpleName() + "HiveTable", "MM_FILE_DIGEST_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmFileDigestLog.class, "foundTime",
|
||||
"recvTime");
|
||||
if (tableMapping == null) {
|
||||
logPage.setList(new ArrayList());
|
||||
} else {
|
||||
List list = tableMapping.get("obj");
|
||||
if (list.size() > 0) {
|
||||
String jsonString = JsonMapper.toJsonString(list);
|
||||
List<MmFileDigestLog> List = (java.util.List<MmFileDigestLog>) JsonMapper.fromJsonList(jsonString,
|
||||
MmFileDigestLog.class);
|
||||
logPage.setList(List);
|
||||
logPage.setCount(List.size());
|
||||
|
||||
} else {
|
||||
logPage.setList(new ArrayList());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "文件摘要日志检索失败");
|
||||
}
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "文件摘要日志检索成功",
|
||||
logPage, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
*判断开始和结束时间是否为null,如果为null则初始化时间
|
||||
* @param entity
|
||||
|
||||
@@ -31,6 +31,8 @@ import com.nis.domain.restful.NtcP2pLog;
|
||||
import com.nis.domain.restful.NtcPptpLog;
|
||||
import com.nis.domain.restful.NtcSshLog;
|
||||
import com.nis.domain.restful.NtcSslLog;
|
||||
import com.nis.domain.restful.NtcStreamMediaLog;
|
||||
import com.nis.domain.restful.NtcVoipLog;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.Constants;
|
||||
@@ -968,7 +970,115 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "BGP日志检索成功",
|
||||
ntcBgpLogPage, 0);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/ntcVoipLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "NTC VoIP日志查询", httpMethod = "GET", notes = "对日志功能“NTC VoIP日志”提供数据基础查询服务")
|
||||
public Map<String, ?> ntcVoipLogs(Page page, NtcVoipLog ntcVoipLog, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
AuditLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||
request, null);
|
||||
|
||||
Page<NtcVoipLog> logPage = null;
|
||||
try {
|
||||
resetTime(ntcVoipLog);
|
||||
ntcLogService.queryConditionCheck(auditLogThread, start, ntcVoipLog, NtcVoipLog.class, page);
|
||||
logPage = new Page<NtcVoipLog>();
|
||||
logPage.setPageNo(page.getPageNo());
|
||||
logPage.setPageSize(page.getPageSize());
|
||||
String orderBy = "";
|
||||
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||
orderBy = Page.getOrderBySql(NtcVoipLog.class.getSimpleName(), page.getOrderBy());
|
||||
} else {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcVoipLog,
|
||||
getTableName(NtcVoipLog.class.getSimpleName() + "HiveTable", "NTC_VOIP_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcVoipLog.class, "foundTime",
|
||||
"recvTime");
|
||||
if (tableMapping == null) {
|
||||
logPage.setList(new ArrayList());
|
||||
} else {
|
||||
List list = tableMapping.get("obj");
|
||||
if (list.size() > 0) {
|
||||
String jsonString = JsonMapper.toJsonString(list);
|
||||
List<NtcVoipLog> List = (java.util.List<NtcVoipLog>) JsonMapper.fromJsonList(jsonString,
|
||||
NtcVoipLog.class);
|
||||
logPage.setList(List);
|
||||
logPage.setCount(List.size());
|
||||
|
||||
} else {
|
||||
logPage.setList(new ArrayList());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "NTC VoIP日志检索失败");
|
||||
}
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "NTC VoIP日志检索成功",
|
||||
logPage, 0);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/ntcStreamMediaLogs", method = RequestMethod.GET)
|
||||
@ApiOperation(value = "流媒体协议日志查询", httpMethod = "GET", notes = "对日志功能“流媒体协议日志”提供数据基础查询服务")
|
||||
public Map<String, ?> ntcStreamMediaLogs(Page page, NtcStreamMediaLog ntcStreamMediaLog, Model model, HttpServletRequest request,
|
||||
HttpServletResponse response) {
|
||||
long start = System.currentTimeMillis();
|
||||
AuditLogThread auditLogThread = super.saveRequestLog(servicesRequestLogService, Constants.OPACTION_GET,
|
||||
request, null);
|
||||
|
||||
Page<NtcStreamMediaLog> logPage = null;
|
||||
try {
|
||||
resetTime(ntcStreamMediaLog);
|
||||
ntcLogService.queryConditionCheck(auditLogThread, start, ntcStreamMediaLog, NtcStreamMediaLog.class, page);
|
||||
logPage = new Page<NtcStreamMediaLog>();
|
||||
logPage.setPageNo(page.getPageNo());
|
||||
logPage.setPageSize(page.getPageSize());
|
||||
String orderBy = "";
|
||||
if (null != page.getOrderBy() && !page.getOrderBy().equals("")) {
|
||||
orderBy = Page.getOrderBySql(NtcStreamMediaLog.class.getSimpleName(), page.getOrderBy());
|
||||
} else {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcStreamMediaLog,
|
||||
getTableName(NtcStreamMediaLog.class.getSimpleName() + "HiveTable", "NTC_STREAM_MEDIA_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcStreamMediaLog.class, "foundTime",
|
||||
"recvTime");
|
||||
if (tableMapping == null) {
|
||||
logPage.setList(new ArrayList());
|
||||
} else {
|
||||
List list = tableMapping.get("obj");
|
||||
if (list.size() > 0) {
|
||||
String jsonString = JsonMapper.toJsonString(list);
|
||||
List<NtcStreamMediaLog> List = (java.util.List<NtcStreamMediaLog>) JsonMapper.fromJsonList(jsonString,
|
||||
NtcStreamMediaLog.class);
|
||||
logPage.setList(List);
|
||||
logPage.setCount(List.size());
|
||||
|
||||
} else {
|
||||
logPage.setList(new ArrayList());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
auditLogThread.setExceptionInfo(e.getMessage() + " " + e.getCause());
|
||||
logger.error(e);
|
||||
if (!(e instanceof RestServiceException)) {
|
||||
e = new RestServiceException(auditLogThread, System.currentTimeMillis() - start, "流媒体协议日志检索失败");
|
||||
}
|
||||
throw ((RestServiceException) e);
|
||||
}
|
||||
return serviceLogResponse(auditLogThread, System.currentTimeMillis() - start, request, "流媒体协议日志检索成功",
|
||||
logPage, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
*判断开始和结束时间是否为null,如果为null则初始化时间
|
||||
* @param entity
|
||||
|
||||
Reference in New Issue
Block a user