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
6092c288
Commit
6092c288
authored
Nov 18, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
限流恢复 See merge request
!31
parents
4f6402cc
4e354163
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
FreeQueryServiceImpl.java
...ic/cloud/data/hook/service/impl/FreeQueryServiceImpl.java
+5
-3
No files found.
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FreeQueryServiceImpl.java
View file @
6092c288
...
...
@@ -485,6 +485,7 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
log
.
debug
(
"runDownloadTask.run"
,
"已生成自定义查询下载文件 "
+
condition
.
getTaskId
()
+
".xlsx"
);
}
String
cloudFileUrl
=
"https://"
;
String
taskFileExt
=
task
.
getUseCompress
().
equals
(
Global
.
YES
)
?
".zip"
:
task
.
getFormat
().
equals
(
DownloadFileFormat
.
CSV
)
?
".csv"
:
".xlsx"
;
if
(
task
.
getUseCompress
().
equals
(
Global
.
YES
))
{
log
.
debug
(
"runDownloadTask.run"
,
"准备生成自定义查询压缩文件 "
+
condition
.
getTaskId
()
+
".zip"
);
String
zipFilePath
=
SAVE_FOLDER
+
"/"
+
condition
.
getTaskId
()
+
".zip"
;
...
...
@@ -514,15 +515,16 @@ public class FreeQueryServiceImpl implements IFreeQueryService {
zos
.
closeEntry
();
zos
.
close
();
}
cloudFileUrl
+=
FileUploadUtil
.
simpleUploadFileFromLocal
(
zipFile
,
task
.
getId
(),
BucketNameEnum
.
COMPRESS_60000
.
getName
());
log
.
debug
(
"开始上传压缩文件到腾讯云"
,
task
.
getId
());
cloudFileUrl
+=
FileUploadUtil
.
simpleUploadFileFromLocal
(
zipFile
,
task
.
getName
()
+
"-"
+
task
.
getId
()+
taskFileExt
,
BucketNameEnum
.
COMPRESS_60000
.
getName
());
}
else
{
cloudFileUrl
+=
FileUploadUtil
.
simpleUploadFileFromLocal
(
new
File
(
originalFilePath
),
task
.
getId
(),
BucketNameEnum
.
REPORT_50000
.
getName
());
log
.
debug
(
"开始上传文件到腾讯云"
,
task
.
getId
());
cloudFileUrl
+=
FileUploadUtil
.
simpleUploadFileFromLocal
(
new
File
(
originalFilePath
),
task
.
getName
()
+
"-"
+
task
.
getId
()+
taskFileExt
,
BucketNameEnum
.
REPORT_50000
.
getName
());
}
log
.
debug
(
"上传腾讯云"
,
"地址为:"
+
cloudFileUrl
);
task
.
setStatus
(
DownloadTaskStatus
.
COMPLISHED
);
task
.
setOverTime
(
new
java
.
util
.
Date
());
String
taskFileExt
=
task
.
getUseCompress
().
equals
(
Global
.
YES
)
?
".zip"
:
task
.
getFormat
().
equals
(
DownloadFileFormat
.
CSV
)
?
".csv"
:
".xlsx"
;
task
.
setFilePath
(
cloudFileUrl
);
DownloadTaskServiceImpl
.
getInstance
().
updateDownloadTask
(
task
);
...
...
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