Commit 3e56350a by 田超

Merge branch 'feature/1004250' into 'master'

feat: [1004250] 编辑端搜书

See merge request rays/pcloud-book!1185
parents e04a0340 da70e398
......@@ -320,6 +320,10 @@ public class BookFacadeImpl implements BookFacade {
paramMap.put("isFundSupport", isFundSupport);
paramMap.put("channelId", channelId);
paramMap.put("name", name != null && "".equals(name.trim()) ? null : name);
if(!StringUtil.isEmpty(name)){
String [] nameList = name.trim().split("[\u00A0|\u3000|\u0020]");
paramMap.put("nameList", Lists.newArrayList(nameList));
}
paramMap.put("isbn", isbn != null && "".equals(isbn.trim()) ? null : isbn);
paramMap.put("bookName", bookName != null && "".equals(bookName.trim()) ? null : bookName);
paramMap.put("typeCode", typeCode != null && "".equals(typeCode.trim()) ? null : typeCode);
......
......@@ -561,8 +561,18 @@
B.ISBN LIKE CONCAT(#{isbn},'%')
</if>
<if test="name != null">
AND
AND
(
(B.BOOK_NAME LIKE CONCAT('%', #{name}, '%') OR B.ISBN LIKE CONCAT(#{name},'%') OR CONCAT('BK',A.BOOK_ID) = #{name})
<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>
<if test="isMainEditor != null">
AND
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment