提交 4f8daced authored 作者: yangli's avatar yangli

.

上级 931bda86
...@@ -283,15 +283,13 @@ public class ProgramController { ...@@ -283,15 +283,13 @@ public class ProgramController {
@Scheduled(fixedDelay = 60000) @Scheduled(fixedDelay = 60000)
protected void autoUpgradeJob() { protected void autoUpgradeJob() {
try { try {
boolean autoUpgrade = Convert.toBool(SysConfigUtil.getProperty("auto.upgrade"), false); boolean autoUpgrade = Convert.toBool(SysConfigUtil.getProperty("auto.upgrade"), false);
if (!autoUpgrade) return; if (!autoUpgrade) return;
File dir = new File(SysConfigUtil.getProperty("download.path", File dir = new File(SysConfigUtil.getProperty("download.path",
System.getProperty("user.dir").substring(0, 3) + "apqdownloads")); System.getProperty("user.dir").substring(0, 3) + "apqdownloads"));
if (!dir.exists()) dir.mkdirs(); if (!dir.exists()) dir.mkdirs();
list("upgrade", 0, 10000).getData().getRecords() list("upgrade", 1, 10000).getData().getRecords()
.parallelStream() .parallelStream()
.filter(m -> ObjectUtil.notEqual(m.get("version"), m.get("localVersion"))) .filter(m -> ObjectUtil.notEqual(m.get("version"), m.get("localVersion")))
.forEach(m -> { .forEach(m -> {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论