情况一
search = request.form['search']
sql = "select * from posts where title like '%"+search+"%' order by created desc"
情况二
<select id="searchClass" resultMap="paperClassEntityList" parameterType="PaperClassEntity">
select * from paper_categor where category like concat('%', #{category},'%') and is_deleted=1
</select>