|
@@ -64,7 +64,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and date_format(oper_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
|
|
</if>
|
|
|
</where>
|
|
|
- order by oper_time desc limit 60000;
|
|
|
+ <choose>
|
|
|
+ <when test="...无查询条件...">
|
|
|
+ <!-- 默认只查最近3个月数据 + LIMIT -->
|
|
|
+ WHERE oper_time >= DATE_SUB(NOW(), INTERVAL 1 MONTH)
|
|
|
+ ORDER BY oper_time DESC
|
|
|
+ LIMIT 60000
|
|
|
+ </when>
|
|
|
+ <!-- 有查询条件时使用正常排序和分页 -->
|
|
|
+ <otherwise>
|
|
|
+ ORDER BY oper_time DESC 60000
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
</select>
|
|
|
|
|
|
<delete id="deleteOperLogByIds" parameterType="Long">
|