yanghui
2022-10-17 bf4e5b0fa261848a2ea63112ed07fcbf8fc0ed23
Merge branch 'local_20221014' into huacheng_test

# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
1个文件已修改
13 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -3558,15 +3558,18 @@
                activeDate = getMonthTwentyDays();
            }
        }
        //获取最近活跃人数
        Map<String, Long> active = userDao.getActive(activeX, streetId, areaCode, appId);
        List<UsersStatisticsDTO> actives = userDao.getActive(activeX, streetId, areaCode, appId);
        //获取最近注册人数
        Map<String, Long> dailyAdd = userDao.getDailyAdd(activeX, streetId, areaCode, appId);
        List<UsersStatisticsDTO> dailyAdds = userDao.getDailyAdd(activeX, streetId, areaCode, appId);
        Map<String, String> activeMap = actives.stream().collect(Collectors.toMap(UsersStatisticsDTO::getSpecificDate, UsersStatisticsDTO::getTotal));
        Map<String, String> dailyAddMap = dailyAdds.stream().collect(Collectors.toMap(UsersStatisticsDTO::getSpecificDate, UsersStatisticsDTO::getTotal));
        for (Date date : activeDate) {
            String dateStr = DateUtil.format(date, "yyyy-MM-dd");
            activeY.add(active.containsKey(dateStr) ? active.get("activeUser").toString() : "0");
            adY.add(dailyAdd.containsKey(dateStr) ? dailyAdd.get("addUser").toString() : "0");
            activeY.add(activeMap.containsKey(dateStr) ? activeMap.get("activeUser").toString() : "0");
            adY.add(dailyAddMap.containsKey(dateStr) ? dailyAddMap.get("addUser").toString() : "0");
        }
        vo.setUserX(getMAndD(activeDate));