mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-11-28 02:11:50 +08:00
日志管理使用索引提升查询性能
This commit is contained in:
@@ -31,10 +31,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(access_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
AND access_time >= #{params.beginTime}
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(access_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
AND access_time <= #{params.endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by info_id desc
|
||||
|
||||
@@ -55,10 +55,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND oper_name like concat('%', #{operName}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(oper_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
AND oper_time >= #{params.beginTime}
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(oper_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
AND oper_time <= #{params.endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by oper_id desc
|
||||
|
||||
Reference in New Issue
Block a user