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
99b57ad6
Commit
99b57ad6
authored
Feb 10, 2023
by
shenjunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全网搜sorter统一
parent
b764e8a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/main/java/com/zhiwei/brandkbs2/pojo/dto/SearchFilterDTO.java
+13
-2
No files found.
src/main/java/com/zhiwei/brandkbs2/pojo/dto/SearchFilterDTO.java
View file @
99b57ad6
package
com
.
zhiwei
.
brandkbs2
.
pojo
.
dto
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -68,7 +69,7 @@ public class SearchFilterDTO {
* 排序字段
*/
@ApiModelProperty
(
value
=
"排序字段"
)
private
String
sorter
;
private
JSONObject
sorter
;
/**
* 排序字段(查商业数据库用)
...
...
@@ -134,7 +135,17 @@ public class SearchFilterDTO {
map
.
put
(
"endTime"
,
endTime
);
map
.
put
(
"source"
,
sourceKeyword
);
map
.
put
(
"url"
,
hostKeyword
);
map
.
put
(
"sort"
,
Objects
.
nonNull
(
sorter
)
?
sorter
:
"DESC"
);
if
(
null
==
sorter
||
sorter
.
isEmpty
())
{
map
.
put
(
"sort"
,
"DESC"
);
}
else
{
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
sorter
.
entrySet
())
{
if
(
entry
.
getValue
().
toString
().
contains
(
"desc"
))
{
map
.
put
(
"sort"
,
"DESC"
);
}
else
{
map
.
put
(
"sort"
,
"ASC"
);
}
}
}
map
.
put
(
"page"
,
page
);
map
.
put
(
"pageSize"
,
pageSize
);
map
.
put
(
"notWords"
,
filterWords
);
...
...
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