public static void batchInsert(List<Integer> ints,int count ) {
        int begin =0;
        int end = begin+count ;
        while (begin<=ints.size()-1){
            List<Integer> integers = ints.subList(begin, end<=ints.size()?end:ints.size());
            //插入数据
            System.out.println(integers);
            begin = end;
            end = begin+count ;
        }

    }
    

 

 posted on 2020-03-24 22:37  改变一下  阅读(926)  评论(0编辑  收藏  举报