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>
本文深入解析了Mybatis动态SQL中单一基础类型参数的使用方法,特别是如何在test中正确使用_parameter来实现灵活的条件查询。
2390

被折叠的 条评论
为什么被折叠?



