Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
DQMP
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
data
DQMP
Commits
293d715a
Commit
293d715a
authored
Dec 24, 2019
by
赵建伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update codes
parent
5f4fe16b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
16 deletions
+16
-16
DqScheduler.java
src/main/java/com/gmei/data/dqmp/scheduler/DqScheduler.java
+5
-5
CheckServiceImpl.java
...ava/com/gmei/data/dqmp/service/impl/CheckServiceImpl.java
+6
-6
MonitorServiceImpl.java
...a/com/gmei/data/dqmp/service/impl/MonitorServiceImpl.java
+4
-4
application-prod.yml
src/main/resources/application-prod.yml
+1
-1
No files found.
src/main/java/com/gmei/data/dqmp/scheduler/DqScheduler.java
View file @
293d715a
...
...
@@ -16,27 +16,27 @@ public class DqScheduler {
@Autowired
private
MonitorService
monitorService
;
@Scheduled
(
cron
=
"0
*/100 *
* * ?"
)
@Scheduled
(
cron
=
"0
10 15
* * ?"
)
private
void
uniqueCheckProcess
(){
checkService
.
checkAndPersistSimpleResult
(
Constants
.
CHECK_UNIQUE
);
}
@Scheduled
(
cron
=
"
10 */100 *
* * ?"
)
@Scheduled
(
cron
=
"
0 20 15
* * ?"
)
private
void
unblankCheckProcess
(){
checkService
.
checkAndPersistSimpleResult
(
Constants
.
CHECK_UNBLANK
);
}
@Scheduled
(
cron
=
"0
*/100 *
* * ?"
)
@Scheduled
(
cron
=
"0
30 15
* * ?"
)
private
void
referCheckProcess
(){
checkService
.
checkAndPersistMultipleResult
(
Constants
.
CHECK_REFER
);
}
@Scheduled
(
cron
=
"0
*/100 *
* * ?"
)
@Scheduled
(
cron
=
"0
40 15
* * ?"
)
private
void
volatilityMonitorProcess
(){
monitorService
.
monitorAndPersistVolatilityResult
(
Constants
.
MONITOR_PV
);
}
@Scheduled
(
cron
=
"0
*/100 *
* * ?"
)
@Scheduled
(
cron
=
"0
50 15
* * ?"
)
private
void
specialMonitorProcess
(){
monitorService
.
monitorAndPersistSpecialResult
();
}
...
...
src/main/java/com/gmei/data/dqmp/service/impl/CheckServiceImpl.java
View file @
293d715a
...
...
@@ -72,7 +72,7 @@ public class CheckServiceImpl implements CheckService {
return
;
}
else
{
Double
uniqueRate
=
uniqueCheckResult
.
getUniqueRate
();
if
(
uniqueRate
<=
threshold
)
{
if
(
null
!=
uniqueRate
&&
uniqueRate
<
threshold
)
{
mailService
.
sendSimpleMail
(
uniqueCheckResult
.
toString
());
dingdingService
.
sendMsgToDingding
(
uniqueCheckResult
.
toString
());
}
...
...
@@ -86,7 +86,7 @@ public class CheckServiceImpl implements CheckService {
return
;
}
else
{
Double
unblankRate
=
tblResultCheckUnblank
.
getUnblankRate
();
if
(
unblankRate
<=
threshold
)
{
if
(
null
!=
unblankRate
&&
unblankRate
<
threshold
)
{
mailService
.
sendSimpleMail
(
tblResultCheckUnblank
.
toString
());
dingdingService
.
sendMsgToDingding
(
tblResultCheckUnblank
.
toString
());
}
...
...
@@ -125,7 +125,7 @@ public class CheckServiceImpl implements CheckService {
return
;
}
else
{
Double
matchedRate
=
referCheckResult
.
getMatchedRate
();
if
(
matchedRate
<=
threshold
)
{
if
(
null
!=
matchedRate
&&
matchedRate
<
threshold
)
{
mailService
.
sendSimpleMail
(
referCheckResult
.
toString
());
dingdingService
.
sendMsgToDingding
(
referCheckResult
.
toString
());
}
...
...
@@ -147,7 +147,7 @@ public class CheckServiceImpl implements CheckService {
* @return
*/
private
TblResultCheckUnique
getUniqueCheckResult
(
String
sql
)
{
sql
=
sql
.
replaceAll
(
"#part
a
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
sql
=
sql
.
replaceAll
(
"#part
i
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
logger
.
info
(
"Sql content : {}"
,
sql
);
TblResultCheckUnique
tblResultCheckUnique
=
null
;
if
(
StringUtils
.
isBlank
(
sql
))
{
...
...
@@ -183,7 +183,7 @@ public class CheckServiceImpl implements CheckService {
* @return
*/
private
TblResultCheckUnblank
getUnblankCheckResult
(
String
sql
)
{
sql
=
sql
.
replaceAll
(
"#part
a
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
sql
=
sql
.
replaceAll
(
"#part
i
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
logger
.
info
(
"Sql content : {}"
,
sql
);
TblResultCheckUnblank
tblResultCheckUnblank
=
null
;
if
(
StringUtils
.
isBlank
(
sql
))
{
...
...
@@ -219,7 +219,7 @@ public class CheckServiceImpl implements CheckService {
* @return
*/
private
TblResultCheckRefer
getReferCheckResult
(
String
sql
)
{
sql
=
sql
.
replaceAll
(
"#part
a
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
sql
=
sql
.
replaceAll
(
"#part
i
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
logger
.
info
(
"Sql content : {}"
,
sql
);
TblResultCheckRefer
tblResultCheckRefer
=
null
;
if
(
StringUtils
.
isBlank
(
sql
))
{
...
...
src/main/java/com/gmei/data/dqmp/service/impl/MonitorServiceImpl.java
View file @
293d715a
...
...
@@ -68,7 +68,7 @@ public class MonitorServiceImpl implements MonitorService {
return
;
}
else
{
Long
indicatorValue
=
tblResultMonitorVolatility
.
getIndicatorValue
();
if
(
indicatorValue
<=
threshold
)
{
if
(
null
!=
indicatorValue
&&
indicatorValue
<
threshold
)
{
mailService
.
sendSimpleMail
(
tblResultMonitorVolatility
.
toString
());
dingdingService
.
sendMsgToDingding
(
tblResultMonitorVolatility
.
toString
());
}
...
...
@@ -103,7 +103,7 @@ public class MonitorServiceImpl implements MonitorService {
return
;
}
else
{
Long
indicatorValue
=
tblResultMonitorSpecial
.
getIndicatorValue
();
if
(
indicatorValue
<=
threshold
)
{
if
(
null
!=
indicatorValue
&&
indicatorValue
<
threshold
)
{
mailService
.
sendSimpleMail
(
tblResultMonitorSpecial
.
toString
());
dingdingService
.
sendMsgToDingding
(
tblResultMonitorSpecial
.
toString
());
}
...
...
@@ -125,7 +125,7 @@ public class MonitorServiceImpl implements MonitorService {
* @return
*/
private
TblResultMonitorVolatility
getMonitorVolatilityResult
(
String
sql
,
String
indicatorType
)
{
sql
=
sql
.
replaceAll
(
"#part
a
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
sql
=
sql
.
replaceAll
(
"#part
i
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
logger
.
info
(
"Sql content : {},indicatorType: {}"
,
sql
,
indicatorType
);
TblResultMonitorVolatility
tblResultMonitorVolatility
=
null
;
if
(
StringUtils
.
isBlank
(
sql
)
||
StringUtils
.
isBlank
(
indicatorType
))
{
...
...
@@ -161,7 +161,7 @@ public class MonitorServiceImpl implements MonitorService {
* @return
*/
private
TblResultMonitorSpecial
getMonitorSpecialResult
(
String
sql
)
{
sql
=
sql
.
replaceAll
(
"#part
a
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
sql
=
sql
.
replaceAll
(
"#part
i
tion_date"
,
String
.
format
(
"'%s'"
,
DateUtils
.
getYesterdayDateStr
()));
logger
.
info
(
"Sql content : {}"
,
sql
);
TblResultMonitorSpecial
tblResultMonitorSpecial
=
null
;
if
(
StringUtils
.
isBlank
(
sql
))
{
...
...
src/main/resources/application-prod.yml
View file @
293d715a
...
...
@@ -19,7 +19,7 @@ spring:
datasource
:
#---mysql config---
driverClassName
:
com.mysql.jdbc.Driver
url
:
jdbc:mysql://1
52.136.57.57
:3306/dqmp?useSSL=false
url
:
jdbc:mysql://1
72.18.44.3
:3306/dqmp?useSSL=false
username
:
root
password
:
5OqYM^zLwotJ3oSo
...
...
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