日志查询时间同步日志总量查询时间.
This commit is contained in:
@@ -34,6 +34,7 @@ public class BaseLogEntity<T> extends BaseEntity<T> {
|
||||
protected Integer functionId;
|
||||
protected Integer action;
|
||||
|
||||
protected String date;//配置界面日志总量查询时间
|
||||
//自定义字段
|
||||
protected String seltype;//选中类型,页面搜索用
|
||||
protected String searchFoundStartTime;//开始时间,格式为yyyy-mm-dd hh24:mi:ss
|
||||
@@ -213,6 +214,12 @@ public class BaseLogEntity<T> extends BaseEntity<T> {
|
||||
public void setSceneFile(String sceneFile) {
|
||||
this.sceneFile = sceneFile;
|
||||
}
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{\"cfgId\"=\"" + cfgId + "\", \"foundTime\"=\"" + foundTime
|
||||
|
||||
@@ -673,18 +673,19 @@ public class BaseController {
|
||||
}else{
|
||||
// 判断是否是从配置界面过来的日志查询
|
||||
if(entry.getCfgId() != null) {
|
||||
String endTime = Constants.LOG_TIME_END;
|
||||
if(StringUtils.isBlank(endTime)) {
|
||||
endTime = DateUtils.getDateTime();
|
||||
}
|
||||
// 判断startTime是否有值
|
||||
if(StringUtils.isNotBlank(Constants.LOG_TIME_START)) {
|
||||
String endTime = Constants.LOG_TIME_END;
|
||||
if(StringUtils.isBlank(endTime)) {
|
||||
endTime = DateUtils.getDateTime();
|
||||
}
|
||||
params.put("searchFoundStartTime", Constants.LOG_TIME_START);
|
||||
params.put("searchFoundEndTime",endTime );
|
||||
entry.setSearchFoundStartTime(Constants.LOG_TIME_START);
|
||||
entry.setSearchFoundEndTime(endTime);
|
||||
}else {
|
||||
Calendar startTimeCal = Calendar.getInstance();
|
||||
startTimeCal.setTimeInMillis(Long.parseLong(entry.getDate()));// 同步日志总量查询时间
|
||||
// 时间间隔
|
||||
int interval = Constants.LOG_TIME_RANGE/1000/60;
|
||||
if(interval < 60) {
|
||||
@@ -721,6 +722,8 @@ public class BaseController {
|
||||
entry.setSearchFoundStartTime(startTime);
|
||||
entry.setSearchFoundEndTime(endTime);
|
||||
}
|
||||
logger.info("searchFoundStartTime:"+params.get("searchFoundStartTime"));
|
||||
logger.info("searchFoundEndTime:"+params.get("searchFoundEndTime"));
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(entry.getTransProto())) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class LogSearchController extends BaseController{
|
||||
attr.addAttribute("cfgId", compileId);
|
||||
attr.addAttribute("service", serviceId);
|
||||
attr.addAttribute("functionId", entity.getFunctionId());
|
||||
|
||||
attr.addAttribute("date", entity.getDate());
|
||||
return "redirect:"+adminPath+logUrl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1273,6 +1273,7 @@ var getTotalLog=function(){
|
||||
if(!has){
|
||||
data.actions.push($(this).attr("action"));
|
||||
}
|
||||
$(this).attr("date",data.date.getTime());
|
||||
data.compileIds.push($(this).attr("compileId"));
|
||||
data.functionId=$(this).attr("functionId");
|
||||
data.objs.push($(this));
|
||||
@@ -1351,9 +1352,10 @@ var toLogSearch = function(index){
|
||||
var action=$(this).attr("action");
|
||||
var compileId=$(this).attr("compileId");
|
||||
var functionId=$(this).attr("functionId");
|
||||
var date=$(this).attr("date");
|
||||
var pathName=window.document.location.pathname.substring(0,window.document.location.pathname.indexOf("/nis")+4);
|
||||
|
||||
window.location.href = pathName+"/toLogSearch?action="+action+"&functionId="+functionId+"&compileId="+compileId;
|
||||
window.location.href = pathName+"/toLogSearch?action="+action+"&functionId="+functionId+"&compileId="+compileId+"&date="+date;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user