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
5516cb8d
Commit
5516cb8d
authored
Feb 19, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加修改终端访问ip
parent
869e06c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
setup-project-manager/src/main/java/com/mortals/xhx/daemon/task/CheckProjectStatusTaskImpl.java
...m/mortals/xhx/daemon/task/CheckProjectStatusTaskImpl.java
+12
-8
No files found.
setup-project-manager/src/main/java/com/mortals/xhx/daemon/task/CheckProjectStatusTaskImpl.java
View file @
5516cb8d
...
...
@@ -27,9 +27,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
java.io.File
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.*
;
/**
* 检测项目运行状态
...
...
@@ -48,10 +46,16 @@ public class CheckProjectStatusTaskImpl implements ITaskExcuteService {
log
.
info
(
"检测项目运行状态任务完毕!"
);
//更新项目服务ip
List
<
SetupProjectEntity
>
setupProjectEntities
=
setupProjectService
.
find
(
new
SetupProjectQuery
()
.
projectType
(
ProjectTypeEnum
.
后端
.
getValue
())
.
projectStatus
(
ProjectStatusEnum
.
运行中
.
getValue
())
.
clientToServerIpStatus
(
YesNoEnum
.
NO
.
getValue
()));
SetupProjectQuery
setupProjectQuery
=
new
SetupProjectQuery
();
setupProjectQuery
.
setProjectTypeList
(
new
ArrayList
<
Integer
>()
{{
add
(
ProjectTypeEnum
.
后端
.
getValue
());
add
(
ProjectTypeEnum
.
PHP后端
.
getValue
());
}});
setupProjectQuery
.
setProjectStatus
(
ProjectStatusEnum
.
运行中
.
getValue
());
setupProjectQuery
.
setClientToServerIpStatus
(
YesNoEnum
.
NO
.
getValue
());
List
<
SetupProjectEntity
>
setupProjectEntities
=
setupProjectService
.
find
(
setupProjectQuery
);
for
(
SetupProjectEntity
setupProjectEntity
:
setupProjectEntities
)
{
if
(!
ObjectUtils
.
isEmpty
(
setupProjectEntity
.
getClientToServerIp
())
&&
setupProjectEntity
.
getProjectCode
().
equals
(
ProductDisEnum
.
基础服务后端
.
getValue
()))
{
...
...
@@ -93,7 +97,7 @@ public class CheckProjectStatusTaskImpl implements ITaskExcuteService {
params
.
put
(
"innerServerIp"
,
setupProjectEntity
.
getInnerServerIp
());
params
.
put
(
"domain"
,
setupProjectEntity
.
getDomain
());
//更新基础服务
String
resp
=
HttpUtil
.
get
(
"http://127.0.0.1:11078/zwfw_api/api/edit_config/setHost"
,
params
);
String
resp
=
HttpUtil
.
get
(
"http://127.0.0.1:11078/zwfw_api/api/edit_config/setHost"
,
params
);
Rest
rest
=
JSON
.
parseObject
(
resp
,
Rest
.
class
);
if
(
YesNoEnum
.
YES
.
getValue
()
==
rest
.
getCode
())
{
setupProjectEntity
.
setClientToServerIpStatus
(
YesNoEnum
.
YES
.
getValue
());
...
...
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