Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
VVAS-Match
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ca508586
authored
Jun 19, 2021
by
翟柏林
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改分数为float以及添加personId筛选条件
1 parent
cd6b5cda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
src/main/java/com/viontech/match/service/PersonService.java
src/main/java/com/viontech/match/service/PersonService.java
View file @
ca50858
...
...
@@ -256,7 +256,7 @@ public class PersonService {
matchResultSize
=
Constant
.
BODY_MATCH_RESULT_SIZE
;
}
Stream
<
Person
>
stream
=
matchResult
.
stream
().
sorted
(
Comparator
.
comparing
Int
(
Person:
:
getScore
).
reversed
());
Stream
<
Person
>
stream
=
matchResult
.
stream
().
sorted
(
Comparator
.
comparing
Double
(
Person:
:
getScore
).
reversed
());
if
(
matchResult
.
size
()
>
matchResultSize
)
{
stream
=
stream
.
limit
(
matchResultSize
);
}
...
...
@@ -325,6 +325,9 @@ public class PersonService {
if
(
channelSerialNums
!=
null
&&
channelSerialNums
.
size
()
>
0
)
{
boolQuery
.
filter
(
QueryBuilders
.
termsQuery
(
"channelSerialNum"
,
channelSerialNums
));
}
if
(
person
.
getPersonUnid
()
!=
null
&&
!
person
.
getPersonUnid
().
equals
(
""
)){
boolQuery
.
filter
(
QueryBuilders
.
termQuery
(
"personId"
,
person
.
getPersonUnid
()));
}
// 根据时间过滤
RangeQueryBuilder
rangeQueryBuilder
=
QueryBuilders
.
rangeQuery
(
"counttime"
);
...
...
@@ -375,7 +378,7 @@ public class PersonService {
})
.
orElse
(
null
));
p
.
setScore
(
(
int
)
item
.
getScore
());
p
.
setScore
(
item
.
getScore
());
p
.
setPersonPoolId
(
item
.
getIndex
());
persons
.
add
(
p
);
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment