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

修改登录鉴权时间

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