diff --git a/src/main/java/com/cm/inspection/startup/StartUp.java b/src/main/java/com/cm/inspection/startup/StartUp.java index 447446f..bd142b9 100644 --- a/src/main/java/com/cm/inspection/startup/StartUp.java +++ b/src/main/java/com/cm/inspection/startup/StartUp.java @@ -54,8 +54,10 @@ public class StartUp implements ApplicationRunner { processService.deployProcess("check-self", "网格员检查上报流程"); // 初始化统计,防止第一次打开慢 - Map params = new HashMap<>(); - enterpriseService.countEnterpriseByNature(params); + new Thread(() -> { + Map params = new HashMap<>(); + enterpriseService.countEnterpriseByNature(params); + }).start(); for (int year = currentYear; year >= startYear; year--) { final String yearStr = String.valueOf(year); new Thread(() -> {