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
60731e78
Commit
60731e78
authored
Oct 09, 2024
by
陈健智
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature' into feature
parents
8d8f4a0e
96854f63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
+7
-7
No files found.
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
View file @
60731e78
...
...
@@ -934,7 +934,7 @@ public class MarkDataServiceImpl implements MarkDataService {
TermsAggregationBuilder
sourceAggregationBuilder
=
AggregationBuilders
.
terms
(
"source"
).
field
(
"source"
).
size
(
10000
);
// query
BoolQueryBuilder
query
=
yuqingAnalyzeQuery
(
dto
);
// 过滤微博
// 过滤微博
query
.
mustNot
(
QueryBuilders
.
termQuery
(
"platform_id"
,
"5d02236e6395002a7c380b79"
));
SearchResponse
searchResponse
;
// 单独处理buckets超过上限异常,出错时按时间分段查询
...
...
@@ -2876,11 +2876,11 @@ public class MarkDataServiceImpl implements MarkDataService {
if
(
Objects
.
nonNull
(
negativeSpreadTendency
.
getLeft
())
||
Objects
.
nonNull
(
spreadTendency
.
getLeft
())
||
Objects
.
nonNull
(
positiveSpreadTendency
.
getLeft
()))
{
CompletableFuture
.
allOf
(
Stream
.
of
(
spreadTendency
.
getLeft
(),
negativeSpreadTendency
.
getLeft
(),
positiveSpreadTendency
.
getLeft
())
.
filter
(
Objects:
:
nonNull
).
map
(
aggTitle
->
CompletableFuture
.
runAsync
(()
->
{
try
{
baseMaps
.
put
(
aggTitle
,
getAnalyzeFirstArticle
(
dto
,
aggTitle
));
}
catch
(
IOException
ignored
)
{
}
},
executor
)).
toArray
(
CompletableFuture
[]::
new
)).
join
();
try
{
baseMaps
.
put
(
aggTitle
,
getAnalyzeFirstArticle
(
dto
,
aggTitle
));
}
catch
(
IOException
ignored
)
{
}
},
executor
)).
toArray
(
CompletableFuture
[]::
new
)).
join
();
}
// 标题为空,但趋势图不为空,此时说明最高点的时间段发文平台全为微博,此时取最高点时间段内时间最早的微博发文
if
(
Objects
.
isNull
(
spreadTendency
.
getLeft
())
&&
CollectionUtils
.
isNotEmpty
(
spreadTendency
.
getRight
())){
...
...
@@ -4113,7 +4113,7 @@ public class MarkDataServiceImpl implements MarkDataService {
project
.
getContendList
().
forEach
(
contend
->
brandStr
.
append
(
"、"
).
append
(
contend
.
getBrandName
()));
}
questionPair
=
standardRequest
(
question
,
modelName
,
MessageFormat
.
format
(
QUESTION_PROMPT
,
brandStr
));
if
(
Objects
.
isNull
(
questionPair
)
||
Objects
.
equals
(
"无法回答"
,
questionPair
.
getLeft
()))
{
if
(
Objects
.
isNull
(
questionPair
)
||
Objects
.
equals
(
"无法回答"
,
questionPair
.
getLeft
()
.
trim
()
))
{
return
null
;
}
JSONObject
json
=
JSON
.
parseObject
(
questionPair
.
getLeft
());
...
...
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