码迷,mamicode.com
首页 > 其他好文 > 详细

mybatis中时间比较

时间:2020-06-25 17:43:14      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:style   orm   end   and   mybatis   null   start   bat   cdata   

<where>
<if test="start_time!=null and start_time!=‘‘">
/*方法一*/
<![CDATA[AND DATE_FORMAT(start_time, ‘%Y-%m-%d‘)>= DATE_FORMAT(#{start_time}, ‘%Y-%m-%d‘)]]>
</if>
<if test="end_time!=null and end_time!=‘‘">
/*方法二*/
and end_time<![CDATA[ <= ]]>#{end_time}
</if>
</where>

mybatis中时间比较

标签:style   orm   end   and   mybatis   null   start   bat   cdata   

原文地址:https://www.cnblogs.com/cai170221/p/13192230.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!