Commit f40d7445 authored by 赵啸非's avatar 赵啸非

添加区域树

parent 4fdc8e61
...@@ -228,6 +228,7 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec ...@@ -228,6 +228,7 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
buildLogManagerUi(context); buildLogManagerUi(context);
return Rest.ok(); return Rest.ok();
} }
......
...@@ -271,7 +271,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se ...@@ -271,7 +271,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
if (YesNoEnum.YES.getValue() == siteAddRest.getCode()) { if (YesNoEnum.YES.getValue() == siteAddRest.getCode()) {
//更新所有项目的站点编码与名称 //更新所有项目的站点编码与名称
this.service.find(new SetupProjectQuery()).forEach(setupProjectEntity->{ this.service.find(new SetupProjectQuery()).forEach(setupProjectEntity -> {
setupProjectEntity.setSiteName(siteAddRest.getData().getSiteName()); setupProjectEntity.setSiteName(siteAddRest.getData().getSiteName());
setupProjectEntity.setSiteCode(siteAddRest.getData().getSiteCode()); setupProjectEntity.setSiteCode(siteAddRest.getData().getSiteCode());
setupProjectEntity.setSiteId(siteAddRest.getData().getId()); setupProjectEntity.setSiteId(siteAddRest.getData().getId());
...@@ -283,11 +283,11 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se ...@@ -283,11 +283,11 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
//todo 更加站点编码生成基础服务应用,并部署到/home/publish/app/ 目录下 //todo 更加站点编码生成基础服务应用,并部署到/home/publish/app/ 目录下
//todo 在/home/publish/app/ 目录下 创建自助服务应用 //todo 在/home/publish/app/ 目录下 创建自助服务应用
String projectPath = this.publishPath + "/app/"+siteAddRest.getData().getSiteCode(); String projectPath = this.publishPath + "/app/" + siteAddRest.getData().getSiteCode();
//解压资源文件 //解压资源文件
String sourcePath = this.publishPath + "/temp/project/" + 基础服务.getValue() + "/app.tar.gz"; String sourcePath = this.publishPath + "/temp/project/" + 基础服务.getValue() + "/app.tar.gz";
File file = new File(sourcePath); File file = new File(sourcePath);
log.info("文件存在:{} ,文件地址:{}", file.exists(),sourcePath); log.info("文件存在:{} ,文件地址:{}", file.exists(), sourcePath);
File destDir = new File(projectPath); File destDir = new File(projectPath);
if (!file.exists()) { if (!file.exists()) {
throw new AppException("请上传项目工程文件!"); throw new AppException("请上传项目工程文件!");
...@@ -301,8 +301,19 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se ...@@ -301,8 +301,19 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
ua.setDestDirectory(destDir); ua.setDestDirectory(destDir);
ua.extract(); ua.extract();
//todo 更新门户站点信息,用户站点树等
projectPath = this.publishPath + "/app/";
//解压资源文件
sourcePath = this.publishPath + "/temp/project/" + 基础服务.getValue() + "/other.tar.gz";
file = new File(sourcePath);
destDir = new File(projectPath);
manager.initialize();
ua.enableLogging(manager.getLoggerForComponent("bla"));
ua.setSourceFile(file);
destDir.mkdirs();
ua.setDestDirectory(destDir);
ua.extract();
//todo 更新门户站点信息,用户站点树等
} else { } else {
...@@ -340,7 +351,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se ...@@ -340,7 +351,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
try { try {
//todo 在/home/publish/app/ 目录下 创建自助服务应用 //todo 在/home/publish/app/ 目录下 创建自助服务应用
String projectPath = this.publishPath + "/app/"+siteEntity.getSiteCode(); String projectPath = this.publishPath + "/app/" + siteEntity.getSiteCode();
boolean exist = FileUtil.exist(projectPath); boolean exist = FileUtil.exist(projectPath);
if (!exist) { if (!exist) {
FileUtil.mkdir(projectPath); FileUtil.mkdir(projectPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment