Map<String, List> map = new HashMap<>(); pushMapper.getList(map); List pushList = map.getOrDefault("result", new ArrayList<>()); List pushVOList = pushList.stream() .collect(Collectors.groupingBy(Push::getModule)) .entrySet() .stream() .map(entry -> PushVO.builder() .module(entry.getKey()) .messageList(PushConverter.INSTANCE.toPushDTO(entry.getValue())) .build()) .collect(Collectors.toList()); return pushVOList;

MapString ListPush map = new HashMap; pushMappergetListmap; ListPush pushList = mapgetresult; if pushList == null return new ArrayList; ListPushVO pushV

原文地址: https://www.cveoy.top/t/topic/brH0 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录