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
06aa5294
Commit
06aa5294
authored
Apr 25, 2023
by
fudahua
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-2023-04' into 'developer'
feat: gaoj See merge request
!99
parents
2388ed1f
0e338de7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
DingWarningUtil.java
...java/com/gic/cloud/data/hook/service/DingWarningUtil.java
+28
-0
FlatQueryResultServiceImpl.java
...ud/data/hook/service/impl/FlatQueryResultServiceImpl.java
+4
-0
No files found.
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/DingWarningUtil.java
0 → 100644
View file @
06aa5294
package
com
.
gic
.
cloud
.
data
.
hook
.
service
;
import
com.ctrip.framework.apollo.Config
;
import
com.ctrip.framework.apollo.ConfigService
;
import
com.gic.commons.util.DingtalkMessageUtil
;
import
com.gic.commons.util.TraceIdUtil
;
import
com.gic.dubbo.entity.ProviderLocalTag
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
class
DingWarningUtil
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
DingWarningUtil
.
class
);
private
static
final
String
dingdingurl
=
"https://oapi.dingtalk.com/robot/send?access_token=1d6a0756fcfe5f215e3ed37d7e60960635d0009f71b476f3b402e7671fc2a8ca"
;
public
static
void
sendCountWarning
(
String
msg
)
{
Config
appConfig
=
ConfigService
.
getAppConfig
();
String
url
=
appConfig
.
getProperty
(
"ding.url"
,
dingdingurl
);
ProviderLocalTag
localTag
=
ProviderLocalTag
.
tag
.
get
();
String
traceId
=
localTag
.
traceId
;
try
{
msg
=
msg
+
": "
+
traceId
;
DingtalkMessageUtil
.
sendAlertMessage
(
msg
,
url
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"异常:{}"
,
e
);
}
}
}
gic-cloud-data-hook-service/src/main/java/com/gic/cloud/data/hook/service/impl/FlatQueryResultServiceImpl.java
View file @
06aa5294
...
@@ -966,6 +966,10 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
...
@@ -966,6 +966,10 @@ public class FlatQueryResultServiceImpl implements IFlatQueryResultService {
saveXlsSplitNew
(
currentFile
.
get
().
filepath
,
null
,
null
,
currentFile
.
get
(),
count
,
true
,
queryDataType
);
saveXlsSplitNew
(
currentFile
.
get
().
filepath
,
null
,
null
,
currentFile
.
get
(),
count
,
true
,
queryDataType
);
stopWatch
.
stop
();
stopWatch
.
stop
();
logger
.
info
(
"写入本地excel耗时:{}, 数量: {}-》{}"
,
stopWatch
.
getLastTaskTimeMillis
(),
task
.
getAmount
(),
total
);
logger
.
info
(
"写入本地excel耗时:{}, 数量: {}-》{}"
,
stopWatch
.
getLastTaskTimeMillis
(),
task
.
getAmount
(),
total
);
if
(
task
.
getAmount
()!=
total
.
intValue
())
{
String
msg
=
"取数任务:"
+
task
.
getId
()+
"下载数量对不上: 数量: "
+
task
.
getAmount
()+
"->"
+
total
;
DingWarningUtil
.
sendCountWarning
(
msg
);
}
stopWatch
.
start
();
stopWatch
.
start
();
//是否压缩
//是否压缩
boolean
zipFlag
=
(
xlsxFiles
.
size
()
>
1
)
?
true
:
false
;
boolean
zipFlag
=
(
xlsxFiles
.
size
()
>
1
)
?
true
:
false
;
...
...
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