1.日志总量查询日志修改 2.提交p2p监测sql

This commit is contained in:
zhangwenqing
2018-09-13 16:46:56 +08:00
parent ae5cb30aa1
commit 14c02a80ee
35 changed files with 67 additions and 34 deletions

View File

@@ -674,7 +674,7 @@ public class BaseController {
params.put("searchFoundEndTime", entry.getSearchFoundEndTime());
}else{
// 判断是否是从配置界面过来的日志查询
if(entry.getCfgId() != null) {
if(StringUtils.isNotBlank(entry.getIsLogTotalSearch())) {
// 判断startTime是否有值
if(StringUtils.isNotBlank(Constants.LOG_TIME_START)) {
String endTime = Constants.LOG_TIME_END;
@@ -687,7 +687,9 @@ public class BaseController {
entry.setSearchFoundEndTime(endTime);
}else {
Calendar startTimeCal = Calendar.getInstance();
startTimeCal.setTimeInMillis(Long.parseLong(entry.getDate()));// 同步日志总量查询时间
if(StringUtils.isNotEmpty(entry.getDate())) {
startTimeCal.setTimeInMillis(Long.parseLong(entry.getDate()));// 同步日志总量查询时间
}
// 时间间隔
int interval = Constants.LOG_TIME_RANGE/1000/60;
if(interval < 60) {
@@ -702,7 +704,7 @@ public class BaseController {
}
Calendar endTimeCal = Calendar.getInstance();
endTimeCal.setTimeInMillis(startTimeCal.getTimeInMillis());
endTimeCal.add(Calendar.SECOND, -1);
//endTimeCal.add(Calendar.SECOND, -1);
startTimeCal.add(Calendar.MINUTE, -interval); //开始时间减去时间间隔

View File

@@ -15,8 +15,8 @@ import com.nis.web.controller.BaseController;
public class LogSearchController extends BaseController{
@RequestMapping(value = {"list",""})
public String LogSearch(BaseLogEntity<Object> entity, Integer compileId,RedirectAttributes attr,
HttpServletRequest request, HttpServletResponse response) {
public String LogSearch(BaseLogEntity<Object> entity, RedirectAttributes attr, HttpServletRequest request,
HttpServletResponse response) {
/**
* url: logUrl
* searchCfgId: compileId
@@ -26,10 +26,11 @@ public class LogSearchController extends BaseController{
String logUrl = menuService.getLogUrl(entity.getFunctionId());
Integer serviceId = menuService.getServiceId(entity.getFunctionId(),entity.getAction());
attr.addAttribute("cfgId", compileId);
attr.addAttribute("service", serviceId);
attr.addAttribute("cfgId", entity.getCfgId());
attr.addAttribute("functionId", entity.getFunctionId());
attr.addAttribute("date", entity.getDate());
attr.addAttribute("isLogTotalSearch", entity.getIsLogTotalSearch());
return "redirect:"+adminPath+logUrl;
}
}