若是要處理int[] 轉換成 List<Integer>這種形式的,能夠用下面這個方法:io
List<Integer> orgIds = Arrays.stream(reqVo.organizationIds).boxed().collect(Collectors.toList());stream
過濾去重能夠用下面這個方法:List
List<Integer> newOrgIds =orgIds .stream().distinct().collect(Collectors.toList());方法