mybatis使用模糊查询需要注意的问题

如何在MyBatis中使用模糊查询:其中area_name为参数

  • 代码所示:

    1
    2
    3
    4
    5
    <select id="selectCodeByName" resultType="java.lang.String">
    select 字段列表
    from 表名
    where 字段名 like CONCAT('%',#{参数名,jdbcType=参数类型中})
    </select>