From 0b47a5aee56e00f2d66d581bdd3c34cc32cd99b0 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期二, 18 十月 2022 10:12:01 +0800
Subject: [PATCH] Merge branch 'local_20221014' into huacheng_test

---
 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java |   15 +++++++++++++--
 1 files changed, 13 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 b36910f..fcfafd8 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
@@ -17,6 +17,8 @@
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.NumberUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.core.util.*;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.core.JsonProcessingException;
@@ -222,6 +224,10 @@
             sysUserDO1.setPassword(encode);
             sysUserDO1.setType(1);
             sysUserDO1.setAppId(appId);
+            //设置默认头像地址
+            sysUserDO1.setImageUrl("https://www.psciio.com//idcard/f15c91f940624ed59537ecced1059f18.jpg");
+            //设置默认用户名
+            sysUserDO1.setNickName("用户" + RandomUtil.randomString(8));
             num = userDao.insert(sysUserDO1);
         } else {
             String encode = new BCryptPasswordEncoder().encode(UserConstants.PASSWORD);
@@ -1580,6 +1586,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);
     }
@@ -3568,8 +3579,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