集合排序链接
集合排序链接
List<String> result = Lists.newArrayList();
List<String> orderStatusList = Lists.newArrayList("60", "70", "90");
list.stream().map(CspTransferOrderInfo::getTransferOutOrderCode).filter(StringUtils::isNotBlank).collect(Collectors.toList());
StringUtils.join(transferOutOrderCodeList, "、")
String.join(",", cspShop.getWarehouseCodeList()
String equipmentNumberList = list.stream().map(CspWarehouseEquipment::getEquipmentNumber).collect(Collectors.joining(","));
CommonUtils.stringChangeList(cspCustomerOrderInfo.getOutOrderCode())
Map
.stream()
.collect(Collectors.groupingBy(CscCustomerInfo::getPostCode));
List<InterfaceMappingConfigurationDetails> mappingDetailsList = iInterfaceMappingConfigurationDetailsService.selectInterfaceMappingConfigurationDetailsList(selectInterfaceMappingDetails);
Map<String, Map<String, String>> groupByMappingType = mappingDetailsList
.stream()
.collect(Collectors.groupingBy(
InterfaceMappingConfigurationDetails::getMappingType,
Collectors.toMap(InterfaceMappingConfigurationDetails::getOmsCode,
InterfaceMappingConfigurationDetails::getErpCode,(v1,v2)->v1)
)
);
/**
* 集合类型转换
*
* @param longList 参数
* @return 结果
*/
private static List<String> convertToStringList(List<Long> longList) {
List<String> stringList = new ArrayList<>();
for (Long num : longList) {
stringList.add(num.toString());
}
return stringList;
}
String destinationCode = '12,1233,4444,32222,';
List<Long> indexIds = Arrays.stream(destinationCode.split(",")).map(Long::parseLong).collect(Collectors.toList());