Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
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
赵啸非
smart_gov_platform
Commits
6246dc14
Commit
6246dc14
authored
Dec 02, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改版本
parent
fcf6fca4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
base-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DemoStartedService.java
...als/xhx/daemon/applicationservice/DemoStartedService.java
+6
-0
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppServiceImpl.java
...m/mortals/xhx/module/app/service/impl/AppServiceImpl.java
+1
-1
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppVersionServiceImpl.java
...ls/xhx/module/app/service/impl/AppVersionServiceImpl.java
+7
-6
No files found.
base-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DemoStartedService.java
View file @
6246dc14
...
...
@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import
org.springframework.stereotype.Component
;
import
com.mortals.framework.springcloud.service.IApplicationStartedService
;
import
org.springframework.util.ObjectUtils
;
import
java.util.List
;
...
...
@@ -52,6 +53,11 @@ public class DemoStartedService implements IApplicationStartedService {
SyncTreeSiteThread
syncTreeSiteThread
=
new
SyncTreeSiteThread
(
contextTemp
);
ThreadPool
.
getInstance
().
execute
(
syncTreeSiteThread
);
if
(
ObjectUtils
.
isEmpty
(
userFeign
)){
logger
.
info
(
"userFeign未加载"
);
return
;
}
userFeign
.
list
(
new
UserPdu
()).
getData
().
getData
().
stream
().
forEach
(
userPdu
->{
Context
context
=
new
Context
();
...
...
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppServiceImpl.java
View file @
6246dc14
...
...
@@ -268,7 +268,7 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
versionEntity
.
initAttrValue
();
versionEntity
.
setAppId
(
entity
.
getId
());
versionEntity
.
setAppName
(
entity
.
getAppName
());
versionEntity
.
setVersion
(
versionNum
++
);
versionEntity
.
setVersion
(
++
versionNum
);
versionEntity
.
setNotes
(
entity
.
getNotes
());
versionEntity
.
setFileName
(
entity
.
getFileName
());
versionEntity
.
setFilePath
(
entity
.
getFilePath
());
...
...
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppVersionServiceImpl.java
View file @
6246dc14
...
...
@@ -44,12 +44,12 @@ public class AppVersionServiceImpl extends AbstractCRUDServiceImpl<AppVersionDao
@Override
public
Rest
<
String
>
appDistribute
(
AppVersionEntity
appVersionEntity
,
Context
context
)
{
distributeFile
(
appVersionEntity
,
context
);
AppEntity
appEntity
=
appService
.
get
(
appVersionEntity
.
getAppId
(),
context
);
distributeFile
(
appVersionEntity
,
appEntity
,
context
);
return
Rest
.
ok
(
"部署应用成功!"
);
}
private
AppEntity
distributeFile
(
AppVersionEntity
appVersionEntity
,
Context
context
)
{
AppEntity
appEntity
=
appService
.
get
(
appVersionEntity
.
getAppId
(),
context
);
private
String
distributeFile
(
AppVersionEntity
appVersionEntity
,
AppEntity
appEntity
,
Context
context
)
{
SiteEntity
siteCache
=
siteService
.
getCache
(
appEntity
.
getSiteId
().
toString
());
//判断文件是否存在
String
targetFilePath
=
uploadService
.
getFilePath
(
appVersionEntity
.
getFilePath
());
...
...
@@ -71,17 +71,18 @@ public class AppVersionServiceImpl extends AbstractCRUDServiceImpl<AppVersionDao
FileUtil
.
del
(
disPath
);
}
ZipUtils
.
unzip
(
new
File
(
targetFilePath
),
disPath
);
return
appEntity
;
return
disPath
;
}
@Override
public
Rest
<
Void
>
appUsed
(
AppVersionEntity
appVersionEntity
,
Context
context
)
{
//使用 部署
AppEntity
appEntity
=
distributeFile
(
appVersionEntity
,
context
);
// ZipUtil.unzip(targetFilePath, disPath
);
AppEntity
appEntity
=
appService
.
get
(
appVersionEntity
.
getAppId
()
,
context
);
String
disPath
=
distributeFile
(
appVersionEntity
,
appEntity
,
context
);
//更新app版本使用
appVersionEntity
.
setUsed
(
YesNoEnum
.
YES
.
getValue
());
appVersionEntity
.
setDistributeFilePath
(
disPath
);
this
.
getDao
().
update
(
new
AppVersionQuery
().
appId
(
appVersionEntity
.
getAppId
()).
used
(
YesNoEnum
.
NO
.
getValue
()));
this
.
update
(
appVersionEntity
,
context
);
...
...
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