1. concat 函数
concat函数 将多个字符串连成一个字符串。
SELECT * from book where book_name like CONCAT('%',#{BookName},'%')
2.完整实现
<select id="selectBookPage" parameterType="java.lang.String" BookresultMap="BoookResultMap">
select * from book
<where>
1 = 1
<if test="bookName!=null">
and book_name like concat('%',#{bookName},'%')
</if>
</where>
order by book_create_time desc
</select>