时间
yyyy-MM-dd hh24:mi:ss 像这种前台传的时间基本可以接过来
to_date(#{startTime},'yyyy-MM-dd hh24:mi:ss'
进行 模糊查询时
<if test="字段 != null and 字段 != ''">and 字段 like '%'|| #{字段}||'%'</if>
<if test="字段 != null and 字段 != ''">and 字段 like '%'|| #{字段}||'%'</if>
必须两边 加 || 不然进行不了模糊查询
本文探讨了如何在Java中使用to_date函数处理yyyy-MM-ddhh24:mi:ss格式的时间输入,并介绍如何在模糊查询中正确使用LIKE操作符,确保添加占位符以适应多种情况。
1223

被折叠的 条评论
为什么被折叠?



