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
b50c3c60
Commit
b50c3c60
authored
Nov 29, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-lz-cut-word-search' into 'master'
平台端书刊添加分词搜索 See merge request rays/pcloud-book!252
parents
cf7d1a2b
177396ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
10 deletions
+46
-10
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+6
-0
BookFacadeImpl.java
...java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
+6
-0
Book.Mapper.xml
...rvice-book/src/main/resources/mapper/book/Book.Mapper.xml
+34
-10
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
b50c3c60
...
...
@@ -632,6 +632,12 @@ public class BookBizImpl implements BookBiz {
paramMap
.
put
(
"isCurrentMonth"
,
isCurrentMonth
);
paramMap
.
put
(
"currentPage"
,
currentPage
*
numPerPage
);
paramMap
.
put
(
"numPerPage"
,
numPerPage
);
if
(!
StringUtil
.
isEmpty
(
bookName
)){
String
[]
bookNameList
=
bookName
.
trim
().
split
(
"\\s+"
);
paramMap
.
put
(
"bookNameList"
,
Lists
.
newArrayList
(
bookNameList
));
}
List
<
BookDto
>
bookList
=
bookDao
.
getListPage4Platform
(
paramMap
);
// 获取平台端所有账号用户名
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
View file @
b50c3c60
...
...
@@ -23,6 +23,8 @@ import com.pcloud.common.permission.PermissionException;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.common.utils.cookie.Cookie
;
import
com.pcloud.common.utils.string.StringUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -633,6 +635,10 @@ public class BookFacadeImpl implements BookFacade {
paramMap
.
put
(
"bookName"
,
bookName
);
paramMap
.
put
(
"secondTempletId"
,
secondTempletId
);
paramMap
.
put
(
"secondTempletIds"
,
Optional
.
ofNullable
(
paramMap
.
get
(
"secondTempletId"
)).
map
(
Lists:
:
newArrayList
).
orElse
(
Lists
.
newArrayList
()));
if
(!
StringUtil
.
isEmpty
(
bookName
)){
String
[]
bookNameList
=
bookName
.
trim
().
split
(
"\\s+"
);
paramMap
.
put
(
"bookNameList"
,
Lists
.
newArrayList
(
bookNameList
));
}
PageBean
pageBean
=
bookBiz
.
listBookClassify
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
);
return
new
ResponseDto
<>(
pageBean
);
}
...
...
pcloud-service-book/src/main/resources/mapper/book/Book.Mapper.xml
View file @
b50c3c60
...
...
@@ -376,8 +376,14 @@
B.SERIAL_NUMBER LIKE CONCAT('%', #{serialNumber},'%')
</if>
<if
test=
"bookName!=null"
>
AND
AND
(
B.BOOK_NAME LIKE CONCAT('%', #{bookName},'%')
<if
test=
"bookNameList != null and bookNameList.size > 0"
>
<foreach
collection=
"bookNameList"
item=
"item"
open=
" "
separator=
" "
close=
" "
>
OR B.BOOK_NAME LIKE CONCAT('%', '${item}','%')
</foreach>
</if>
)
</if>
<if
test=
"isbn!=null"
>
AND
...
...
@@ -429,8 +435,14 @@
B.SERIAL_NUMBER LIKE CONCAT('%', #{serialNumber},'%')
</if>
<if
test=
"bookName!=null"
>
AND
B.BOOK_NAME LIKE CONCAT('%', #{bookName},'%')
AND (
B.BOOK_NAME LIKE CONCAT('%', #{bookName},'%')
<if
test=
"bookNameList != null and bookNameList.size > 0"
>
<foreach
collection=
"bookNameList"
item=
"item"
open=
" "
separator=
" "
close=
" "
>
OR B.BOOK_NAME LIKE CONCAT('%', '${item}','%')
</foreach>
</if>
)
</if>
<if
test=
"isbn!=null"
>
AND
...
...
@@ -440,10 +452,6 @@
AND
B.PUBLISH LIKE CONCAT('%', #{publish},'%')
</if>
<if
test=
"fundName!=null"
>
AND
BF.FUND_NAME LIKE CONCAT('%', #{fundName},'%')
</if>
) a
</select>
...
...
@@ -1309,7 +1317,15 @@
AND ba.CREATED_DATE
<![CDATA[ > ]]>
#{startDate} AND ba.CREATED_DATE
<![CDATA[ < ]]>
#{endDate}
</if>
<if
test=
"bookName!=null"
>
AND b.BOOK_NAME LIKE CONCAT('%', #{bookName},'%')
AND (
(b.BOOK_NAME LIKE CONCAT('%', #{bookName},'%')
<if
test=
"bookNameList != null and bookNameList.size > 0"
>
<foreach
collection=
"bookNameList"
item=
"item"
open=
" "
separator=
" "
close=
" "
>
OR b.BOOK_NAME LIKE CONCAT('%', '${item}','%')
</foreach>
</if>
)
)
</if>
</select>
...
...
@@ -1347,8 +1363,16 @@
AND ba.CREATED_DATE
<![CDATA[ > ]]>
#{startDate} AND ba.CREATED_DATE
<![CDATA[ < ]]>
#{endDate}
</if>
<if
test=
"bookName!=null"
>
AND b.BOOK_NAME LIKE CONCAT('%', #{bookName},'%')
</if>
AND (
(b.BOOK_NAME LIKE CONCAT('%', #{bookName},'%')
<if
test=
"bookNameList != null and bookNameList.size > 0"
>
<foreach
collection=
"bookNameList"
item=
"item"
open=
" "
separator=
" "
close=
" "
>
OR b.BOOK_NAME LIKE CONCAT('%', '${item}','%')
</foreach>
</if>
)
)
</if>
</select>
...
...
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