Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
brandkbs2
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
shenjunjie
brandkbs2
Commits
e5ed1a81
Commit
e5ed1a81
authored
Aug 16, 2022
by
shenjunjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature' into 'dev'
恢复舆情数据聚合功能 See merge request
!23
parents
fddf6786
b6330479
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
src/main/java/com/zhiwei/brandkbs2/service/impl/EventServiceImpl.java
+1
-2
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
+2
-6
No files found.
src/main/java/com/zhiwei/brandkbs2/service/impl/EventServiceImpl.java
View file @
e5ed1a81
...
...
@@ -552,8 +552,7 @@ public class EventServiceImpl implements EventService {
// 未保证排序
Map
<
String
,
EventListInfoVO
>
sortMap
=
eventList
.
stream
().
collect
(
Collectors
.
toConcurrentMap
(
Event:
:
getId
,
EventListInfoVO:
:
new
));
CompletableFuture
.
allOf
(
eventList
.
stream
().
map
(
event
->
eventDataDao
.
findFirstDataAsync
(
event
.
getId
(),
event
.
getCollectionName
()).
thenApply
((
r
)
->
{
// 放入首发稿件
EventListInfoVO
vo
=
new
EventListInfoVO
(
event
);
// 设置首发稿件
sortMap
.
get
(
event
.
getId
()).
setFirstEventData
(
r
);
return
null
;
})).
toArray
(
CompletableFuture
[]::
new
)).
join
();
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
View file @
e5ed1a81
...
...
@@ -63,7 +63,6 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -603,10 +602,8 @@ public class MarkDataServiceImpl implements MarkDataService {
private
Pair
<
SearchHits
[],
Map
<
String
,
Long
>>
searchMarkHitsAndCount
(
MarkSearchDTO
dto
,
boolean
aggree
)
throws
IOException
{
EsClientDao
.
SearchHelper
helper
=
createSearchHelperByMarkSearchDTO
(
dto
);
if
(
aggree
)
{
helper
.
setSize
(
0
);
// TODO 本地调试不滚动查询
// List<SearchResponse> searchResponses = esClientDao.searchScrollResponse(helper);
List
<
SearchResponse
>
searchResponses
=
Collections
.
singletonList
(
esClientDao
.
searchResponse
(
helper
));
List
<
SearchResponse
>
searchResponses
=
esClientDao
.
searchScrollResponse
(
helper
);
// <SearchResponse> searchResponses = Collections.singletonList(esClientDao.searchResponse(helper));
return
Pair
.
of
(
searchResponses
.
stream
().
map
(
SearchResponse:
:
getHits
).
toArray
(
SearchHits
[]::
new
),
null
);
}
SearchHits
searchHits
=
esClientDao
.
searchHits
(
helper
);
...
...
@@ -917,7 +914,6 @@ public class MarkDataServiceImpl implements MarkDataService {
private
Pair
<
SearchHits
[],
Map
<
String
,
Long
>>
searchContendMarkHitsAndCount
(
MarkSearchDTO
dto
,
boolean
aggree
)
throws
IOException
{
EsClientDao
.
SearchHelper
helper
=
createContendSearchHelper
(
dto
);
if
(
aggree
)
{
helper
.
setSize
(
0
);
// TODO 本地调试不滚动查询
// List<SearchResponse> searchResponses = esClientDao.searchScrollResponse(helper);
List
<
SearchResponse
>
searchResponses
=
Collections
.
singletonList
(
esClientDao
.
searchResponse
(
helper
));
...
...
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