fix: cast Collection to ArrayList before stream and subList operations

This commit is contained in:
tianfeng 2026-05-27 11:59:45 +08:00
parent c4b3a0a078
commit a2f94f029c

View File

@ -75,7 +75,7 @@ public class UserFreightBalanceRestServiceImpl implements UserFreightBalanceRest
}
// 批量查询 userId countryCode按区域过滤
List<UserFreightBalanceDTO> allRecords = freightPageResult.getRecords();
List<UserFreightBalanceDTO> allRecords = new ArrayList<>(freightPageResult.getRecords());
Set<Long> allUserIds = allRecords.stream().map(UserFreightBalanceDTO::getUserId).collect(Collectors.toSet());
Map<Long, UserProfile> profileMap = userProfileGateway.mapByUserIds(allUserIds);