| 
						
						
						
					 | 
					@ -1,11 +1,10 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					package com.epmet.datareport.service.backdoor.impl; | 
					 | 
					 | 
					package com.epmet.datareport.service.backdoor.impl; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.alibaba.fastjson.JSON; | 
					 | 
					 | 
					import com.alibaba.fastjson.JSON; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.alibaba.fastjson.JSONObject; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
					 | 
					 | 
					import com.epmet.commons.tools.exception.RenException; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.HttpClientManager; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.HttpClientManager; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					import com.epmet.datareport.constant.*; | 
					 | 
					 | 
					import com.epmet.datareport.constant.FactConstant; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.datareport.service.backdoor.BackDoorService; | 
					 | 
					 | 
					import com.epmet.datareport.service.backdoor.BackDoorService; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.dto.result.AppIdInfoResultDTO; | 
					 | 
					 | 
					import com.epmet.dto.result.AppIdInfoResultDTO; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.feign.EpmetCommonServiceOpenFeignClient; | 
					 | 
					 | 
					import com.epmet.feign.EpmetCommonServiceOpenFeignClient; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -28,7 +27,7 @@ public class BackDoorServiceImpl implements BackDoorService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; | 
					 | 
					 | 
					    private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public Object backDoor(String dataType, String appId, String target, Object o) { | 
					 | 
					 | 
					    public String redirect(String dataType, String appId, String target, String targetParam) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        Result<AppIdInfoResultDTO> appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId); | 
					 | 
					 | 
					        Result<AppIdInfoResultDTO> appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (!appIdInfoResultDTOResult.success()) { | 
					 | 
					 | 
					        if (!appIdInfoResultDTOResult.success()) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            throw new RenException("获取accessToken失败......"); | 
					 | 
					 | 
					            throw new RenException("获取accessToken失败......"); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -40,12 +39,11 @@ public class BackDoorServiceImpl implements BackDoorService { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        headerMap.put("AppId", data.getAppId()); | 
					 | 
					 | 
					        headerMap.put("AppId", data.getAppId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        headerMap.put("AuthType", "jwt"); | 
					 | 
					 | 
					        headerMap.put("AuthType", "jwt"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        headerMap.put("Data-Type",dataType); | 
					 | 
					 | 
					        headerMap.put("Data-Type",dataType); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Result<String> stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(o),headerMap); | 
					 | 
					 | 
					        Result<String> stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, targetParam, headerMap); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        log.info(JSON.toJSONString(stringResult)); | 
					 | 
					 | 
					        log.info(JSON.toJSONString(stringResult)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (!stringResult.success()){ | 
					 | 
					 | 
					        if (!stringResult.success()){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            throw new RenException("请求【"+url+"】失败......"+stringResult.error()); | 
					 | 
					 | 
					            throw new RenException("请求【"+url+"】失败......"+stringResult.error()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        JSONObject jsonObject = JSON.parseObject(stringResult.getData()); | 
					 | 
					 | 
					        return stringResult.getData(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        return jsonObject; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |