Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-cloud
Overview
Overview
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
data-hook
gic-cloud
Commits
b6f06a15
Commit
b6f06a15
authored
Jun 15, 2022
by
fudahua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!50
parents
27cb83ac
7a5a41ce
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
195 additions
and
54 deletions
+195
-54
FreeQueryTaskCondition.java
...ic/cloud/data/hook/api/entity/FreeQueryTaskCondition.java
+10
-0
FileUtil.java
...c/main/java/com/gic/cloud/data/hook/service/FileUtil.java
+62
-0
FlatQueryResultServiceImpl.java
...ud/data/hook/service/impl/FlatQueryResultServiceImpl.java
+123
-54
FreeQueryServiceImpl.java
...ic/cloud/data/hook/service/impl/FreeQueryServiceImpl.java
+0
-0
No files found.
gic-cloud-data-hook-api/src/main/java/com/gic/cloud/data/hook/api/entity/FreeQueryTaskCondition.java
View file @
b6f06a15
...
...
@@ -114,4 +114,14 @@ public class FreeQueryTaskCondition implements Serializable {
public
void
setDesensiType
(
Integer
desensiType
)
{
this
.
desensiType
=
desensiType
;
}
private
int
amount
;
public
int
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
int
amount
)
{
this
.
amount
=
amount
;
}
}
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/FileUtil.java
0 → 100644
View file @
b6f06a15
package
com
.
gic
.
cloud
.
data
.
hook
.
service
;
import
com.ctrip.framework.apollo.Config
;
import
com.ctrip.framework.apollo.ConfigService
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.util.List
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
public
class
FileUtil
{
private
static
final
int
BUFFER_SIZE
=
2
*
1024
;
/**
* 压缩zip
* @param srcFiles
* @param out
* @throws RuntimeException
*/
public
static
void
toZip
(
List
<
File
>
srcFiles
,
OutputStream
out
)
throws
RuntimeException
{
long
start
=
System
.
currentTimeMillis
();
ZipOutputStream
zos
=
null
;
try
{
zos
=
new
ZipOutputStream
(
out
);
for
(
File
srcFile
:
srcFiles
)
{
byte
[]
buf
=
new
byte
[
BUFFER_SIZE
];
zos
.
putNextEntry
(
new
ZipEntry
(
srcFile
.
getName
()));
int
len
;
FileInputStream
in
=
new
FileInputStream
(
srcFile
);
while
((
len
=
in
.
read
(
buf
))
!=
-
1
)
{
zos
.
write
(
buf
,
0
,
len
);
}
zos
.
closeEntry
();
in
.
close
();
}
long
end
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
"压缩完成,耗时:"
+
(
end
-
start
)
+
" ms"
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"zip error from ZipUtils"
,
e
);
}
finally
{
if
(
zos
!=
null
)
{
try
{
zos
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
/**
* 获取限制调试
* @return
*/
public
static
Integer
getLimitSize
(){
Config
appConfig
=
ConfigService
.
getAppConfig
();
return
appConfig
.
getIntProperty
(
"xls.size.limit"
,
1000000
);
}
}
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FlatQueryResultServiceImpl.java
View file @
b6f06a15
This diff is collapsed.
Click to expand it.
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FreeQueryServiceImpl.java
View file @
b6f06a15
This diff is collapsed.
Click to expand it.
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