<if test="excStartTime!=null and excStartTime!=''">
<![CDATA[ and DATE_FORMAT(dl.exc_start_time, '%Y-%m-%d')>= DATE_FORMAT(#{excStartTime}, '%Y-%m-%d') ]]>
</if>
<if test="excEndTime!=null and excEndTime!=''">
<![CDATA[ and DATE_FORMAT(dl.exc_end_time, '%Y-%m-%d') <= DATE_FORMAT(#{excEndTime}, '%Y-%m-%d') ]]>
</if>
大于號(hào)和小于號(hào)在mybatis中不起作用,所以要轉(zhuǎn)換一下.或者使用轉(zhuǎn)義符.
<if test="excTimeLength != null">
and dl.exc_time_length >= #{excTimeLength,jdbcType=INTEGER}
</if>
<小于號(hào) < > 大于號(hào)>