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
018e24cf
Commit
018e24cf
authored
Apr 11, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加文件压缩
parent
e5513db3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
base-manager/src/main/java/com/mortals/xhx/module/skin/service/impl/SkinBaseServiceImpl.java
...als/xhx/module/skin/service/impl/SkinBaseServiceImpl.java
+11
-4
No files found.
base-manager/src/main/java/com/mortals/xhx/module/skin/service/impl/SkinBaseServiceImpl.java
View file @
018e24cf
...
...
@@ -321,10 +321,17 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
if
(!
file
.
exists
())
{
continue
;
}
try
{
zip
.
putNextEntry
(
new
ZipEntry
(
filePath
));
IOUtils
.
write
(
FileUtil
.
readBytes
(
file
),
zip
);
}
catch
(
Exception
e
)
{
log
.
error
(
"异常"
,
e
);
}
log
.
info
(
"file:"
+
file
.
getPath
());
/*
log.info("file:"+file.getPath());
ZipUtil
.
append
(
zipFile
.
toPath
(),
file
.
toPath
(),
StandardCopyOption
.
REPLACE_EXISTING
);
ZipUtil.append(zipFile.toPath(), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
*/
/*
try {
zip.putNextEntry(new ZipEntry(filePath));
...
...
@@ -342,9 +349,9 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
FileUtil.writeToStream(downloadFile, outputStream);*/
byte
[]
bytes
=
FileUtil
.
readBytes
(
zipFile
);
//
byte[] bytes = FileUtil.readBytes(zipFile);
return
Rest
.
ok
(
bytes
);
return
Rest
.
ok
(
outputStream
.
toByteArray
()
);
}
/**
...
...
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