str = StringUtils.join(list, ",");
List<String> result = Arrays.asList(str.split(","));
List<Integer> setidlist = dirList.stream().map(InvestorDirPo :: getDomainId).distinct().collect(Collectors.toList());
list.stream().collect(Collectors.joining(","))
dirlist.sort((a, b) -> a.getDomainId() - b.getDomainId())
dirlist.stream().sorted(Comparator.comparing(InvestorDirPo::getDomainId)).map(InvestorDirPo::getDomainId).distinct().collect(Collectors.toList());
List<Integer> idList = list.stream().filter(project -> Objects.equals(project.getProjectTypeId(), ProductTypeDesc.金融资产转让.value))
.map(ProjectBaseinfo :: getId).collect(Collectors.toList())
List<Integer> list = Arrays.asList(RegisterSourceDesc.机构.type, RegisterSourceDesc.平台.type)
``
@Test
public void test2() {
String str = “/data/Data/uf01.qdfae.local/2020/10/project/”;
String str2 = str.substring(0, StringUtils.ordinalIndexOf(str,"/",4));
System.out.println("****:"+str2);
//-- str2=/data/Data/uf01.qdfae.local
}
某个字段累加
applyList.stream().map(BizorderApply::getPaidMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
dbListingFileMap = dbListingFileList.stream()
.collect(Collectors.toMap(
ListingFilePo::getId,
file -> file
));