thinkhk 发表于 2016-11-27 10:52:52

Mybatis动态SQL单一基础类型参数用if标签

Mybatis动态SQL单一基础类型参数用if标签时,test中应该用 _parameter,如:

<select id="selectByName" resultMap="ResultMap" parameterType="java.lang.String" >
select * from table1
<if test="_parameter != null">
where _name = #{name}
</if>
</select>
页: [1]
查看完整版本: Mybatis动态SQL单一基础类型参数用if标签