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 | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 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 04ad305..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); } @@ -3473,8 +3479,8 @@ for (Date date : activeDate) { String dateStr = DateUtil.format(date, "yyyy-MM-dd"); - activeY.add(activeMap.containsKey(dateStr) ? activeMap.get("activeUser").toString() : "0"); - adY.add(dailyAddMap.containsKey(dateStr) ? dailyAddMap.get("addUser").toString() : "0"); + activeY.add(activeMap.containsKey(dateStr) ? activeMap.get(dateStr) : "0"); + adY.add(dailyAddMap.containsKey(dateStr) ? dailyAddMap.get(dateStr) : "0"); } vo.setUserX(getMAndD(activeDate)); -- Gitblit v1.7.1