MyBatis中动态加载where条件

1、trim 

2、where 1 = 1

where 1=1 
<if test="beginDate !=null and beginDate !='' ">
and   to_date(to_char(t.rkrqdate,'yyyy-mm-dd'),'yyyy-mm-dd') <![CDATA[>=]]>  to_date(#{beginDate},'yyyy-mm-dd') 
</if>

  

美好生活
原文地址:https://www.cnblogs.com/ssbydk/p/9550284.html