fix: 修复 ES 搜索的相关 BUG

This commit is contained in:
xiongxiaoyang
2022-05-24 17:00:33 +08:00
parent 471a24a330
commit 23fa646cd6
4 changed files with 72 additions and 63 deletions

View File

@ -7,7 +7,8 @@
id,category_id,category_name,book_name,author_id,author_name,word_count,last_chapter_name
from book_info where word_count > 0
<if test="condition.keyword != null and condition.keyword != ''">
and (book_name like concat('%',#{condition.keyword},'%') or author_name like concat('%',#{condition.keyword},'%'))
and (book_name like concat('%',#{condition.keyword},'%') or author_name like
concat('%',#{condition.keyword},'%'))
</if>
<if test="condition.workDirection != null">
and work_direction = #{condition.workDirection}
@ -30,8 +31,9 @@
<if test="condition.updateTimeMin != null">
and last_chapter_update_time >= #{condition.updateTimeMin}
</if>
order by ${condition.sort}
<if test="condition.sort != null">
order by ${condition.sort}
</if>
</select>
<update id="addVisitCount">