Browse Source

绩效改为星级

master
PoffyZhang 1 year ago
parent
commit
6077a1fffe
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java

+ 5
- 4
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java View File

@@ -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(); stopWatch.stop();


Loading…
Cancel
Save