<!-- Way 1 -->
<if test="projectName!=null and projectName!=''">
<bind name="projectName_" value="'%'+projectName+'%'"/>
AND info.name like #{projectName_}
</if>
<!-- Way 2 -->
<if test="projectName!=null and projectName!=''">
AND info.name like concat('%',#{projectName_},'%')
</if>
1. Mybatis like模糊查询拼接