Ibatis实现多条件查询

isPropertyAvailable property="commandState">
<isNotNull property="commandState" prepend=" and ">
<isEqual  property="commandState" compareValue = "1">
<![CDATA[
iu.commandState <= #commandState#
]]>
</isEqual>
     <isEqual  property="commandState" compareValue = "0">
        iu.commandState is null
    </isEqual>
    
</isNotNull>
</isPropertyAvailable>



注意: 正确写法: iu.commandState is null 
      错误写法: iu.commandState==null

你可能感兴趣的:(ibatis)