private List<FileUrlDto> buildFileUrlMethod(String fileUrl,String fileName){
List<String> files = new ArrayList<>();
List<String> fileNames = new ArrayList<>();
List<FileUrlDto> fileUrlDtoList = new ArrayList<>();
if (PublicUtil.isNotEmpty(fileUrl)) {
files = Arrays.asList(StringUtils.commaDelimitedListToStringArray(fileUrl));
}
if (PublicUtil.isNotEmpty(fileName)) {
fileNames = Arrays.asList(StringUtils.commaDelimitedListToStringArray(fileName));
}
if (PublicUtil.isNotEmpty(files) && PublicUtil.isNotEmpty(fileNames)) {
for (int i = 0; i < files.size(); i++) {
FileUrlDto fileUrlDto = new FileUrlDto();
fileUrlDto.setFileUrl(files.get(i));
fileUrlDto.setFileName(fileNames.get(i));
fileUrlDtoList.add(fileUrlDto);
}
}
return fileUrlDtoList;
}
////////////////////////////////////////////////////////////////////
if (PublicUtil.isNotEmpty(entity.getFileUrls())) {标签:files,PublicUtil,组装,List,fileNames,逗号,new,isNotEmpty From: https://www.cnblogs.com/huangwentian/p/17919306.html
List<String> files = new ArrayList<>();
List<String> fileNames = new ArrayList<>();
for (FileUrlDto items : entity.getFileUrls()) {
files.add(items.getFileUrl());
fileNames.add(items.getFileName());
}
amsAbnormalOrderRecord.setFileUrl(Joiner.on(",").join(files));
amsAbnormalOrderRecord.setFileName(Joiner.on(",").join(fileNames));
}