| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -3,6 +3,7 @@ package com.epmet.commons.tools.utils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.alibaba.fastjson.JSON; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.alibaba.fastjson.TypeReference; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.enums.EnvEnum; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.EpmetErrorCode; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.scan.param.*; | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -16,6 +17,7 @@ import org.springframework.util.CollectionUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.ArrayList; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.List; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import java.util.stream.Collectors; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					/** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * 扫描内容工具类 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -31,6 +33,15 @@ public class ScanContentUtils { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						public static Result<SyncScanResult> imgSyncScan(String url, ImgScanParamDTO param) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//start 测试环境停机了,先这样改试试
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							EnvEnum currentEnv = EnvEnum.getCurrentEnv(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								SyncScanResult syncScanResult=new SyncScanResult(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								syncScanResult.setSuccessDataIds(param.getTasks().stream().map(c -> c.getDataId()).collect(Collectors.toList())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								syncScanResult.setAllPass(true); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								return new Result<SyncScanResult>().ok(syncScanResult); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							}//end
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							log.debug("imgSyncScan param:{}", JSON.toJSONString(param)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (StringUtils.isBlank(url) || param == null) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								throw new RenException("参数错误"); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -57,6 +68,15 @@ public class ScanContentUtils { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 * @return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						 */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						public static  Result<SyncScanResult> textSyncScan(String url, TextScanParamDTO param) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//start 测试环境停机了,先这样改试试
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							EnvEnum currentEnv = EnvEnum.getCurrentEnv(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if(EnvEnum.LOCAL.getCode().equals(currentEnv.getCode())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								SyncScanResult syncScanResult=new SyncScanResult(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								syncScanResult.setSuccessDataIds(param.getTasks().stream().map(c -> c.getDataId()).collect(Collectors.toList())); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								syncScanResult.setAllPass(true); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								return new Result<SyncScanResult>().ok(syncScanResult); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							}//end
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							log.debug("textSyncScan param:{}", JSON.toJSONString(param)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (StringUtils.isBlank(url) || param == null) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								throw new RenException("参数错误"); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |