| | |
| | | import com.panzhihua.service_user.entity.SysTemplateConfig; |
| | | import com.panzhihua.service_user.model.dos.*; |
| | | import com.panzhihua.service_user.model.dtos.DataKanbanDTO; |
| | | import com.panzhihua.service_user.model.dtos.UsersStatisticsDTO; |
| | | import com.panzhihua.service_user.service.EventGridMemberBuildingRelationService; |
| | | import com.panzhihua.service_user.service.UserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | 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(dateStr) : "0"); |
| | | adY.add(dailyAddMap.containsKey(dateStr) ? dailyAddMap.get(dateStr) : "0"); |
| | | |
| | | } |
| | | vo.setUserX(getMAndD(activeDate)); |