Commit 33ed697f by fengshuonan

适配between and字段

parent 297a786e
......@@ -37,7 +37,8 @@
from sys_login_log
where 1 = 1
<if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''">
and (create_time between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
and create_time &gt;= to_date(#{beginTime}||'00:00:00','yyyy-mm-dd hh24:mi:ss')
and create_time &lt;= to_date(#{endTime}||'23:59:59','yyyy-mm-dd hh24:mi:ss')
</if>
<if test="logName != null and logName !=''">
and log_name like '%' || #{logName} || '%'
......
......@@ -40,7 +40,8 @@
<include refid="Base_Column_List"/>
from sys_operation_log where 1 = 1
<if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''">
and (create_time between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
and create_time &gt;= to_date(#{beginTime}||'00:00:00','yyyy-mm-dd hh24:mi:ss')
and create_time &lt;= to_date(#{endTime}||'23:59:59','yyyy-mm-dd hh24:mi:ss')
</if>
<if test="logName != null and logName !=''">
and log_name like '%' || #{logName} || '%'
......
......@@ -65,7 +65,8 @@
and (dept_id = #{deptId} or dept_id in ( select dept_id from sys_dept where pids like '%[' || #{deptId} || ']%'))
</if>
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and (create_time between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
and create_time &gt;= to_date(#{beginTime}||'00:00:00','yyyy-mm-dd hh24:mi:ss')
and create_time &lt;= to_date(#{endTime}||'23:59:59','yyyy-mm-dd hh24:mi:ss')
</if>
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment