Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
d9a2570b
Commit
d9a2570b
authored
Feb 24, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据代码检查工具处理阻断漏洞 0224
parent
b0c6ee8b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
17 deletions
+12
-17
FileUtils.java
...in/java/com/yeejoin/amos/fas/business/util/FileUtils.java
+11
-15
SignController.java
...n/amos/boot/module/jcs/biz/controller/SignController.java
+1
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-fas-biz/src/main/java/com/yeejoin/amos/fas/business/util/FileUtils.java
View file @
d9a2570b
...
@@ -75,20 +75,20 @@ public class FileUtils {
...
@@ -75,20 +75,20 @@ public class FileUtils {
* @return
* @return
*/
*/
public
static
String
fileToZip
(
List
<
String
>
list
,
String
fileName
,
String
ipUrl
)
{
public
static
String
fileToZip
(
List
<
String
>
list
,
String
fileName
,
String
ipUrl
)
{
InputStream
fis
=
null
;
BufferedInputStream
bis
=
null
;
FileOutputStream
fos
=
null
;
ZipOutputStream
zos
=
null
;
// 临时目录
// 临时目录
String
path
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
fileName
;
String
path
=
System
.
getProperty
(
"java.io.tmpdir"
)
+
fileName
;
try
{
File
zipFile
=
new
File
(
path
);
File
zipFile
=
new
File
(
path
);
zipFile
.
deleteOnExit
();
zipFile
.
deleteOnExit
();
try
{
zipFile
.
createNewFile
();
zipFile
.
createNewFile
();
}
catch
(
IOException
e
)
{
fos
=
new
FileOutputStream
(
zipFile
);
e
.
printStackTrace
();
zos
=
new
ZipOutputStream
(
new
BufferedOutputStream
(
fos
));
}
InputStream
fis
=
null
;
BufferedInputStream
bis
=
null
;
try
(
FileOutputStream
fos
=
new
FileOutputStream
(
zipFile
);
ZipOutputStream
zos
=
new
ZipOutputStream
(
new
BufferedOutputStream
(
fos
));)
{
byte
[]
bufs
=
new
byte
[
1024
*
10
];
byte
[]
bufs
=
new
byte
[
1024
*
10
];
for
(
String
a
:
list
)
{
for
(
String
a
:
list
)
{
fis
=
getInputStreamFromURL
(
ipUrl
+
a
);
fis
=
getInputStreamFromURL
(
ipUrl
+
a
);
...
@@ -105,9 +105,6 @@ public class FileUtils {
...
@@ -105,9 +105,6 @@ public class FileUtils {
}
}
}
}
System
.
out
.
println
(
"压缩成功"
);
System
.
out
.
println
(
"压缩成功"
);
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
...
@@ -116,12 +113,11 @@ public class FileUtils {
...
@@ -116,12 +113,11 @@ public class FileUtils {
if
(
null
!=
bis
)
{
if
(
null
!=
bis
)
{
bis
.
close
();
bis
.
close
();
}
}
if
(
null
!=
zo
s
)
{
if
(
null
!=
fi
s
)
{
zo
s
.
close
();
fi
s
.
close
();
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
);
}
}
}
}
return
path
;
return
path
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/SignController.java
View file @
d9a2570b
...
@@ -108,9 +108,8 @@ public class SignController extends BaseController {
...
@@ -108,9 +108,8 @@ public class SignController extends BaseController {
signDto
.
setPersonPhotos
(
personImg
.
get
(
0
).
getValue
());
signDto
.
setPersonPhotos
(
personImg
.
get
(
0
).
getValue
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
return
ResponseHelper
.
buildResponse
(
signDto
);
}
}
return
ResponseHelper
.
buildResponse
(
signDto
);
}
}
...
...
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