java 一个集合拆分多个集合
import com.google.common.collect.Lists;
List<List<tt>> shareList = Lists.partition(newList, 500);
// 打印分片集合
shareList.forEach(i -> {
baseMapper.batchUpsert(i);
});
import com.google.common.collect.Lists;
List<List<tt>> shareList = Lists.partition(newList, 500);
// 打印分片集合
shareList.forEach(i -> {
baseMapper.batchUpsert(i);
});