摘录自:http://flt95.blog.163.com/blog/static/12736128920136185841551/
<if test="p=='1'">
and t.receive_vaybill_time > to_date(#{theWeekFirst},'yyyy-mm-dd hh24:mi:ss') and
t.receive_vaybill_time <![CDATA[<=]]> to_date(#{theWeekLast},'yyyy-mm-dd hh24:mi:ss')
</if>
mybatis如果里面包括<号的话一定要<![CDATA[小于号]]>这样表示才不会报错!
或者
重要片段:
<if test="endTime !=null and endTime !=''">
<![CDATA[AND notice_time <= #{endTime }]]>
</if>