Commit 7634484e authored by suhuiguang's avatar suhuiguang

feat(综合搜索):2次需求变更增加字段

1.、是否球馆、发证日期
parent 549b47c1
......@@ -1504,7 +1504,8 @@ public class DataHandlerServiceImpl {
StopWatch watch = new StopWatch();
watch.start();
Integer maxVersion = useInfoService.getBaseMapper().selectMaxVersion();
List<String> refreshRecords = useInfoService.getBaseMapper().selectUseInfoOfOneVersionAll(maxVersion);
Integer nextVersion = maxVersion + 1;
List<String> refreshRecords = useInfoService.getBaseMapper().selectUseInfoOfOneVersionAll(nextVersion);
while (!refreshRecords.isEmpty()) {
List<ESEquipmentInfo> esEquipmentInfos = refreshRecords.parallelStream().map(record -> {
ESEquipmentInfo esEquipmentInfo = null;
......@@ -1561,8 +1562,8 @@ public class DataHandlerServiceImpl {
if(!esEquipmentInfos.isEmpty()){
esEquipmentDao.saveAll(esEquipmentInfos);
}
useInfoService.getBaseMapper().updateVersionBatch(refreshRecords, maxVersion + 1);
refreshRecords = useInfoService.getBaseMapper().selectUseInfoOfOneVersionAll(maxVersion);
useInfoService.getBaseMapper().updateVersionBatch(refreshRecords, nextVersion);
refreshRecords = useInfoService.getBaseMapper().selectUseInfoOfOneVersionAll(nextVersion);
}
watch.stop();
log.info("综合统计设备信息入库结束,耗时:{}秒", watch.getTotalTimeSeconds());
......
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