字符串
<if test='startDate != null and startDate != "" ' > and status = 0 </if> 外面是單引號,里面是雙引號。 如果里面是單引號,mybatis處理時是用的OGNL 的表達式, 單引號的 ('y')會被解析成字符
Boolean
<choose>
<when test="isReSend">
and (info.batchId is not null)
</when>
<otherwise>
and (info.batchId = '' or info.batchId is null)
</otherwise>
</choose>
或者
<choose>
<when test="isReSend==true">
and (info.batchId is not null)
</when>
<otherwise>
and (info.batchId = '' or info.batchId is null)
</otherwise>
</choose>
