|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.epmet.datareport.service.backdoor.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.epmet.commons.tools.enums.EnvEnum; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.utils.HttpClientManager; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
@ -27,13 +28,13 @@ public class BackDoorServiceImpl implements BackDoorService { |
|
|
|
private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; |
|
|
|
|
|
|
|
@Override |
|
|
|
public Object redirect(String dataType, String appId, String target, Object targetParam) { |
|
|
|
public Object redirect(String dataType, String appId, String target, Object targetParam, String env) { |
|
|
|
Result<AppIdInfoResultDTO> appIdInfoResultDTOResult = commonServiceOpenFeignClient.appIdInfo(appId); |
|
|
|
if (!appIdInfoResultDTOResult.success()) { |
|
|
|
throw new RenException("获取accessToken失败......"); |
|
|
|
} |
|
|
|
AppIdInfoResultDTO data = appIdInfoResultDTOResult.getData(); |
|
|
|
String url = FactConstant.URL.concat(target); |
|
|
|
String url = EnvEnum.getEnum(env).getUrl().concat(target); |
|
|
|
Map<String, String> headerMap = new HashMap<>(16); |
|
|
|
headerMap.put("AccessToken", data.getAccessToken()); |
|
|
|
headerMap.put("AppId", data.getAppId()); |
|
|
|