<if test="type ==1"> and DATE_FORMAT(create_date,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d') & ...
<if test="type ==1"> and DATE_FORMAT(create_date,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d') & ...
直接上代码,此时数据库使用的Date类型: 若是字符串类型,也可以直接比较,如下: <if test="minCreateTime != null and minCreateTime != ''"> < ...
<if test="beginTestTime != null and endTestTime != null and beginTestTime != '' and endTestTim ...
在Service等地方获取当前时间: SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式 注意大写HH是24小时制 ...
...
在开始时间和结束时间内的一段时间范围的查询 <if test="timeStart != null and timeStart != ''"> and wfsj >= to_date(#{timeStart}, 'yyyy-MM-dd hh24:mi:ss') < ...
...
一、mybatis配置文件的文件头 二、mybatis 映射文件的文件头 ...