Mybatis 模糊查询
例子:
<select id="findByCondition" resultMap="MallPhysicalMap">
select * from system_manager.mall_physical
<if test="value != null and value.length > 0">
where mall_name like CONCAT('%','${value}','%') or mall_adminname like CONCAT('%','${value}','%') or mall_address like CONCAT('%','${value}','%')
</if>
</select>
该sql即可实现 字段前后模糊查询 既能够解决sql注入又能在配置文件中写%,借助mysql的函数