From 7b559b401165461f9693bb266d64475fdb268a2a Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期一, 17 十月 2022 15:48:05 +0800
Subject: [PATCH] #feat 修改日志查询时间

---
 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
index c030bcc..af7ba81 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -6,6 +6,7 @@
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.IdcardUtil;
 import cn.hutool.core.util.NumberUtil;
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -1490,6 +1491,11 @@
         }
         page.setSize(pageSize);
         page.setCurrent(pageNum);
+        //因操作日志数据量太大,如果没有时间查询条件,默认查询最近十五天的数据
+        if (StrUtil.isEmpty(sysOperLogVO.getStartTime()) && StrUtil.isEmpty(sysOperLogVO.getEndTime())){
+            sysOperLogVO.setStartTime(com.panzhihua.common.utlis.DateUtils.getBeforeDay(15));
+            sysOperLogVO.setEndTime(com.panzhihua.common.utlis.DateUtils.getCurrentDateymd());
+        }
         IPage<SysOperLogVO> iPage = sysOperLogDAO.pageOperLog(page, sysOperLogVO);
         return R.ok(iPage);
     }

--
Gitblit v1.7.1