再学习巩固后我总结以下两种方法
一,<bind name="" value="'%' + xxx + '%'"/>方法
<select id="xxx" resultMap="xxx" parameterType="xxx" > select * from xxxx <where> <if test="xxx!=null and xxx!=''"> <bind name="xxx" value="'%'+xxxx+'%'"/> xxxxlike #{xxxx} </if> </where> </select>
二 ,CONCAT()拼接方法
select * from xxxx where xxx like CONCAT('%',CONCAT(#{xx},'%'))
该方法不支持oracle数据库