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
732bf39b
Commit
732bf39b
authored
Oct 12, 2024
by
陈健智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全网搜发布时间排序修复
parent
60731e78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
src/main/java/com/zhiwei/brandkbs2/pojo/dto/SearchFilterDTO.java
+3
-3
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
+4
-1
src/main/java/com/zhiwei/brandkbs2/service/impl/SearchWholeServiceImpl.java
+4
-1
No files found.
src/main/java/com/zhiwei/brandkbs2/pojo/dto/SearchFilterDTO.java
View file @
732bf39b
...
...
@@ -177,13 +177,13 @@ public class SearchFilterDTO {
map
.
put
(
"source"
,
sourceKeyword
);
map
.
put
(
"url"
,
hostKeyword
);
if
(
null
==
sorter
||
sorter
.
isEmpty
())
{
map
.
put
(
"sort"
,
"
DESC
"
);
map
.
put
(
"sort"
,
"
desc
"
);
}
else
{
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
sorter
.
entrySet
())
{
if
(
entry
.
getValue
().
toString
().
contains
(
"desc"
))
{
map
.
put
(
"sort"
,
"
DESC
"
);
map
.
put
(
"sort"
,
"
desc
"
);
}
else
{
map
.
put
(
"sort"
,
"
ASC
"
);
map
.
put
(
"sort"
,
"
asc
"
);
}
}
}
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/MarkDataServiceImpl.java
View file @
732bf39b
...
...
@@ -2941,7 +2941,10 @@ public class MarkDataServiceImpl implements MarkDataService {
return
null
;
}
// 最高点的时间为开始时间
LineVO
startLine
=
lines
.
stream
().
max
(
Comparator
.
comparingLong
(
LineVO:
:
getCount
)).
get
();
LineVO
startLine
=
lines
.
stream
().
max
(
Comparator
.
comparingLong
(
LineVO:
:
getCount
)).
orElse
(
null
);
if
(
Objects
.
isNull
(
startLine
)){
return
null
;
}
Long
startTime
=
startLine
.
getDate
();
int
startIndex
=
lines
.
indexOf
(
startLine
);
// 最高点后一个点的时间为结束时间
...
...
src/main/java/com/zhiwei/brandkbs2/service/impl/SearchWholeServiceImpl.java
View file @
732bf39b
...
...
@@ -826,7 +826,10 @@ public class SearchWholeServiceImpl implements SearchWholeService {
*/
private
BaseMap
getFirstArticle
(
SearchFilterDTO
dto
,
List
<
LineVO
>
totalSpreadTendency
)
throws
IOException
{
// 最高点的时间为开始时间
LineVO
startLine
=
totalSpreadTendency
.
stream
().
max
(
Comparator
.
comparingLong
(
LineVO:
:
getCount
)).
get
();
LineVO
startLine
=
totalSpreadTendency
.
stream
().
max
(
Comparator
.
comparingLong
(
LineVO:
:
getCount
)).
orElse
(
null
);
if
(
Objects
.
isNull
(
startLine
)){
return
null
;
}
Long
startTime
=
startLine
.
getDate
();
int
startIndex
=
totalSpreadTendency
.
indexOf
(
startLine
);
// 最高点后一个点的时间为结束时间
...
...
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