Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setup-manager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
setup-manager
Commits
a4f7bd2e
Commit
a4f7bd2e
authored
Oct 29, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改登录鉴权时间
parent
eb2a5b93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/service/impl/SetupProjectServiceImpl.java
...hx/module/setup/service/impl/SetupProjectServiceImpl.java
+19
-17
No files found.
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/service/impl/SetupProjectServiceImpl.java
View file @
a4f7bd2e
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment