|
|
@ -27,7 +27,7 @@ public class BackDoorServiceImpl implements BackDoorService { |
|
|
|
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; |
|
|
|
|
|
|
|
@Override |
|
|
|
public String redirect(String dataType, String appId, String target, String targetParam) { |
|
|
|
public Object redirect(String dataType, String appId, String target, Object targetParam) { |
|
|
|
Result<AppIdInfoResultDTO> appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId); |
|
|
|
if (!appIdInfoResultDTOResult.success()) { |
|
|
|
throw new RenException("获取accessToken失败......"); |
|
|
@ -39,11 +39,11 @@ public class BackDoorServiceImpl implements BackDoorService { |
|
|
|
headerMap.put("AppId", data.getAppId()); |
|
|
|
headerMap.put("AuthType", "jwt"); |
|
|
|
headerMap.put("Data-Type",dataType); |
|
|
|
Result<String> stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, targetParam, headerMap); |
|
|
|
Result<String> stringResult = HttpClientManager.getInstance().sendPostByJSONAndHeader(url, JSON.toJSONString(targetParam), headerMap); |
|
|
|
log.info(JSON.toJSONString(stringResult)); |
|
|
|
if (!stringResult.success()){ |
|
|
|
throw new RenException("请求【"+url+"】失败......"+stringResult.error()); |
|
|
|
} |
|
|
|
return stringResult.getData(); |
|
|
|
return JSON.parseObject(stringResult.getData()); |
|
|
|
} |
|
|
|
} |
|
|
|