<if test="createTime != null and createTime != ''">
and DATE_FORMAT(r.CREATE_TIME,'%Y-%m-%d') = DATE_FORMAT(#{createTime},'%Y-%m-%d')
</if>
mybatis将时间都转为日期进行比较
最新推荐文章于 2024-01-30 12:35:33 发布
<if test="createTime != null and createTime != ''">
and DATE_FORMAT(r.CREATE_TIME,'%Y-%m-%d') = DATE_FORMAT(#{createTime},'%Y-%m-%d')
</if>