|  |  | @ -78,6 +78,7 @@ public class FileServiceImpl implements FileService { | 
			
		
	
		
		
			
				
					
					|  |  |  |             for(String str:strs) { |  |  |  |             for(String str:strs) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 if (!StringUtils.isEmpty(str) && FileUtils.isFileExist(filePath + filePathSlash + imagePath + str)) { |  |  |  |                 if (!StringUtils.isEmpty(str) && FileUtils.isFileExist(filePath + filePathSlash + imagePath + str)) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     files.add(filePath + filePathSlash + imagePath + str); |  |  |  |                     files.add(filePath + filePathSlash + imagePath + str); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     logger.info("relay--"+filePath + filePathSlash + imagePath + str); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } else { |  |  |  |                 } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     isExists = false; |  |  |  |                     isExists = false; | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
	
		
		
			
				
					|  |  | @ -85,7 +86,7 @@ public class FileServiceImpl implements FileService { | 
			
		
	
		
		
			
				
					
					|  |  |  |             if(!isExists) |  |  |  |             if(!isExists) | 
			
		
	
		
		
			
				
					
					|  |  |  |                 return ResultVOUtils.error(9999,"文件不存在"); |  |  |  |                 return ResultVOUtils.error(9999,"文件不存在"); | 
			
		
	
		
		
			
				
					
					|  |  |  |             String result = relayFile(files,host); |  |  |  |             String result = relayFile(files,host); | 
			
		
	
		
		
			
				
					
					|  |  |  |             if (IDCUtils.isJson(result)) { |  |  |  |             if (IDCUtils.isJson(result)&&!result.contains("<html")) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |                 BaseResponse baseResponse = JSON.parseObject(result,BaseResponse.class); |  |  |  |                 BaseResponse baseResponse = JSON.parseObject(result,BaseResponse.class); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 return baseResponse; |  |  |  |                 return baseResponse; | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
	
		
		
			
				
					|  |  | @ -111,10 +112,13 @@ public class FileServiceImpl implements FileService { | 
			
		
	
		
		
			
				
					
					|  |  |  |         ArrayList<String> saveFiles = new ArrayList<>(); |  |  |  |         ArrayList<String> saveFiles = new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         Date startTime = new Date(); |  |  |  |         Date startTime = new Date(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         if (files != null) { |  |  |  |         if (files != null) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             if(!FileUtils.makeDirectory(filePath + filePathSlash + imagePath)) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 IDCUtils.createDirectory(filePath + filePathSlash + imagePath); | 
			
		
	
		
		
			
				
					
					|  |  |  |             try { |  |  |  |             try { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 for (MultipartFile file : files) { |  |  |  |                 for (MultipartFile file : files) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     String imageName = filePath + filePathSlash + imagePath + file.getOriginalFilename(); |  |  |  |                     String imageName = filePath + filePathSlash + imagePath + file.getOriginalFilename(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     saveFiles.add(imageName); |  |  |  |                     saveFiles.add(imageName); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     logger.info("relay->>>"+imageName); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     IDCUtils.writeFile(file.getBytes(), filePath + filePathSlash + imagePath, file.getOriginalFilename()); |  |  |  |                     IDCUtils.writeFile(file.getBytes(), filePath + filePathSlash + imagePath, file.getOriginalFilename()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                  } |  |  |  |                  } | 
			
		
	
		
		
			
				
					
					|  |  |  |             } catch (IOException e) { |  |  |  |             } catch (IOException e) { | 
			
		
	
	
		
		
			
				
					|  |  | @ -157,7 +161,9 @@ public class FileServiceImpl implements FileService { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 for (int i = 0; i < files.size(); i++) { |  |  |  |                 for (int i = 0; i < files.size(); i++) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     if (!StringUtils.isEmpty(files.get(i))) { |  |  |  |                     if (!StringUtils.isEmpty(files.get(i))) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         File file = new File(files.get(i)); |  |  |  |                         File file = new File(files.get(i)); | 
			
		
	
		
		
			
				
					
					|  |  |  |                         builder.addFormDataPart("files", files.get(i), |  |  |  |                         String fileName = files.get(i); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         fileName = fileName.substring(fileName.lastIndexOf("/")); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         builder.addFormDataPart("files", fileName, | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 RequestBody.create(MediaType.parse(fileType), file)); |  |  |  |                                 RequestBody.create(MediaType.parse(fileType), file)); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     } |  |  |  |                     } | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
	
		
		
			
				
					|  |  | 
 |