Authored by qinchao

gatewayaccess任务调度

... ... @@ -20,9 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.*;
/**
* Created by zhengyouwei on 2016/8/15.
... ... @@ -121,6 +119,8 @@ public class TaskConfigureCtrl {
}
}
@RequestMapping("/getGatewayEvents")
@ResponseBody
private String getGatewayEvents() {
List<String> rtnEvents=new ArrayList<String>();
QueryResult queryResult = gatewayAccessEventsMapper.selectTagValuesType(InfluxDBContants.AWS);
... ... @@ -144,8 +144,14 @@ public class TaskConfigureCtrl {
}
}
Collections.sort(rtnEvents);
System.out.println(JSON.toJSONString(rtnEvents));
return JSON.toJSONString(rtnEvents);
List<Map<String,String>> comboMapList=new ArrayList<Map<String,String>>();
for(String str :rtnEvents){
Map<String,String> map = new HashMap<>();
map.put("id",str);
map.put("text",str);
comboMapList.add(map);
}
return JSON.toJSONString(comboMapList);
}
//gateWay access事件检测----后续新增功能--MEBU_GATEWAY_ADDSOURCE区分数据源
... ...