List按照指定长度分隔

推荐神器:guava
import com.google.common.collect.Lists;

List<String> idList = mapper.getIds(queryMap);
//批量更新,每次200条
List<List<String>> partition = Lists.partition(idList, 200);

猜你喜欢

转载自blog.csdn.net/lbh199466/article/details/105968724