|
|
@@ -113,10 +113,11 @@ public class CockpitStatsStatisticsTask { |
|
|
|
} |
|
|
|
|
|
|
|
//如果结果不为空 就删除之前的 插入最新的数据 |
|
|
|
if(CollUtil.isEmpty(res)){ |
|
|
|
if(cockpitStatsService.remove(Wrappers.lambdaQuery(CockpitStats.class))){ |
|
|
|
cockpitStatsService.saveBatch(res); |
|
|
|
} |
|
|
|
if(CollUtil.isNotEmpty(res)){ |
|
|
|
List<CockpitStats> list = cockpitStatsService.list(); |
|
|
|
List<Long> ids = list.stream().map(CockpitStats::getId).collect(Collectors.toList()); |
|
|
|
cockpitStatsService.removeByIds(ids); |
|
|
|
cockpitStatsService.saveBatch(res); |
|
|
|
} |
|
|
|
|
|
|
|
stopWatch.stop(); |
|
|
|