isNotEmpty isNotNull

ibatis : isNotEmpty:过滤空串""和空null

isNotNull: 只过滤空null

   php : isset:过滤null和未定义

          isEmpty:过滤false、空串""、null

Exp
<select id="getWorkDutyDesp"  parameterClass="java.util.Map"  resultClass="java.util.HashMap">
SELECT LPM.WORK_TYPE "workType",
    LPM.DESCRIPTION "description"
FROM L_PM_WORK_TYPE_TBL LPM
WHERE LPM.IS_VALID = 'Y'
<!--  判断Null和“”空字符串  -->
<isNotEmpty prepend="AND" property="workType">
LPM.WORK_TYPE=#workType#
</isNotEmpty>
<!-- 只判断null -->
<isNotNull prepend="AND" property="workType1">
LPM.WORK_TYPE=#workType1#
</isNotNull>
    </select>

你可能感兴趣的:(ibatis,isnotempty)