[fix] records

This commit is contained in:
wujiawei 2024-11-13 21:12:28 +08:00
parent 20bb29350c
commit 5a079fcba8

View File

@ -256,7 +256,7 @@ public class LazyVisitorPortFlowApplicationImpl implements LazyVisitorPortFlowAp
lazyVisitorPortFlow.setServerId(serverId); lazyVisitorPortFlow.setServerId(serverId);
return lazyVisitorPortFlowRepository.findPageGroupByClientId(size, current, lazyVisitorPortFlow).convert(visitorPortFlowLazyPage -> { return lazyVisitorPortFlowRepository.findPageGroupByClientId(size, current, lazyVisitorPortFlow).convert(visitorPortFlowLazyPage -> {
List<String> clientIdList = visitorPortFlowLazyPage List<String> clientIdList = visitorPortFlowLazyPage
.getRecord() .getRecords()
.stream() .stream()
.map(LazyVisitorPortFlow::getClientId) .map(LazyVisitorPortFlow::getClientId)
.toList(); .toList();
@ -268,7 +268,7 @@ public class LazyVisitorPortFlowApplicationImpl implements LazyVisitorPortFlowAp
List<LazyVisitorPortFlowDTO> lazyVisitorPortFlowDTOList = lazyVisitorPortFlowList.stream().map(VisitorPortFlowDTOAssembler.INSTANCE::fromVisitorFlow).toList(); List<LazyVisitorPortFlowDTO> lazyVisitorPortFlowDTOList = lazyVisitorPortFlowList.stream().map(VisitorPortFlowDTOAssembler.INSTANCE::fromVisitorFlow).toList();
Map<String/*客户端ID*/, List<LazyVisitorPortFlowDTO>> client_port_flow_map = lazyVisitorPortFlowDTOList.stream().collect(Collectors.groupingBy(visitorPortFlowDTO -> visitorPortFlowDTO.getClientId())); Map<String/*客户端ID*/, List<LazyVisitorPortFlowDTO>> client_port_flow_map = lazyVisitorPortFlowDTOList.stream().collect(Collectors.groupingBy(LazyVisitorPortFlowDTO::getClientId));
Map<String/*客户端ID*/, Integer/*客户端进口流量*/> client_in_flow = lazyVisitorPortFlowDTOList.stream() Map<String/*客户端ID*/, Integer/*客户端进口流量*/> client_in_flow = lazyVisitorPortFlowDTOList.stream()
.collect( .collect(