mybatis中有没有办法测试查询参数映射中是否包含某个参数?
我正在寻找这样的东西:
<select id="selectByKey" resultMap="MyObjectMap" parameterType="map">
select obj.* from obj where obj.id=#{id:VARCHAR}
<!-- I'm looking for a method like that below -->
<if test="parameterExists('forUpdate')">
<if test="forUpdate == 1">
for update
</if>
</if>
</select>