class HabitStatisticServiceImpl implements HabitStatisticService {

    @Cacheable(value = CacheConstants.HABIT_ITEM_STATISTIC_CACHE, key = "#language")
    @Override
    public List<HabitItemsAmountStatisticDto> getTodayStatisticsForAllHabitItems(String language) {
        return habitStatisticRepo.getStatisticsForAllHabitItemsByDate(new Date(), language).stream()
            .map(it ->
                HabitItemsAmountStatisticDto.builder()
                    .habitItem((String) it.get(0))
                    .notTakenItems((long) it.get(1))
                    .build()
            ).collect(Collectors.toList());
    }

    @Autowired public  HabitStatisticServiceImpl(HabitStatisticRepo habitStatisticRepo,
                                     HabitRepo habitRepo,
                                     HabitService habitService, ModelMapper modelMapper,
                                     DateService dateService);

}