1.for循环list<实体>
List<DeploymentWellDeploymentVo> resultList = DeploymentMapper.selectList(wellDeploymentVo);
for (DeploymentWellDeploymentVo deployment : resultList) {
List<FileVo> fileVos= fjghwjxxMapper.getFileList(deployment.getDbid());
if(fileVos.size()>0){
for (FileVo fileVo : fileVos) {
fileVo.setDownloadUrl(downLoadUrl+fileVo.getFileId());
fileVo.setPreviewUrl(previewUrl+fileVo.getFileId());
}
}
deployment.setFileList(fileVos);
}
2。for循环List<Map<String, Object>>
List<Map<String, Object>> resultList = oilWellComAcceptanceMapper.queryList(oilWellCompletionAcceptance);
for (Map<String, Object> map : resultList) {
if(StringUtils.isNotEmpty(map.get("dbid").toString())) {
List<FileVo> fileVos = fjghwjxxService.getFileListBySSBM(map.get("dbid").toString(), SSBM);
map.put("fileList", fileVos);
}
}