<if test="type ==1"> and DATE_FORMAT(create_date,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d') </if> <if test="type ==2"> <![CDATA[ and DATE_FORMAT(crea ...
<if test="type ==1">
and DATE_FORMAT(create_date,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d')
</if>
<if test="type ==2">
<![CDATA[
and DATE_FORMAT(create_date,'%Y-%m-%d') >= DATE_FORMAT(#{minDate},'%Y-%m-%d')
and DATE_FORMAT(create_date,'%Y-%m-%d') <= DATE_FORMAT(#{maxDate},'%Y-%m-%d')
]]>
</if>
<if test="type ==3">
and DATE_FORMAT(create_date,'%Y-%m') = DATE_FORMAT(CURDATE(),'%Y-%m')
</if>
orcal的時間比較
select * from RegulatoryRecord where regulatorydate < to_date('2018-08-15 15:58:00','yyyy-mm-dd hh24:mi:ss')