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
0ec6851e
Commit
0ec6851e
authored
Nov 27, 2020
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1003901-03' into 'master'
feat: [1003901] 系列书 See merge request rays/pcloud-book!1058
parents
a2a72c18
b4713cbb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
13 deletions
+18
-13
BookBiz.java
...-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
+2
-2
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+6
-5
BookFacadeImpl.java
...java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
+7
-4
ESBookAndAdviserBiz.java
...main/java/com/pcloud/book/es/biz/ESBookAndAdviserBiz.java
+1
-1
ESBookAndAdviserBizImpl.java
.../com/pcloud/book/es/biz/impl/ESBookAndAdviserBizImpl.java
+2
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
View file @
0ec6851e
...
...
@@ -726,7 +726,7 @@ public interface BookBiz {
* @date:2020/11/23 15:46
* * @param null
*/
List
<
BookLabelVO
>
getSubjectLabelList4SeriesBook
(
Long
seriesBookId
);
List
<
BookLabelVO
>
getSubjectLabelList4SeriesBook
(
Long
seriesBookId
,
Long
graLabelId
);
/**
* 是否是系列书
...
...
@@ -741,7 +741,7 @@ public interface BookBiz {
* @date:2020/11/23 19:19
* * @param null
*/
List
<
BookDto
>
getSeriesBookList
(
Long
seriesBookId
,
Long
subLabelId
);
List
<
BookDto
>
getSeriesBookList
(
Long
seriesBookId
,
Long
subLabelId
,
Long
graLabelId
);
/**
* 系列书查询记录
* @author:zhuyajie
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
0ec6851e
...
...
@@ -3480,7 +3480,7 @@ public class BookBizImpl implements BookBiz {
@Override
public
List
<
BookLabelVO
>
getSubjectLabelList4SeriesBook
(
Long
seriesBookId
)
{
public
List
<
BookLabelVO
>
getSubjectLabelList4SeriesBook
(
Long
seriesBookId
,
Long
graLabelId
)
{
SeriesBook
seriesBook
=
seriesBookDao
.
getById
(
seriesBookId
);
if
(
null
==
seriesBook
){
return
new
ArrayList
<>();
...
...
@@ -3492,7 +3492,7 @@ public class BookBizImpl implements BookBiz {
List
<
Long
>
adviserIds
=
adviserConsr
.
getByAgentId
(
seriesBook
.
getAgentId
());
Integer
currentPage
=
0
;
Integer
numPerPage
=
50
;
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
currentPage
,
numPerPage
,
adviserIds
,
seriesBook
.
getAgentId
(),
null
);
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
currentPage
,
numPerPage
,
adviserIds
,
seriesBook
.
getAgentId
(),
null
,
graLabelId
);
List
<
ESBookAndAdviser
>
esBookAndAdvisers
=
esPage
.
getContent
();
if
(
ListUtils
.
isEmpty
(
esBookAndAdvisers
))
{
return
new
ArrayList
<>();
...
...
@@ -3540,13 +3540,14 @@ public class BookBizImpl implements BookBiz {
}
if
(
isSeriesBook
){
map
.
put
(
"subLabelId"
,
bookAdviserDto
.
getSubLabelId
());
map
.
put
(
"graLabelId"
,
bookAdviserDto
.
getGraLabelId
());
}
map
.
put
(
"isSeriesBook"
,
isSeriesBook
);
return
map
;
}
@Override
public
List
<
BookDto
>
getSeriesBookList
(
Long
seriesBookId
,
Long
subLabelId
)
{
public
List
<
BookDto
>
getSeriesBookList
(
Long
seriesBookId
,
Long
subLabelId
,
Long
graLabelId
)
{
SeriesBook
seriesBook
=
seriesBookDao
.
getById
(
seriesBookId
);
if
(
null
==
seriesBook
){
return
new
ArrayList
<>();
...
...
@@ -3558,7 +3559,7 @@ public class BookBizImpl implements BookBiz {
List
<
Long
>
adviserIds
=
adviserConsr
.
getByAgentId
(
seriesBook
.
getAgentId
());
Integer
currentPage
=
0
;
Integer
numPerPage
=
50
;
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
currentPage
,
numPerPage
,
adviserIds
,
seriesBook
.
getAgentId
(),
subLabelId
);
Page
<
ESBookAndAdviser
>
esPage
=
esBookAndAdviserBiz
.
getAdviserBooks4SeriesBook
(
keywordList
,
currentPage
,
numPerPage
,
adviserIds
,
seriesBook
.
getAgentId
(),
subLabelId
,
graLabelId
);
List
<
ESBookAndAdviser
>
esBookAndAdvisers
=
esPage
.
getContent
();
if
(
ListUtils
.
isEmpty
(
esBookAndAdvisers
))
{
return
new
ArrayList
<>();
...
...
@@ -3574,7 +3575,7 @@ public class BookBizImpl implements BookBiz {
if
(
null
==
seriesBookRecord
.
getRecordType
()
||
null
==
seriesBookRecord
.
getBookId
()){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"参数缺失"
);
}
//操作类型(1
分类点击2打卡按钮3保存海报按钮4返回首页按钮
)
//操作类型(1
按钮曝光2按钮点击
)
ThreadPoolUtils
.
OTHER_THREAD_POOL
.
execute
(()->{
seriesBookRecordDao
.
insert
(
seriesBookRecord
);
});
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
View file @
0ec6851e
...
...
@@ -1197,8 +1197,9 @@ public class BookFacadeImpl implements BookFacade {
@ApiOperation
(
"系列书学科列表"
)
@GetMapping
(
"getSubjectLabelList4SeriesBook"
)
public
ResponseDto
<?>
getSubjectLabelList4SeriesBook
(
@RequestParam
(
"seriesBookId"
)
Long
seriesBookId
){
return
new
ResponseDto
<>(
bookBiz
.
getSubjectLabelList4SeriesBook
(
seriesBookId
));
public
ResponseDto
<?>
getSubjectLabelList4SeriesBook
(
@RequestParam
(
"seriesBookId"
)
Long
seriesBookId
,
@RequestParam
(
value
=
"graLabelId"
,
required
=
false
)
Long
graLabelId
){
return
new
ResponseDto
<>(
bookBiz
.
getSubjectLabelList4SeriesBook
(
seriesBookId
,
graLabelId
));
}
@ApiOperation
(
"是否是系列书"
)
...
...
@@ -1211,8 +1212,10 @@ public class BookFacadeImpl implements BookFacade {
@ApiOperation
(
"根据学科查系列书"
)
@GetMapping
(
"getSeriesBookList"
)
public
ResponseDto
<?>
getSeriesBookList
(
@RequestParam
(
"seriesBookId"
)
Long
seriesBookId
,
@RequestParam
(
"subLabelId"
)
Long
subLabelId
){
return
new
ResponseDto
<>(
bookBiz
.
getSeriesBookList
(
seriesBookId
,
subLabelId
));
public
ResponseDto
<?>
getSeriesBookList
(
@RequestParam
(
"seriesBookId"
)
Long
seriesBookId
,
@RequestParam
(
"subLabelId"
)
Long
subLabelId
,
@RequestParam
(
value
=
"graLabelId"
,
required
=
false
)
Long
graLabelId
){
return
new
ResponseDto
<>(
bookBiz
.
getSeriesBookList
(
seriesBookId
,
subLabelId
,
graLabelId
));
}
@ApiOperation
(
"系列书查询记录埋点"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/es/biz/ESBookAndAdviserBiz.java
View file @
0ec6851e
...
...
@@ -37,5 +37,5 @@ public interface ESBookAndAdviserBiz {
* @date:2020/11/23 17:26
* * @param null
*/
Page
<
ESBookAndAdviser
>
getAdviserBooks4SeriesBook
(
List
<
String
>
keywords
,
Integer
currentPage
,
Integer
numPerPage
,
List
<
Long
>
adviserIds
,
Long
agentId
,
Long
subLabelId
);
Page
<
ESBookAndAdviser
>
getAdviserBooks4SeriesBook
(
List
<
String
>
keywords
,
Integer
currentPage
,
Integer
numPerPage
,
List
<
Long
>
adviserIds
,
Long
agentId
,
Long
subLabelId
,
Long
graLabelId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/es/biz/impl/ESBookAndAdviserBizImpl.java
View file @
0ec6851e
...
...
@@ -345,7 +345,7 @@ public class ESBookAndAdviserBizImpl implements ESBookAndAdviserBiz {
@Override
public
Page
<
ESBookAndAdviser
>
getAdviserBooks4SeriesBook
(
List
<
String
>
keywords
,
Integer
currentPage
,
Integer
numPerPage
,
List
<
Long
>
adviserIds
,
Long
agentId
,
Long
subLabelId
)
{
Long
agentId
,
Long
subLabelId
,
Long
graLabelId
)
{
//k12教育分类校验
List
<
Long
>
templetIds
=
Arrays
.
asList
(
RightsSettingConstant
.
K12_VERSION_ID
);
BoolQueryBuilder
boolQueryBuilder
=
QueryBuilders
.
boolQuery
()
...
...
@@ -353,6 +353,7 @@ public class ESBookAndAdviserBizImpl implements ESBookAndAdviserBiz {
.
filter
(
QueryBuilders
.
termQuery
(
"isBookAdviserDelete"
,
0
))
.
filter
(
null
==
agentId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termsQuery
(
"adviserId"
,
adviserIds
))
.
filter
(
null
==
subLabelId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termQuery
(
"subLabelId"
,
subLabelId
))
.
filter
(
null
==
graLabelId
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termQuery
(
"graLabelId"
,
graLabelId
))
.
filter
(
ListUtils
.
isEmpty
(
templetIds
)
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
termsQuery
(
"templetId"
,
templetIds
));
for
(
String
keyword:
keywords
){
BoolQueryBuilder
should
=
QueryBuilders
.
boolQuery
().
should
(
StringUtil
.
isEmpty
(
keyword
)
?
QueryBuilders
.
boolQuery
()
:
QueryBuilders
.
wildcardQuery
(
"bookName"
,
"*"
+
keyword
+
"*"
));
...
...
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