Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
6881208c
Commit
6881208c
authored
Aug 17, 2020
by
桂前礼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [none] 群筛选新增根据群人数排序选项
parent
472e4ef8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
ESBookGroupQrcodeBiz.java
...ain/java/com/pcloud/book/es/biz/ESBookGroupQrcodeBiz.java
+1
-1
ESBookGroupQrcodeBizImpl.java
...com/pcloud/book/es/biz/impl/ESBookGroupQrcodeBizImpl.java
+8
-3
ESBookGroupQrcodeFacadeImpl.java
...loud/book/es/facade/impl/ESBookGroupQrcodeFacadeImpl.java
+2
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/es/biz/ESBookGroupQrcodeBiz.java
View file @
6881208c
...
...
@@ -27,5 +27,5 @@ public interface ESBookGroupQrcodeBiz {
*/
void
save
(
List
<
ESBookGroupQrcodeDTO
>
dtos
);
PageBeanNew
<
GroupQrcodeSearchDTO
>
search
(
String
text
,
String
methodType
,
Integer
pageSize
,
Integer
pageNum
);
PageBeanNew
<
GroupQrcodeSearchDTO
>
search
(
String
text
,
String
methodType
,
Boolean
isOrder
,
Integer
pageSize
,
Integer
pageNum
);
}
pcloud-service-book/src/main/java/com/pcloud/book/es/biz/impl/ESBookGroupQrcodeBizImpl.java
View file @
6881208c
...
...
@@ -267,14 +267,19 @@ public class ESBookGroupQrcodeBizImpl implements ESBookGroupQrcodeBiz {
}
@Override
public
PageBeanNew
<
GroupQrcodeSearchDTO
>
search
(
String
text
,
String
methodType
,
Integer
pageSize
,
Integer
pageNum
)
{
public
PageBeanNew
<
GroupQrcodeSearchDTO
>
search
(
String
text
,
String
methodType
,
Boolean
isOrder
,
Integer
pageSize
,
Integer
pageNum
)
{
QueryBuilder
queryBuilder
;
PageRequest
pageRequest
;
if
(
Objects
.
nonNull
(
isOrder
)&&
isOrder
){
pageRequest
=
new
PageRequest
(
pageNum
,
pageSize
,
new
Sort
(
Sort
.
Direction
.
DESC
,
"groupMemberCount"
,
"userNumber"
));
}
else
{
pageRequest
=
new
PageRequest
(
pageNum
,
pageSize
);
}
if
(
StrUtil
.
isEmpty
(
text
))
{
queryBuilder
=
QueryBuilders
.
boolQuery
();
pageRequest
=
new
PageRequest
(
pageNum
,
pageSize
,
new
Sort
(
Sort
.
Direction
.
DESC
,
"groupMemberCount"
,
"userNumber"
));
}
else
{
pageRequest
=
new
PageRequest
(
pageNum
,
pageSize
);
if
(
"AND"
.
equals
(
methodType
))
{
queryBuilder
=
QueryBuilders
.
multiMatchQuery
(
text
,
"groupName"
,
"groupNameTags"
,
"qrcodeBookName"
,
"bookNameTags"
,
"cityTags"
,
"pressTags"
,
"pressTags"
,
"adviserName"
).
type
(
MultiMatchQueryBuilder
.
Type
.
CROSS_FIELDS
).
operator
(
MatchQueryBuilder
.
Operator
.
AND
);
}
else
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/es/facade/impl/ESBookGroupQrcodeFacadeImpl.java
View file @
6881208c
...
...
@@ -32,12 +32,13 @@ public class ESBookGroupQrcodeFacadeImpl {
@RequestMapping
(
value
=
"/search"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBeanNew
<
GroupQrcodeSearchDTO
>>
search
(
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@RequestParam
(
value
=
"methodType"
,
required
=
false
)
String
methodType
,
@RequestParam
(
value
=
"isOrder"
,
required
=
false
)
Boolean
isOrder
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
)
{
if
(
StrUtil
.
isBlank
(
methodType
)){
methodType
=
"OR"
;
}
return
new
ResponseDto
<>(
esBookGroupQrcodeBiz
.
search
(
keyword
,
methodType
,
numPerPage
,
currentPage
));
return
new
ResponseDto
<>(
esBookGroupQrcodeBiz
.
search
(
keyword
,
methodType
,
isOrder
,
numPerPage
,
currentPage
));
}
}
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