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
16871da1
Commit
16871da1
authored
Oct 12, 2021
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:[none]agentBookListSlowsql
parent
dc41f803
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
2 deletions
+91
-2
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+1
-1
Book.Mapper.xml
...rvice-book/src/main/resources/mapper/book/Book.Mapper.xml
+90
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
16871da1
...
@@ -1282,7 +1282,7 @@ public class BookBizImpl implements BookBiz {
...
@@ -1282,7 +1282,7 @@ public class BookBizImpl implements BookBiz {
if
(
ListUtils
.
isEmpty
(
agent4AdviserIds
))
{
if
(
ListUtils
.
isEmpty
(
agent4AdviserIds
))
{
return
new
PageBean
(
0
,
0
,
new
ArrayList
<>());
return
new
PageBean
(
0
,
0
,
new
ArrayList
<>());
}
}
PageBean
pageBean
=
bookDao
.
listPage
(
pageParam
,
paramMap
,
"listPage4Agent"
);
PageBean
pageBean
=
bookDao
.
listPage
(
pageParam
,
paramMap
,
"listPage4Agent"
,
"countListPage4Agent"
);
if
(
pageBean
==
null
||
ListUtils
.
isEmpty
(
pageBean
.
getRecordList
()))
{
if
(
pageBean
==
null
||
ListUtils
.
isEmpty
(
pageBean
.
getRecordList
()))
{
return
new
PageBean
(
pageParam
.
getPageNum
(),
pageParam
.
getNumPerPage
(),
pageBean
.
getTotalCount
(),
new
ArrayList
<>());
return
new
PageBean
(
pageParam
.
getPageNum
(),
pageParam
.
getNumPerPage
(),
pageBean
.
getTotalCount
(),
new
ArrayList
<>());
}
}
...
...
pcloud-service-book/src/main/resources/mapper/book/Book.Mapper.xml
View file @
16871da1
...
@@ -1331,7 +1331,96 @@
...
@@ -1331,7 +1331,96 @@
</if>
</if>
GROUP BY A.BOOK_ID, A.CHANNEL_ID
GROUP BY A.BOOK_ID, A.CHANNEL_ID
ORDER BY
ORDER BY
A.CREATED_DATE DESC
A.IS_DELETE, A.CREATED_DATE DESC
</select>
<!-- 书刊列表-出版端-书刊总数-->
<select
id=
"countListPage4Agent"
parameterType=
"map"
resultType=
"integer"
>
SELECT
count(1)
FROM
(
SELECT
A.BOOK_ID
FROM
BOOK_ADVISER A
INNER JOIN
BOOK B
ON
A.BOOK_ID = B.BOOK_ID AND A.IS_DELETE = 0 AND B.IS_DELETE = 0
AND
A.ADVISER_ID IN
<foreach
collection=
"agent4AdviserIds"
index=
"i"
item=
"item"
open=
"("
separator=
","
close=
")"
>
${item}
</foreach>
AND A.IS_MAIN_EDITOR = 1
<if
test=
"isFundSupport != null"
>
LEFT JOIN BOOK_FUND BF
ON BF.BOOK_ID = A.BOOK_ID AND BF.END_TIME
<![CDATA[ > ]]>
NOW() AND BF.START_TIME
<![CDATA[ < ]]>
NOW()
</if>
<if
test=
"minimumSupport != null"
>
LEFT JOIN book_minimum_support s
ON B.BOOK_ID = s.book_id AND s.end_time
<![CDATA[ > ]]>
NOW() AND s.start_time
<![CDATA[ < ]]>
NOW()
</if>
WHERE
1=1
<if
test=
"typeCode!=null"
>
AND B.TYPE_CODE = #{typeCode}
</if>
<if
test=
"channelId!=null"
>
AND A.CHANNEL_ID = #{channelId}
</if>
<if
test=
"bookName!=null"
>
AND (B.BOOK_NAME LIKE CONCAT('%',#{bookName},'%')
OR B.ISBN LIKE CONCAT(#{bookName},'%')
<if
test=
"nameList != null and nameList.size > 0"
>
OR (
<foreach
collection=
"nameList"
close=
" "
separator=
" and "
open=
" "
item=
"item"
>
(B.BOOK_NAME LIKE CONCAT('%', '${item}', '%'))
</foreach>
)
</if>
<if
test=
"adviserIds!=null and adviserIds.size()>0"
>
OR
A.ADVISER_ID in
<foreach
collection=
"adviserIds"
item=
"item"
open=
"("
separator=
","
close=
")"
>
${item}
</foreach>
</if>
)
</if>
<if
test=
"isbn!=null"
>
AND B.ISBN LIKE CONCAT(#{isbn},'%')
</if>
<if
test=
"templetId!=null"
>
AND A.TEMPLET_ID = #{templetId}
</if>
<if
test=
"secondTempletIds!=null and secondTempletIds.size()>0"
>
AND A.SECOND_TEMPLET_ID in
<foreach
collection=
"secondTempletIds"
item=
"item"
open=
"("
separator=
","
close=
")"
>
${item}
</foreach>
</if>
<if
test=
"thirdTempletIds!=null and thirdTempletIds.size()>0"
>
AND A.third_TEMPLET_ID in
<foreach
collection=
"thirdTempletIds"
item=
"item"
open=
"("
separator=
","
close=
")"
>
${item}
</foreach>
</if>
<if
test=
"isFundSupport != null"
>
AND BF.BOOK_FUND_ID IS NOT NULL
</if>
<if
test=
"isPrint != null"
>
AND A.IS_PRINT = #{isPrint}
</if>
<if
test=
"minimumSupport != null"
>
AND s.id is NOT NULL
</if>
<if
test=
"startTime!=null and endTime!=null"
>
and b.CREATED_DATE between #{startTime} and #{endTime}
</if>
GROUP BY A.BOOK_ID, A.CHANNEL_ID
) tmp
</select>
</select>
<!-- 获取书籍列表(APP) -->
<!-- 获取书籍列表(APP) -->
...
...
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