insertIgnoreBatch/replaceBatch改造

pro
wj 2 years ago
parent aff2dadc3c
commit d068fb6f73

@ -307,7 +307,7 @@ public interface BaseMapperPlus<M, T, V> extends BaseMapper<T> {
oneBatchList.add(element); oneBatchList.add(element);
if (i == idxLimit) { if (i == idxLimit) {
this.insertIgnoreBatch(oneBatchList); this.replaceBatch(oneBatchList);
//每次提交后需要清空集合数据 //每次提交后需要清空集合数据
oneBatchList.clear(); oneBatchList.clear();
idxLimit = Math.min(idxLimit + batchSize, size); idxLimit = Math.min(idxLimit + batchSize, size);

Loading…
Cancel
Save