合并userLoginLogList所有areaId,并去除非空值:
List<Long> areaIds = userLoginLogList.stream().map(UserLoginLogStatisticsVO::getAreaId).filter(x -> x !=null ).collect(Collectors.toList());
主要说明:
List<UserLoginLogStatisticsVO> userLoginLogList;
class UserLoginLogStatisticsVO{
private Long areaId;
}