Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
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
YZG
yzg-util
Commits
4ab049b6
Commit
4ab049b6
authored
May 08, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Excel导出功能
parent
0f0d6ff2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
ObjectHelper.java
...src/main/java/com/yanzuoguang/util/base/ObjectHelper.java
+1
-1
ZipHelper.java
.../src/main/java/com/yanzuoguang/util/helper/ZipHelper.java
+4
-1
No files found.
yzg-util-base/src/main/java/com/yanzuoguang/util/base/ObjectHelper.java
View file @
4ab049b6
...
@@ -559,7 +559,7 @@ public class ObjectHelper {
...
@@ -559,7 +559,7 @@ public class ObjectHelper {
public
static
<
T
>
ArrayList
<
T
>
getList
(
Class
<
T
>
cls
,
Object
froms
)
{
public
static
<
T
>
ArrayList
<
T
>
getList
(
Class
<
T
>
cls
,
Object
froms
)
{
ArrayList
<
T
>
tos
=
new
ArrayList
<
T
>();
ArrayList
<
T
>
tos
=
new
ArrayList
<
T
>();
if
(
froms
instanceof
List
)
{
if
(
froms
instanceof
List
)
{
List
vCodeFrom
=
(
List
)
((
froms
instanceof
List
)
?
froms
:
n
ull
);
List
vCodeFrom
=
(
List
)
((
froms
instanceof
List
)
?
froms
:
n
ew
ArrayList
<>()
);
for
(
Object
from
:
vCodeFrom
)
{
for
(
Object
from
:
vCodeFrom
)
{
if
(
StringHelper
.
isEmpty
(
from
))
{
if
(
StringHelper
.
isEmpty
(
from
))
{
continue
;
continue
;
...
...
yzg-util-base/src/main/java/com/yanzuoguang/util/helper/ZipHelper.java
View file @
4ab049b6
...
@@ -37,7 +37,10 @@ public class ZipHelper {
...
@@ -37,7 +37,10 @@ public class ZipHelper {
* @Title: zipDirectory
* @Title: zipDirectory
*/
*/
public
static
void
zipDirectory
(
File
dirFile
,
File
zipFile
)
throws
IOException
{
public
static
void
zipDirectory
(
File
dirFile
,
File
zipFile
)
throws
IOException
{
if
(
dirFile
==
null
||
!
dirFile
.
isDirectory
())
{
if
(
dirFile
==
null
)
{
throw
new
CodeException
(
"压缩时文件夹对象不能为空。"
);
}
if
(!
dirFile
.
isDirectory
())
{
throw
new
CodeException
(
"["
+
dirFile
.
getName
()
+
"]不是一个文件夹,或者不存在。"
);
throw
new
CodeException
(
"["
+
dirFile
.
getName
()
+
"]不是一个文件夹,或者不存在。"
);
}
}
if
(
zipFile
==
null
)
{
if
(
zipFile
==
null
)
{
...
...
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