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
f7c345f6
Commit
f7c345f6
authored
Jan 12, 2018
by
shenjinzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
每日统计数据量的修改mainThread
parent
332baa98
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
src/main/java/com/zhiwei/manage/handle/MainThread.java
+10
-6
No files found.
src/main/java/com/zhiwei/manage/handle/MainThread.java
View file @
f7c345f6
...
...
@@ -169,12 +169,13 @@ public class MainThread extends Thread {
int
count
=
0
;
List
<
Channel
>
channel
=
serverService
.
findDisChannel
();
for
(
Channel
chan
:
channel
)
{
try
{
if
(
chan
.
getPt
().
equals
(
"网媒"
))
{
List
<
CrawTemplate
>
list
=
crawService
.
findAll
();
// 每日的数据量入库(对应模板)
for
(
CrawTemplate
cr
:
list
)
{
count
=
(
int
)
dataService
.
finCountByDayData
(
start
.
getTime
(),
end
.
getTime
(),
cr
.
getPt
(),
cr
.
getId
());
count
=
(
int
)
dataService
.
finCountByDayData
(
start
.
getTime
(),
end
.
getTime
(),
cr
.
getPt
(),
cr
.
getId
());
Data
data
=
new
Data
();
data
.
setCount
(
count
);
data
.
setTempName
(
cr
.
getConfigName
());
...
...
@@ -197,16 +198,16 @@ public class MainThread extends Thread {
}
log
.
info
(
TimeUtil
.
yearToDay
(
start
.
getTime
())
+
"|"
+
data
.
getTempName
()
+
"|入库"
);
}
count
=
(
int
)
dataService
.
finCountByDayData
(
start
.
getTime
(),
end
.
getTime
(),
chan
.
getPt
(),
null
);
count
=
(
int
)
dataService
.
finCountByDayData
(
start
.
getTime
(),
end
.
getTime
(),
chan
.
getPt
(),
null
);
Data
data
=
new
Data
();
data
.
setCount
(
count
);
data
.
setPt
(
chan
.
getPt
());
data
.
setTime
(
start
.
getTime
());
dataService
.
insert
(
data
);
}
else
{
count
=
(
int
)
dataService
.
finCountByDayData
(
start
.
getTime
(),
end
.
getTime
(),
chan
.
getPt
(),
null
);
count
=
(
int
)
dataService
.
finCountByDayData
(
start
.
getTime
(),
end
.
getTime
(),
chan
.
getPt
(),
null
);
Data
data
=
new
Data
();
data
.
setCount
(
count
);
data
.
setPt
(
chan
.
getPt
());
...
...
@@ -214,6 +215,9 @@ public class MainThread extends Thread {
dataService
.
insert
(
data
);
log
.
info
(
TimeUtil
.
yearToDay
(
start
.
getTime
())
+
"|"
+
chan
.
getPt
()
+
"|入库"
);
}
}
catch
(
Exception
e
)
{
}
}
Set
<
String
>
keys
=
allTmp
.
keySet
();
for
(
Iterator
<
String
>
it
=
keys
.
iterator
();
it
.
hasNext
();)
{
...
...
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