提交 56fc07a9 authored 作者: yangli's avatar yangli

.

上级 d48396e6
......@@ -130,7 +130,7 @@ public class ProgramController {
}
@GetMapping(value = "{type}/download_and_install")
public R<String> downloadAndInstall(@PathVariable @Pattern(regexp = "install|upgrade") String type,
public void downloadAndInstall(@PathVariable @Pattern(regexp = "install|upgrade") String type,
@RequestParam @NotNull Long id,
@RequestParam @NotBlank String url,
HttpServletResponse response) throws IOException {
......@@ -177,8 +177,7 @@ public class ProgramController {
}
}));
MAP.get(key).start();*/
return R.success(file.getPath());
DOWNLOAD_PATH_MAP.put(key, file.getPath());
}
/*@GetMapping(value = "{type}/is_installing")
......@@ -187,6 +186,14 @@ public class ProgramController {
return R.success(MAP.containsKey(type + "-" + id));
}*/
private static final Map<String, String> DOWNLOAD_PATH_MAP = new ConcurrentHashMap<>();
@GetMapping(value = "{type}/get_download_path")
public R<String> getDownloadPath(@PathVariable @Pattern(regexp = "install|upgrade") String type,
@RequestParam @NotNull Long id) {
return R.success(DOWNLOAD_PATH_MAP.get(type + "-" + id));
}
@GetMapping(value = "{type}/install_success")
public R<Void> installSuccess(@PathVariable @Pattern(regexp = "install|upgrade") String type,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论