int size = b2BSettlementDetails.size(); for (int begin = 0; begin < size; begin = begin + 10000) { int end = (begin + 10000 > size ? size : begin + 10000); List<B2BSettlementDetail> list = new ArrayList(b2BSettlementDetails.subList(begin, end)); b2bSettlementDetailExtendMapper.updateSettlementDetailExtendByDetails(settlementNo, settlement.getCreateBy(),list); }