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

修改登录鉴权时间

parent eb2a5b93
...@@ -7,6 +7,7 @@ import cn.hutool.db.DbUtil; ...@@ -7,6 +7,7 @@ import cn.hutool.db.DbUtil;
import cn.hutool.system.OsInfo; import cn.hutool.system.OsInfo;
import cn.hutool.system.SystemUtil; import cn.hutool.system.SystemUtil;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.util.ThreadPool;
import com.mortals.xhx.base.system.upload.service.UploadService; import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.code.ProductDisEnum; import com.mortals.xhx.common.code.ProductDisEnum;
import com.mortals.xhx.common.code.ProjectStatusEnum; import com.mortals.xhx.common.code.ProjectStatusEnum;
...@@ -101,14 +102,6 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec ...@@ -101,14 +102,6 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
ZipUtils.unGzip(inputStream, setupProjectEntity.getProjectPath()); ZipUtils.unGzip(inputStream, setupProjectEntity.getProjectPath());
if(inputStream!=null){
try {
inputStream.close();
} catch (IOException e) {
// throw new RuntimeException(e);
}
}
String publicPath = setupProjectEntity.getProjectPath() + ProductDisEnum.getByValue(setupProjectEntity.getProjectCode()).getValue(); String publicPath = setupProjectEntity.getProjectPath() + ProductDisEnum.getByValue(setupProjectEntity.getProjectCode()).getValue();
//导入数据库业务 //导入数据库业务
...@@ -120,10 +113,10 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec ...@@ -120,10 +113,10 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
dbSetupEntity.setPassword(setupProjectEntity.getDbPassword()); dbSetupEntity.setPassword(setupProjectEntity.getDbPassword());
dbSetupEntity.setDbFilePath(publicPath + "/db/base.sql"); dbSetupEntity.setDbFilePath(publicPath + "/db/base.sql");
log.info("数据库db路径!{}", dbSetupEntity.getDbFilePath()); log.info("数据库db路径!{}", dbSetupEntity.getDbFilePath());
/* Rest<String> dbRest = setupDbService.initDb(dbSetupEntity); Rest<String> dbRest = setupDbService.initDb(dbSetupEntity);
if (YesNoEnum.YES.getValue() != dbRest.getCode()) { if (YesNoEnum.YES.getValue() != dbRest.getCode()) {
log.info("数据库初始化成功!"); log.info("数据库初始化成功!");
}*/ }
setupProjectEntity.setProjectStatus(ProjectStatusEnum.已部署.getValue()); setupProjectEntity.setProjectStatus(ProjectStatusEnum.已部署.getValue());
this.update(setupProjectEntity); this.update(setupProjectEntity);
...@@ -133,8 +126,11 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec ...@@ -133,8 +126,11 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
//todo 执行部署脚本 //todo 执行部署脚本
//后端服务,创建service 启动服务 //后端服务,创建service 启动服务
//RuntimeUtil.exec() //RuntimeUtil.exec()
log.info("执行deploy shell 脚本 或者构造文件,{}",publicPath+"/bin/");
Runnable runnable = new Runnable() {
@Override
public void run() {
log.info("执行deploy shell 脚本 或者构造文件,{}",publicPath+"/bin/");
try { try {
Thread.sleep(10000); Thread.sleep(10000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
...@@ -142,6 +138,12 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec ...@@ -142,6 +138,12 @@ public class SetupProjectServiceImpl extends AbstractCRUDServiceImpl<SetupProjec
} }
callScript("project_deploy.sh","4",publicPath+"/bin/"); callScript("project_deploy.sh","4",publicPath+"/bin/");
}
};
ThreadPool.getInstance().execute(runnable);
//callScript("project_deploy.sh","4",publicPath+"/bin/");
} else if (SystemUtil.getOsInfo().isWindows()) { } else if (SystemUtil.getOsInfo().isWindows()) {
//todo //todo
} }
......
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