集合根据数量进行分组拆分
public static <T> List<List<T>> splitListByCount(List<T> list, int count) {
List<List<T>> listAll = new ArrayList<>();
int size = list.size();
if (size > count) {
int absInt = Math.abs(size / count);
if (size - absInt * count > 0) {
listAll.add(list.subList(absInt * count, size));
}
for (int i = 1; i < absInt + 1; i++) {
listAll.add(list.subList((i - 1) * count, i * count));
}
} else {
listAll.add(list);
}
return listAll;
}