Browse Source

修改pagecount

pull/2171/head
Jiaju Zhuang 3 years ago
parent
commit
27d44c290a
  1. 6
      src/main/java/com/alibaba/excel/read/listener/PageReadListener.java

6
src/main/java/com/alibaba/excel/read/listener/PageReadListener.java

@ -6,6 +6,8 @@ import java.util.function.Consumer;
import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.util.ListUtils; import com.alibaba.excel.util.ListUtils;
import org.apache.commons.collections4.CollectionUtils;
/** /**
* page read listener * page read listener
* *
@ -40,7 +42,9 @@ public class PageReadListener<T> implements ReadListener<T> {
@Override @Override
public void doAfterAllAnalysed(AnalysisContext context) { public void doAfterAllAnalysed(AnalysisContext context) {
consumer.accept(cachedData); if (CollectionUtils.isNotEmpty(cachedData)) {
consumer.accept(cachedData);
}
} }
} }

Loading…
Cancel
Save