提交日志总量获取,由于目前接口不可用,所以后台直接造的数据。超时直接显示超时
This commit is contained in:
@@ -9,8 +9,11 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
@@ -38,7 +41,8 @@ import com.nis.web.controller.BaseController;
|
||||
public class NtcPzReportController extends BaseController{
|
||||
@RequestMapping(value="ajaxGetLogTotal",method=RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public String ajaxGetLogTotal(Model model,long endTime,int action,Integer functionId,Integer compileId){
|
||||
public Map<String, Object> ajaxGetLogTotal(Model model,long endTime,int action,Integer functionId,Integer compileId){
|
||||
Map<String, Object> data=new HashMap<String, Object>();
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
int interval=Constants.LOG_TIME_RANGE;
|
||||
Date endDate=new Date(endTime);
|
||||
@@ -51,10 +55,18 @@ public class NtcPzReportController extends BaseController{
|
||||
break;
|
||||
}
|
||||
}
|
||||
ReportResultLog result=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, String.valueOf(compileId), String.valueOf(serviceId), sdf.format(startDate), sdf.format(endDate));
|
||||
if(result.getData()!=null&&result.getData().getList()!=null){
|
||||
model.addAttribute("data", result.getData().getList());
|
||||
}
|
||||
return "success";
|
||||
// ReportResultLog result=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, String.valueOf(compileId), String.valueOf(serviceId), sdf.format(startDate), sdf.format(endDate));
|
||||
// if(result.getData()!=null&&result.getData().getList()!=null){
|
||||
// model.addAttribute("data", result.getData().getList());
|
||||
// }
|
||||
data.put("compileId", compileId.intValue());
|
||||
data.put("sum", 1000l);
|
||||
// try {
|
||||
// Thread.sleep(10000);
|
||||
// } catch (InterruptedException e) {
|
||||
// // TODO Auto-generated catch block
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user