Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
searchhotcrawler
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
zhiwei
searchhotcrawler
Commits
58bf7554
Commit
58bf7554
authored
May 03, 2018
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推送时间调整
parent
54ec120f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/main/java/com/zhiwei/searchhotcrawler/timer/SendWeiboHotSearchRun.java
+2
-2
src/main/java/com/zhiwei/searchhotcrawler/timer/SendZhihuHotSearchRun.java
+2
-1
No files found.
src/main/java/com/zhiwei/searchhotcrawler/timer/SendWeiboHotSearchRun.java
View file @
58bf7554
...
@@ -21,13 +21,13 @@ public class SendWeiboHotSearchRun extends Thread{
...
@@ -21,13 +21,13 @@ public class SendWeiboHotSearchRun extends Thread{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
List
<
DBObject
>
list
=
weiboHotSearchDAO
.
getWeiboHotOneHour
();
List
<
DBObject
>
list
=
weiboHotSearchDAO
.
getWeiboHotOneHour
();
System
.
out
.
println
(
list
.
size
()
);
Calendar
calendar
=
Calendar
.
getInstance
(
);
if
(
list
!=
null
&&
list
.
size
()>
0
){
if
(
list
!=
null
&&
list
.
size
()>
0
){
for
(
DBObject
weibo
:
list
){
for
(
DBObject
weibo
:
list
){
String
title
=
weibo
.
get
(
"name"
).
toString
();
String
title
=
weibo
.
get
(
"name"
).
toString
();
String
time
=
TimeParse
.
dateFormartString
((
Date
)
weibo
.
get
(
"time"
),
"yyyy-MM-dd HH:mm:ss"
);
String
time
=
TimeParse
.
dateFormartString
((
Date
)
weibo
.
get
(
"time"
),
"yyyy-MM-dd HH:mm:ss"
);
String
url
=
weibo
.
get
(
"url"
).
toString
();
String
url
=
weibo
.
get
(
"url"
).
toString
();
if
(
Calendar
.
HOUR
>
6
&&
Calendar
.
HOUR
<
23
){
if
(
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)
>
6
&&
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)
<
23
){
sendTemplateByUserIds
(
title
,
time
,
url
);
sendTemplateByUserIds
(
title
,
time
,
url
);
}
}
}
}
...
...
src/main/java/com/zhiwei/searchhotcrawler/timer/SendZhihuHotSearchRun.java
View file @
58bf7554
...
@@ -20,12 +20,13 @@ public class SendZhihuHotSearchRun extends Thread{
...
@@ -20,12 +20,13 @@ public class SendZhihuHotSearchRun extends Thread{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
List
<
DBObject
>
list
=
zhihuHotSearchDAO
.
getZhiHuHotSearch
();
List
<
DBObject
>
list
=
zhihuHotSearchDAO
.
getZhiHuHotSearch
();
Calendar
calendar
=
Calendar
.
getInstance
();
if
(
list
!=
null
&&
list
.
size
()>
0
){
if
(
list
!=
null
&&
list
.
size
()>
0
){
for
(
DBObject
zhihu
:
list
){
for
(
DBObject
zhihu
:
list
){
String
title
=
zhihu
.
get
(
"display_query"
).
toString
();
String
title
=
zhihu
.
get
(
"display_query"
).
toString
();
String
time
=
TimeParse
.
dateFormartString
((
Date
)
zhihu
.
get
(
"time"
),
"yyyy-MM-dd HH:mm:ss"
);
String
time
=
TimeParse
.
dateFormartString
((
Date
)
zhihu
.
get
(
"time"
),
"yyyy-MM-dd HH:mm:ss"
);
String
url
=
zhihu
.
get
(
"_id"
).
toString
();
String
url
=
zhihu
.
get
(
"_id"
).
toString
();
if
(
Calendar
.
HOUR
>
6
&&
Calendar
.
HOUR
<
23
){
if
(
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)
>
6
&&
calendar
.
get
(
Calendar
.
HOUR_OF_DAY
)
<
23
){
sendTemplateByUserIds
(
title
,
time
,
url
);
sendTemplateByUserIds
(
title
,
time
,
url
);
}
}
}
}
...
...
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