|
|
@ -15,8 +15,6 @@ import org.apache.http.impl.client.HttpClientBuilder; |
|
|
import org.apache.http.util.EntityUtils; |
|
|
import org.apache.http.util.EntityUtils; |
|
|
import org.dromara.system.domain.vo.SysDictDataVo; |
|
|
import org.dromara.system.domain.vo.SysDictDataVo; |
|
|
import org.dromara.system.service.ISysDictDataService; |
|
|
import org.dromara.system.service.ISysDictDataService; |
|
|
import org.slf4j.Logger; |
|
|
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.stereotype.Component; |
|
|
import org.springframework.stereotype.Component; |
|
|
@ -51,9 +49,6 @@ public class SrzUserOriginalDataJob { |
|
|
|
|
|
|
|
|
public static Map<String,String> params = new HashMap<>(); |
|
|
public static Map<String,String> params = new HashMap<>(); |
|
|
|
|
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(SrzUserOriginalDataJob.class); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void run(){ |
|
|
public void run(){ |
|
|
this.getData(); |
|
|
this.getData(); |
|
|
} |
|
|
} |
|
|
@ -133,8 +128,7 @@ public class SrzUserOriginalDataJob { |
|
|
String signature = toSHA256(timestamp + paasToken + nonce + timestamp); |
|
|
String signature = toSHA256(timestamp + paasToken + nonce + timestamp); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//创建CloseableHttpClient
|
|
|
try (CloseableHttpClient client = HttpClientBuilder.create().build()) { |
|
|
CloseableHttpClient client = HttpClientBuilder.create().build(); |
|
|
|
|
|
HttpPost httpPost = new HttpPost(znwgUrl + apiPath); |
|
|
HttpPost httpPost = new HttpPost(znwgUrl + apiPath); |
|
|
httpPost.setHeader("x-tif-paasid", paasId); |
|
|
httpPost.setHeader("x-tif-paasid", paasId); |
|
|
httpPost.setHeader("x-tif-timestamp", timestamp); |
|
|
httpPost.setHeader("x-tif-timestamp", timestamp); |
|
|
@ -144,12 +138,12 @@ public class SrzUserOriginalDataJob { |
|
|
httpPost.setHeader("Cache-Control", "no-cache"); |
|
|
httpPost.setHeader("Cache-Control", "no-cache"); |
|
|
HttpEntity entity = new StringEntity(params); |
|
|
HttpEntity entity = new StringEntity(params); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
httpPost.setEntity(entity); |
|
|
httpPost.setEntity(entity); |
|
|
|
|
|
|
|
|
CloseableHttpResponse response = client.execute(httpPost); |
|
|
try (CloseableHttpResponse response = client.execute(httpPost)) { |
|
|
|
|
|
|
|
|
return EntityUtils.toString(response.getEntity()); |
|
|
return EntityUtils.toString(response.getEntity()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
e.printStackTrace(); |
|
|
e.printStackTrace(); |
|
|
} |
|
|
} |
|
|
|