|
@@ -64,24 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and date_format(oper_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
|
|
</if>
|
|
|
</where>
|
|
|
- <choose>
|
|
|
- <when test="title == null and title == '' and businessType == null
|
|
|
- and (userId == null or userId == '')
|
|
|
- and (startTime == null or startTime == '')
|
|
|
- and (endTime == null or endTime == '')">
|
|
|
- <!-- 先通过索引快速定位最近60000条的起始点 -->
|
|
|
- WHERE id >= (
|
|
|
- SELECT id FROM your_table
|
|
|
- ORDER BY oper_time DESC
|
|
|
- LIMIT 60000, 1
|
|
|
- )
|
|
|
- ORDER BY oper_time DESC 60000
|
|
|
- </when>
|
|
|
- <!-- 有查询条件时使用正常排序和分页 -->
|
|
|
- <otherwise>
|
|
|
- ORDER BY oper_time DESC 60000
|
|
|
- </otherwise>
|
|
|
- </choose>
|
|
|
+ order by oper_time desc limit 60000;
|
|
|
</select>
|
|
|
|
|
|
<delete id="deleteOperLogByIds" parameterType="Long">
|