ibatis 问题求求
Ibatis中我门在一个SQL中有两个条件,两个条件都有可能为空,该怎么写。(这里问的是Ibatis的高级特性,可以用NotEmpty等)
------解决方案--------------------where 1=1
<isNotNull prepend= ", " property= "empID ">
and EMP_ID=#empID#
</isNotNull>
<isNotNull prepend= ", " property= "corpID ">
and CORP_ID=#corpID#
</isNotNull>
------解决方案-------------------- <dynamic prepend= "WHERE ">
<isNotEmpty prepend= "AND " property= "... ">
...
</isNotEmpty>
...
</dynamic>