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
55ce35ad
Commit
55ce35ad
authored
Feb 04, 2021
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1004265' into 'master'
feat: [1004265] 本书服务页展示系列书 See merge request rays/pcloud-book!1192
parents
bcb864b5
c0afca9f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
27 deletions
+42
-27
BookConstant.java
...main/java/com/pcloud/book/book/constant/BookConstant.java
+19
-19
BookBiz.java
...-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
+1
-1
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+14
-4
BookFacadeImpl.java
...java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
+4
-1
ESBookAndAdviserBiz.java
...main/java/com/pcloud/book/es/biz/ESBookAndAdviserBiz.java
+1
-1
ESBookAndAdviserBizImpl.java
.../com/pcloud/book/es/biz/impl/ESBookAndAdviserBizImpl.java
+3
-1
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/book/constant/BookConstant.java
View file @
55ce35ad
...
@@ -413,25 +413,25 @@ public class BookConstant {
...
@@ -413,25 +413,25 @@ public class BookConstant {
put
(
3
,
Lists
.
newArrayList
(
20
,
137
));
put
(
3
,
Lists
.
newArrayList
(
20
,
137
));
put
(
4
,
Lists
.
newArrayList
(
20
,
137
));
put
(
4
,
Lists
.
newArrayList
(
20
,
137
));
put
(
5
,
Lists
.
newArrayList
(
20
,
137
));
put
(
5
,
Lists
.
newArrayList
(
20
,
137
));
put
(
6
,
Lists
.
newArrayList
(
335
,
97
0
));
put
(
6
,
Lists
.
newArrayList
(
100
,
20
0
));
put
(
7
,
Lists
.
newArrayList
(
480
,
228
0
));
put
(
7
,
Lists
.
newArrayList
(
200
,
50
0
));
put
(
8
,
Lists
.
newArrayList
(
664
,
5091
));
put
(
8
,
Lists
.
newArrayList
(
300
,
1000
));
put
(
9
,
Lists
.
newArrayList
(
1095
,
10859
));
put
(
9
,
Lists
.
newArrayList
(
350
,
1500
));
put
(
10
,
Lists
.
newArrayList
(
992
,
15224
));
put
(
10
,
Lists
.
newArrayList
(
360
,
2000
));
put
(
11
,
Lists
.
newArrayList
(
772
,
11455
));
put
(
11
,
Lists
.
newArrayList
(
350
,
2000
));
put
(
12
,
Lists
.
newArrayList
(
1162
,
12907
));
put
(
12
,
Lists
.
newArrayList
(
500
,
2100
));
put
(
13
,
Lists
.
newArrayList
(
687
,
11108
));
put
(
13
,
Lists
.
newArrayList
(
300
,
2200
));
put
(
14
,
Lists
.
newArrayList
(
795
,
10891
));
put
(
14
,
Lists
.
newArrayList
(
300
,
2000
));
put
(
15
,
Lists
.
newArrayList
(
1100
,
12153
));
put
(
15
,
Lists
.
newArrayList
(
400
,
2100
));
put
(
16
,
Lists
.
newArrayList
(
890
,
11433
));
put
(
16
,
Lists
.
newArrayList
(
300
,
2000
));
put
(
17
,
Lists
.
newArrayList
(
1336
,
9118
));
put
(
17
,
Lists
.
newArrayList
(
400
,
1500
));
put
(
18
,
Lists
.
newArrayList
(
2448
,
11952
));
put
(
18
,
Lists
.
newArrayList
(
420
,
1400
));
put
(
19
,
Lists
.
newArrayList
(
3106
,
14088
));
put
(
19
,
Lists
.
newArrayList
(
500
,
1500
));
put
(
20
,
Lists
.
newArrayList
(
3179
,
1498
0
));
put
(
20
,
Lists
.
newArrayList
(
500
,
160
0
));
put
(
21
,
Lists
.
newArrayList
(
2249
,
12156
));
put
(
21
,
Lists
.
newArrayList
(
400
,
1500
));
put
(
22
,
Lists
.
newArrayList
(
10
50
,
7955
));
put
(
22
,
Lists
.
newArrayList
(
10
0
,
1000
));
put
(
23
,
Lists
.
newArrayList
(
628
,
328
0
));
put
(
23
,
Lists
.
newArrayList
(
50
,
50
0
));
put
(
0
,
Lists
.
newArrayList
(
890
,
225
0
));
put
(
0
,
Lists
.
newArrayList
(
50
,
40
0
));
}
}
};
};
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
View file @
55ce35ad
...
@@ -719,7 +719,7 @@ public interface BookBiz {
...
@@ -719,7 +719,7 @@ public interface BookBiz {
* @date:2020/11/23 19:19
* @date:2020/11/23 19:19
* * @param null
* * @param null
*/
*/
PageBeanNew
<
BookDto
>
getSeriesBookList
(
Long
seriesBookId
,
Long
subLabelId
,
Long
graLabelId
,
Integer
currentPage
,
Integer
numPerPage
);
PageBeanNew
<
BookDto
>
getSeriesBookList
(
Long
seriesBookId
,
Long
subLabelId
,
Long
graLabelId
,
Integer
currentPage
,
Integer
numPerPage
,
Long
verLabelId
,
Long
volLabelId
,
Long
ignorSubLabelId
);
/**
/**
* 系列书查询记录
* 系列书查询记录
* @author:zhuyajie
* @author:zhuyajie
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
55ce35ad
...
@@ -3546,7 +3546,7 @@ public class BookBizImpl implements BookBiz {
...
@@ -3546,7 +3546,7 @@ public class BookBizImpl implements BookBiz {
List
<
Long
>
adviserIds
=
adviserConsr
.
getByAgentId
(
seriesBook
.
getAgentId
());
List
<
Long
>
adviserIds
=
adviserConsr
.
getByAgentId
(
seriesBook
.
getAgentId
());
Integer
currentPage
=
0
;
Integer
currentPage
=
0
;
Integer
numPerPage
=
50
;
Integer
numPerPage
=
50
;
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
currentPage
,
numPerPage
,
adviserIds
,
seriesBook
.
getAgentId
(),
null
,
graLabelId
,
seriesBook
.
getSerialNumber
());
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
currentPage
,
numPerPage
,
adviserIds
,
seriesBook
.
getAgentId
(),
null
,
graLabelId
,
seriesBook
.
getSerialNumber
()
,
null
,
null
);
List
<
ESBookAndAdviser
>
esBookAndAdvisers
=
esPage
.
getContent
();
List
<
ESBookAndAdviser
>
esBookAndAdvisers
=
esPage
.
getContent
();
if
(
ListUtils
.
isEmpty
(
esBookAndAdvisers
))
{
if
(
ListUtils
.
isEmpty
(
esBookAndAdvisers
))
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
...
@@ -3612,7 +3612,7 @@ public class BookBizImpl implements BookBiz {
...
@@ -3612,7 +3612,7 @@ public class BookBizImpl implements BookBiz {
}
}
if
(
isSeriesBook
){
if
(
isSeriesBook
){
List
<
Long
>
adviserIds
=
adviserConsr
.
getByAgentId
(
agentId
);
List
<
Long
>
adviserIds
=
adviserConsr
.
getByAgentId
(
agentId
);
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
0
,
50
,
adviserIds
,
agentId
,
null
,
bookAdviserDto
.
getGraLabelId
(),
serialNumber
);
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
0
,
50
,
adviserIds
,
agentId
,
null
,
bookAdviserDto
.
getGraLabelId
(),
serialNumber
,
null
,
null
);
List
<
ESBookAndAdviser
>
esBookAndAdvisers
=
esPage
.
getContent
();
List
<
ESBookAndAdviser
>
esBookAndAdvisers
=
esPage
.
getContent
();
List
<
Long
>
subjectLabels
=
new
ArrayList
<>();
List
<
Long
>
subjectLabels
=
new
ArrayList
<>();
if
(!
ListUtils
.
isEmpty
(
esBookAndAdvisers
))
{
if
(!
ListUtils
.
isEmpty
(
esBookAndAdvisers
))
{
...
@@ -3625,6 +3625,8 @@ public class BookBizImpl implements BookBiz {
...
@@ -3625,6 +3625,8 @@ public class BookBizImpl implements BookBiz {
map
.
put
(
"seriesBookId"
,
seriesBookId
);
map
.
put
(
"seriesBookId"
,
seriesBookId
);
map
.
put
(
"subLabelId"
,
bookAdviserDto
.
getSubLabelId
());
map
.
put
(
"subLabelId"
,
bookAdviserDto
.
getSubLabelId
());
map
.
put
(
"graLabelId"
,
bookAdviserDto
.
getGraLabelId
());
map
.
put
(
"graLabelId"
,
bookAdviserDto
.
getGraLabelId
());
map
.
put
(
"volLabelId"
,
bookAdviserDto
.
getVolLabelId
());
map
.
put
(
"verLabelId"
,
bookAdviserDto
.
getVerLabelId
());
}
}
}
}
map
.
put
(
"isSeriesBook"
,
isSeriesBook
);
map
.
put
(
"isSeriesBook"
,
isSeriesBook
);
...
@@ -3632,7 +3634,8 @@ public class BookBizImpl implements BookBiz {
...
@@ -3632,7 +3634,8 @@ public class BookBizImpl implements BookBiz {
}
}
@Override
@Override
public
PageBeanNew
<
BookDto
>
getSeriesBookList
(
Long
seriesBookId
,
Long
subLabelId
,
Long
graLabelId
,
Integer
currentPage
,
Integer
numPerPage
)
{
public
PageBeanNew
<
BookDto
>
getSeriesBookList
(
Long
seriesBookId
,
Long
subLabelId
,
Long
graLabelId
,
Integer
currentPage
,
Integer
numPerPage
,
Long
verLabelId
,
Long
volLabelId
,
Long
ignorSubLabelId
)
{
SeriesBook
seriesBook
=
seriesBookDao
.
getById
(
seriesBookId
);
SeriesBook
seriesBook
=
seriesBookDao
.
getById
(
seriesBookId
);
if
(
null
==
seriesBook
){
if
(
null
==
seriesBook
){
return
new
PageBeanNew
<>();
return
new
PageBeanNew
<>();
...
@@ -3646,11 +3649,18 @@ public class BookBizImpl implements BookBiz {
...
@@ -3646,11 +3649,18 @@ public class BookBizImpl implements BookBiz {
currentPage
=
0
;
currentPage
=
0
;
numPerPage
=
50
;
numPerPage
=
50
;
}
}
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
currentPage
,
numPerPage
,
adviserIds
,
seriesBook
.
getAgentId
(),
subLabelId
,
graLabelId
,
seriesBook
.
getSerialNumber
());
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
currentPage
,
numPerPage
,
adviserIds
,
seriesBook
.
getAgentId
(),
subLabelId
,
graLabelId
,
seriesBook
.
getSerialNumber
(),
verLabelId
,
volLabelId
);
List
<
ESBookAndAdviser
>
esBookAndAdvisers
=
esPage
.
getContent
();
List
<
ESBookAndAdviser
>
esBookAndAdvisers
=
esPage
.
getContent
();
if
(
ListUtils
.
isEmpty
(
esBookAndAdvisers
))
{
if
(
ListUtils
.
isEmpty
(
esBookAndAdvisers
))
{
return
new
PageBeanNew
<>();
return
new
PageBeanNew
<>();
}
}
if
(
null
!=
ignorSubLabelId
)
{
esBookAndAdvisers
=
esBookAndAdvisers
.
stream
().
filter
(
e
->
!
Objects
.
equals
(
ignorSubLabelId
,
e
.
getSubLabelId
())).
collect
(
Collectors
.
toList
());
}
if
(
ListUtils
.
isEmpty
(
esBookAndAdvisers
))
{
return
new
PageBeanNew
<>();
}
List
<
BookDto
>
bookDtos
=
changeToBookDto
(
esBookAndAdvisers
);
List
<
BookDto
>
bookDtos
=
changeToBookDto
(
esBookAndAdvisers
);
fillOtherBookInfo
(
bookDtos
);
fillOtherBookInfo
(
bookDtos
);
fillBookInfo
(
bookDtos
);
fillBookInfo
(
bookDtos
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
View file @
55ce35ad
...
@@ -1247,9 +1247,12 @@ public class BookFacadeImpl implements BookFacade {
...
@@ -1247,9 +1247,12 @@ public class BookFacadeImpl implements BookFacade {
public
ResponseDto
<?>
getSeriesBookList
(
@RequestParam
(
"seriesBookId"
)
Long
seriesBookId
,
public
ResponseDto
<?>
getSeriesBookList
(
@RequestParam
(
"seriesBookId"
)
Long
seriesBookId
,
@RequestParam
(
value
=
"subLabelId"
,
required
=
false
)
Long
subLabelId
,
@RequestParam
(
value
=
"subLabelId"
,
required
=
false
)
Long
subLabelId
,
@RequestParam
(
value
=
"graLabelId"
,
required
=
false
)
Long
graLabelId
,
@RequestParam
(
value
=
"graLabelId"
,
required
=
false
)
Long
graLabelId
,
@RequestParam
(
value
=
"verLabelId"
,
required
=
false
)
Long
verLabelId
,
@RequestParam
(
value
=
"volLabelId"
,
required
=
false
)
Long
volLabelId
,
@RequestParam
(
value
=
"ignorSubLabelId"
,
required
=
false
)
Long
ignorSubLabelId
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
,
defaultValue
=
"0"
)
Integer
currentPage
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
,
defaultValue
=
"0"
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
,
defaultValue
=
"10"
)
Integer
numPerPage
){
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
,
defaultValue
=
"10"
)
Integer
numPerPage
){
return
new
ResponseDto
<>(
bookBiz
.
getSeriesBookList
(
seriesBookId
,
subLabelId
,
graLabelId
,
currentPage
,
numPerPage
));
return
new
ResponseDto
<>(
bookBiz
.
getSeriesBookList
(
seriesBookId
,
subLabelId
,
graLabelId
,
currentPage
,
numPerPage
,
verLabelId
,
volLabelId
,
ignorSubLabelId
));
}
}
@ApiOperation
(
"系列书查询记录埋点"
)
@ApiOperation
(
"系列书查询记录埋点"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/es/biz/ESBookAndAdviserBiz.java
View file @
55ce35ad
...
@@ -40,7 +40,7 @@ public interface ESBookAndAdviserBiz {
...
@@ -40,7 +40,7 @@ public interface ESBookAndAdviserBiz {
* @date:2020/11/23 17:26
* @date:2020/11/23 17:26
* * @param null
* * @param null
*/
*/
Page
<
ESBookAndAdviser
>
getAdviserBooks4SeriesBook
(
List
<
String
>
keywords
,
Integer
currentPage
,
Integer
numPerPage
,
List
<
Long
>
adviserIds
,
Long
agentId
,
Long
subLabelId
,
Long
graLabelId
,
String
serialNumber
);
Page
<
ESBookAndAdviser
>
getAdviserBooks4SeriesBook
(
List
<
String
>
keywords
,
Integer
currentPage
,
Integer
numPerPage
,
List
<
Long
>
adviserIds
,
Long
agentId
,
Long
subLabelId
,
Long
graLabelId
,
String
serialNumber
,
Long
verLabelId
,
Long
volLabelId
);
Map
<
String
,
Object
>
getNotFoundBookId
(
String
lastBookId
)
throws
Exception
;
Map
<
String
,
Object
>
getNotFoundBookId
(
String
lastBookId
)
throws
Exception
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/es/biz/impl/ESBookAndAdviserBizImpl.java
View file @
55ce35ad
...
@@ -501,7 +501,7 @@ public class ESBookAndAdviserBizImpl implements ESBookAndAdviserBiz {
...
@@ -501,7 +501,7 @@ public class ESBookAndAdviserBizImpl implements ESBookAndAdviserBiz {
@Override
@Override
public
Page
<
ESBookAndAdviser
>
getAdviserBooks4SeriesBook
(
List
<
String
>
keywords
,
Integer
currentPage
,
Integer
numPerPage
,
List
<
Long
>
adviserIds
,
public
Page
<
ESBookAndAdviser
>
getAdviserBooks4SeriesBook
(
List
<
String
>
keywords
,
Integer
currentPage
,
Integer
numPerPage
,
List
<
Long
>
adviserIds
,
Long
agentId
,
Long
subLabelId
,
Long
graLabelId
,
String
serialNumber
)
{
Long
agentId
,
Long
subLabelId
,
Long
graLabelId
,
String
serialNumber
,
Long
verLabelId
,
Long
volLabelId
)
{
//k12教育分类校验
//k12教育分类校验
List
<
Long
>
templetIds
=
Arrays
.
asList
(
RightsSettingConstant
.
K12_TEMPLET_ID_NEW
);
List
<
Long
>
templetIds
=
Arrays
.
asList
(
RightsSettingConstant
.
K12_TEMPLET_ID_NEW
);
BoolQueryBuilder
boolQueryBuilder
=
QueryBuilders
.
boolQuery
()
BoolQueryBuilder
boolQueryBuilder
=
QueryBuilders
.
boolQuery
()
...
@@ -510,6 +510,8 @@ public class ESBookAndAdviserBizImpl implements ESBookAndAdviserBiz {
...
@@ -510,6 +510,8 @@ public class ESBookAndAdviserBizImpl implements ESBookAndAdviserBiz {
.
filter
(
null
==
agentId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termsQuery
(
"adviserId"
,
adviserIds
))
.
filter
(
null
==
agentId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termsQuery
(
"adviserId"
,
adviserIds
))
.
filter
(
null
==
subLabelId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termQuery
(
"subLabelId"
,
subLabelId
))
.
filter
(
null
==
subLabelId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termQuery
(
"subLabelId"
,
subLabelId
))
.
filter
(
null
==
graLabelId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termQuery
(
"graLabelId"
,
graLabelId
))
.
filter
(
null
==
graLabelId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termQuery
(
"graLabelId"
,
graLabelId
))
.
filter
(
null
==
graLabelId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termQuery
(
"verLabelId"
,
verLabelId
))
.
filter
(
null
==
graLabelId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termQuery
(
"volLabelId"
,
volLabelId
))
.
filter
(
ListUtils
.
isEmpty
(
templetIds
)
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termsQuery
(
"templetId"
,
templetIds
));
.
filter
(
ListUtils
.
isEmpty
(
templetIds
)
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termsQuery
(
"templetId"
,
templetIds
));
//关键词
//关键词
for
(
String
keyword:
keywords
){
for
(
String
keyword:
keywords
){
...
...
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