1、iBATIS动态标签 标签二元标签一元标签标签 共同的属性 prepend,open,close标签标签属性 prepend,open,close二元条件标签 比较属性值和静态值或另一个属性值是否相等 比较属性值和静态值或另一个属性值是否不相等。 比较属性值是否大于静态值或另一个属性值。 比较属性值是否大于等于静态值或另一个属性值。 比较属性值是否小于静态值或另一个属性值。 比较属性值是否小于等于静态值或另一个属性值。 一元条件标签 检查是否存在该属性(存在parameter bean的属性) 检查是否不存在该属性(不存在parameter bean的属性) 检查属性是否为null 检查属性是
2、否不为null 检查Collection.size()的值,属性的String或String.valueOf()值,是否为null或空(“”或size() 检查Collection.size()的值,属性的String或String.valueOf()值,是否不为null或不为空(“”或size() 0)其他标签 检查是否存在参数对象(不为null) 检查是否不存在参数对象(参数对象为null) 遍历类型为java.util.List的元素。 view plaincopy to clipboardprint?SELECT orders.id as id, orders.product as p
3、roduct, orders.customer as customer FROM orders customer IS NOT NULLorders.customer=#username# SELECT o.id as id, o.product as product, o.customer as customer FROM orders o INNER JOIN user_account a ON o.customer=a.username a.groupname=#groupname# SELECT orders.id as id, orders.product as product, o
4、rders.customer as customer FROM orders product=#product# customer=#customer# SELECT * FROM orders product=#keywords# SELECTorders.id as id,orders.product as product,orders.customer as customerFROM orderscustomer IS NOT NULLorders.customer=#username#SELECTo.id as id,o.product as product,o.customer as customerFROM orders oINNER JOIN user_account a ON o.customer=a.usernamea.groupname=#groupname#SELECTorders.id as id,orders.product as product,orders.customer as customerFROM ordersproduct=#product#customer=#customer#SELECT*FROM ordersproduct=#keywords#