活跃IP TOP10近一小时内最大值导出数据为空修复

This commit is contained in:
wangxin
2018-12-18 17:28:58 +06:00
parent 1cdaa9b19b
commit 14f4dd325c
3 changed files with 38 additions and 16 deletions

View File

@@ -47,6 +47,8 @@ import com.nis.util.excel.ExportExcel;
import com.nis.util.httpclient.HttpClientUtil;
import com.nis.web.controller.BaseController;
import com.nis.web.dao.dashboard.codedic.CodeResult;
import antlr.StringUtils;
@SuppressWarnings("rawtypes")
@Controller
@RequestMapping(value = "${adminPath}/dashboard")
@@ -218,7 +220,7 @@ public class DashboardController extends BaseController{
//IP活跃导出
@RequestMapping(value = "export")
public void exportddos(Model model,HttpServletRequest request,HttpServletResponse response,
@ModelAttribute("entry")TrafficIpActiveStatistic entity,String ids,RedirectAttributes redirectAttributes){
@ModelAttribute("entry")TrafficIpActiveStatistic entity,String ids,String beginDate,String endDate,RedirectAttributes redirectAttributes){
try {
//export data info
List<String> titleList=new ArrayList<String>();
@@ -227,7 +229,11 @@ public class DashboardController extends BaseController{
Map<String, String> noExportMap=new HashMap<String, String>();
Map<String, Object> fromJsonList = new HashMap<String, Object>();
List<TrafficIpActiveStatistic> ipActiveList = new ArrayList<TrafficIpActiveStatistic>();
String string = HttpClientUtil.get(Constants.DASHBOARD_URL+Constants.TRAFFIC_IPACTIVE_ONEHOUR);
String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_IPACTIVE_ONEHOUR;
if(org.apache.commons.lang3.StringUtils.isNotBlank(beginDate)&&org.apache.commons.lang3.StringUtils.isNotBlank(endDate)) {
url=urlAddDate(url, beginDate, endDate);
}
String string = HttpClientUtil.get(url);
Gson gson = getIntGson();
fromJsonList = gson.fromJson(string, new TypeToken<Map<String, Object>>(){}.getType());