mybatis里面的模糊查询

来源:互联网 发布:戴墨镜叼烟修图软件 编辑:程序博客网 时间:2024/05/19 13:14
<select id="selectByNameVague" parameterType="string" resultMap="BreedFactoryMap">    SELECT    <include refid="cols_all"/>    FROM    <include refid="tb"/>    <where>        <if test="_parameter!=null">AND name LIKE concat('%',#{_parameter},'%')</if>    </where></select>