Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datamanage
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
shenjinzhu
datamanage
Commits
9b83ec7e
Commit
9b83ec7e
authored
Apr 21, 2018
by
admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a27ef8a3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/main/java/com/zhiwei/manage/handle/MainThread.java
+7
-6
No files found.
src/main/java/com/zhiwei/manage/handle/MainThread.java
View file @
9b83ec7e
...
...
@@ -41,13 +41,13 @@ public class MainThread extends Thread {
public
static
Map
<
String
,
Template
>
allTmp
=
new
ConcurrentHashMap
<
String
,
Template
>();
public
static
Map
<
String
,
String
>
map
=
new
HashMap
<>();
static
ESUtil
es
=
new
ESUtil
();
static
Map
<
String
,
Integer
>
counts
=
new
HashMap
<>();
static
Map
<
String
,
Integer
>
counts
=
new
HashMap
<>();
static
{
counts
.
put
(
"网媒"
,
1200
);
counts
.
put
(
"微博"
,
2000
);
counts
.
put
(
"微信"
,
3500
);
counts
.
put
(
"知乎"
,
300
);
//
counts.put("平媒", 300);
//
counts.put("平媒", 300);
}
public
MainThread
()
{
...
...
@@ -185,10 +185,11 @@ public class MainThread extends Thread {
data
.
setTime
(
start
.
getTime
());
dataService
.
insert
(
data
);
log
.
info
(
sdf
.
format
(
start
.
getTime
())
+
"|"
+
chan
.
getPt
()
+
"|入库"
);
if
(
count
<
counts
.
get
(
chan
.
getPt
()))
{
Messages
m
=
new
Messages
();
m
.
setTitle
(
"渠道低数据量预警{"
+
chan
.
getPt
()+
"}"
);
m
.
setContent
(
"1小时内的数据量为:"
+
count
);
if
(
counts
.
get
(
chan
.
getPt
())
!=
null
)
if
(
count
<
counts
.
get
(
chan
.
getPt
()))
{
Messages
m
=
new
Messages
();
m
.
setTitle
(
"渠道低数据量预警{"
+
chan
.
getPt
()
+
"}"
);
m
.
setContent
(
"1小时内的数据量为:"
+
count
);
SendMailUtil
.
sendMessage
(
Config
.
getVal
(
"count_mail"
),
m
);
}
}
catch
(
Exception
e
)
{
...
...
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