ibatis常用标记略记

isNull判断property字段是否是null,用isEmpty更方便,包含了null和空字符串

isEqual相当于equals,数字用得多些,一般都是判断状态值
<isEqual property="state" compareValue="0">
</isEqual>

<isEqual property="state" compareProperty="nextState">
</isEqual>

传入的map或者类的属性name等于"1"吗,是就附加and和vvvv = '哈哈'
<isEqual property="name" compareValue="1" prepend="and">
    vvvv = '哈哈'
</isEqual>

传入的map或者类的属性name是null吗,是就附加and和vvvv = null
<isNull property="name" prepend="and">
    vvvv = null
</isNull>

你可能感兴趣的:(ibatis常用标记略记)