选择数据导出时:
1:前台把id传过来后台做查询(不做描述)
2:用stream表达式,比较省代码,下面就是采用这种方法
String selections = request.getParameter("selections");
if (oConvertUtils.isNotEmpty(selections)) {
List<String> selectionList = Arrays.asList(selections.split(","));
exportList = list.stream().filter(item -> selectionList.contains(getId(item))).collect(Collectors.toList());
} else {
exportList = list;
}