1.数据库的create_time 的日期样式不对
//转换日期格式
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<Map<String, Object>> menaceList = riskSummaryMapper.getMenaceList(map);
menaceList.forEach(e->e.put("create_time",df.format((Date)e.get("create_time"))));
2.查出某个string类型字段带多个ip地址的,想一个个取出来的
list = riskSummaryMapper.getAreaBsOrgManceIpList(map); Map<String, Object> objectMap = list.get(0); List<String> ipList = objectMap. values(). stream().map(e -> (String) e).flatMap(e -> Arrays.stream(e.split(","))). filter(e -> !"".equals(e)). distinct(). collect(Collectors.toList()); map.put("ips", ipList);