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
17930ada
Commit
17930ada
authored
Nov 25, 2020
by
chenweitao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'mlbWork' into 'master'
采集导语以第一次采集到的导语为准 See merge request
!56
parents
c267bf23
45e2133a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/main/java/com/zhiwei/searchhotcrawler/dao/HotSearchCacheDAO.java
+5
-2
No files found.
src/main/java/com/zhiwei/searchhotcrawler/dao/HotSearchCacheDAO.java
View file @
17930ada
...
...
@@ -9,6 +9,7 @@ import com.zhiwei.searchhotcrawler.config.DBConfig;
import
com.zhiwei.searchhotcrawler.crawler.WeiboHotSearchCrawler
;
import
com.zhiwei.searchhotcrawler.dbtemplate.MongoDBTemplate
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.logging.log4j.util.Strings
;
import
org.bson.Document
;
import
java.util.ArrayList
;
...
...
@@ -298,8 +299,10 @@ public class HotSearchCacheDAO {
Document
query
=
new
Document
(
"_id"
,
id
);
Document
nowDoc
=
(
Document
)
collection
.
find
(
query
).
first
();
if
(
Objects
.
nonNull
(
nowDoc
))
{
if
(
document
.
containsKey
(
"topicLead"
)
&&
document
.
getString
(
"topicLead"
)
!=
null
)
{
nowDoc
.
put
(
"topicLead"
,
document
.
getString
(
"topicLead"
));
if
(
Objects
.
isNull
(
nowDoc
.
get
(
"topicLead"
)))
{
if
(
document
.
containsKey
(
"topicLead"
)
&&
document
.
getString
(
"topicLead"
)
!=
null
)
{
nowDoc
.
put
(
"topicLead"
,
document
.
getString
(
"topicLead"
));
}
}
if
(
document
.
containsKey
(
"readCount"
)
&&
document
.
containsKey
(
"discussCount"
))
{
nowDoc
.
put
(
"readCount"
,
document
.
getInteger
(
"readCount"
));
...
...
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