Commit f4e1a1a7c60b7785869015b083d678c0f214b651

Authored by 王通
1 parent 6f45bba3

1.启动时执行一次更新操作

src/main/java/com/bsth/StartCommand.java
@@ -43,6 +43,7 @@ public class StartCommand implements CommandLineRunner{ @@ -43,6 +43,7 @@ public class StartCommand implements CommandLineRunner{
43 43
44 try { 44 try {
45 log.info("在:"+timeDiff / 1000 / 60 + "分钟后开始同步数据"); 45 log.info("在:"+timeDiff / 1000 / 60 + "分钟后开始同步数据");
  46 + personnelUpdateThrad.run();
46 mainServices.scheduleAtFixedRate(personnelUpdateThrad, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);//timeDiff / 1000 47 mainServices.scheduleAtFixedRate(personnelUpdateThrad, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);//timeDiff / 1000
47 // mainServices.scheduleAtFixedRate(personnelUpdateThrad, 1, 60*60, TimeUnit.SECONDS);//timeDiff / 1000 48 // mainServices.scheduleAtFixedRate(personnelUpdateThrad, 1, 60*60, TimeUnit.SECONDS);//timeDiff / 1000
48 } catch (Exception e) { 49 } catch (Exception e) {