mybatis oracle 模糊查询like

  <select id="countFarmerInfoListByListId" resultType="int">
        select
        count(1) from AIMS_FRAMER_INFO
        where id_aims_list_info = #{listInfoId,jdbcType=VARCHAR}
        and create_by = #{userId,jdbcType=VARCHAR}
        <if test="farmerName !='' and farmerName !=null">
            and frame_name like concat(concat('%',#{farmerName,jdbcType=VARCHAR}),'%')
        if>
    select>

你可能感兴趣的:(java)