Commit f96ddbd7 by 阮思源

早晚报加个日志

parent 32415544
......@@ -51,11 +51,15 @@ public class ESNewsBizImpl implements ESNewsBiz {
Integer index = 0;
Integer offset = 10000;
while (index * offset < count) {
Date date=new Date();
List<ESNews> list = newsDao.findAll(maxId, offset);
LOGGER.info("查询10000用时" + (new Date().getTime() - date.getTime()));
if (ListUtils.isEmpty(list)) {
break;
}
Date date1=new Date();
newsRepository.save(list);
LOGGER.info("插入es10000用时" + (new Date().getTime() - date1.getTime()));
maxId = Long.valueOf(list.get(list.size() - 1).getId());
LOGGER.info("导入数据至" + maxId);
index += 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment