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
840bdc30
Commit
840bdc30
authored
Aug 19, 2022
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:[none]接口优化listBookClassify
parent
31c51efc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
6 deletions
+51
-6
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+4
-0
BookSet.java
...-book/src/main/java/com/pcloud/book/book/set/BookSet.java
+47
-0
Book.Mapper.xml
...rvice-book/src/main/resources/mapper/book/Book.Mapper.xml
+0
-6
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
840bdc30
...
...
@@ -1635,6 +1635,8 @@ public class BookBizImpl implements BookBiz {
LOGGER
.
info
(
"图书列表(平台端)<START>,paramMap="
+
paramMap
);
PageBean
pageBean
=
bookDao
.
listPage
(
pageParam
,
paramMap
,
"listBookClassify"
,
"listBookClassifyCount"
);
if
(
pageBean
!=
null
)
{
//书刊标签
bookSet
.
setObjectLabelNames
(
pageBean
.
getRecordList
());
// 设置编辑名称,手机号
bookSet
.
setAdviserInfo4BookDto
(
pageBean
.
getRecordList
());
// 设置图书读者量、扫码量、浏览量
...
...
@@ -4585,6 +4587,8 @@ public class BookBizImpl implements BookBiz {
Integer
numPerPage
=
null
==
aviserBookInfoParam
.
getNumPerPage
()?
10
:
aviserBookInfoParam
.
getNumPerPage
();
PageBean
pageBean
=
bookDao
.
listPage
(
new
PageParam
(
currentPage
,
numPerPage
),
new
HashMap
<>(),
"listBookClassify"
,
"listBookClassifyCount"
);
if
(
pageBean
!=
null
)
{
//书刊标签
bookSet
.
setObjectLabelNames
(
pageBean
.
getRecordList
());
// 设置书刊分类
bookSet
.
setTemplateNameNew
(
pageBean
.
getRecordList
());
// 设置出版社名称
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/set/BookSet.java
View file @
840bdc30
...
...
@@ -2230,4 +2230,51 @@ public class BookSet {
bookDto
.
setIsK12
(
YesOrNoNumEnum
.
NO
.
getValue
());
}
}
public
void
setObjectLabelNames
(
List
<
Object
>
recordList
)
{
if
(
ListUtils
.
isEmpty
(
recordList
))
{
return
;
}
List
<
Long
>
labelIds
=
new
ArrayList
<>();
for
(
Object
o
:
recordList
)
{
BookDto
bookDto
=
(
BookDto
)
o
;
if
(
bookDto
.
getGraLabelId
()
!=
null
)
{
labelIds
.
add
(
bookDto
.
getGraLabelId
());
}
if
(
bookDto
.
getSubLabelId
()
!=
null
)
{
labelIds
.
add
(
bookDto
.
getSubLabelId
());
}
if
(
bookDto
.
getVerLabelId
()
!=
null
)
{
labelIds
.
add
(
bookDto
.
getVerLabelId
());
}
if
(
bookDto
.
getAreaLabelId
()
!=
null
)
{
labelIds
.
add
(
bookDto
.
getAreaLabelId
());
}
if
(
bookDto
.
getVolLabelId
()
!=
null
)
{
labelIds
.
add
(
bookDto
.
getVolLabelId
());
}
}
if
(
ListUtils
.
isEmpty
(
labelIds
))
{
return
;
}
Map
<
Long
,
BookLabel
>
bookLabelMap
=
bookLabelDao
.
getMapByIds
(
labelIds
);
for
(
Object
o
:
recordList
)
{
BookDto
bookDto
=
(
BookDto
)
o
;
if
(
bookLabelMap
.
get
(
bookDto
.
getAreaLabelId
())
!=
null
)
{
bookDto
.
setAreaLabelName
(
bookLabelMap
.
get
(
bookDto
.
getAreaLabelId
()).
getName
());
}
if
(
bookLabelMap
.
get
(
bookDto
.
getVerLabelId
())
!=
null
)
{
bookDto
.
setVerLabelName
(
bookLabelMap
.
get
(
bookDto
.
getVerLabelId
()).
getName
());
}
if
(
bookLabelMap
.
get
(
bookDto
.
getGraLabelId
())
!=
null
)
{
bookDto
.
setGraLabelName
(
bookLabelMap
.
get
(
bookDto
.
getGraLabelId
()).
getName
());
}
if
(
bookLabelMap
.
get
(
bookDto
.
getSubLabelId
())
!=
null
)
{
bookDto
.
setSubLabelName
(
bookLabelMap
.
get
(
bookDto
.
getSubLabelId
()).
getName
());
}
if
(
bookLabelMap
.
get
(
bookDto
.
getVolLabelId
())
!=
null
)
{
bookDto
.
setVolLabelName
(
bookLabelMap
.
get
(
bookDto
.
getVolLabelId
()).
getName
());
}
}
}
}
pcloud-service-book/src/main/resources/mapper/book/Book.Mapper.xml
View file @
840bdc30
...
...
@@ -1865,7 +1865,6 @@
ba.ADVISER_ID, ba.TEMPLET_ID, ba.CHANNEL_ID, ba.CREATED_DATE,
bt.TYPE_NAME, ba.IS_PRINT isPrint,
ba.SECOND_TEMPLET_ID, ba.GRA_LABEL_ID,ba.SUB_LABEL_ID,ba.VER_LABEL_ID,ba.AREA_LABEL_ID,ba.vol_label_id,ba.is_approval,
la1.`name` graLabelName,la2.`name` subLabelName,la3.`name` verLabelName,la4.`name` areaLabelName,la5.`name` volLabelName,
ba.third_TEMPLET_ID, ba.pro_label_id, ba.dep_label_id,ba.pur_label_id
FROM
BOOK_ADVISER ba
...
...
@@ -1877,11 +1876,6 @@
BOOK_TYPE bt
ON
b.TYPE_CODE = bt.TYPE_CODE
LEFT JOIN book_label la1 ON ba.GRA_LABEL_ID=la1.id AND la1.type=1
LEFT JOIN book_label la2 ON ba.SUB_LABEL_ID=la2.id AND la2.type=2
LEFT JOIN book_label la3 ON ba.VER_LABEL_ID=la3.id AND la3.type=3
LEFT JOIN book_label la4 ON ba.AREA_LABEL_ID=la4.id AND la4.type=4
LEFT JOIN book_label la5 ON ba.vol_label_id=la5.id AND la5.type=5
WHERE
ba.IS_DELETE = 0
AND
...
...
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