|
|
@@ -250,6 +250,7 @@ public class SERESServiceImpl implements SERESService {
|
|
|
String apiPath="/aito/DIS/INV_STOCK_STS/1.0.0";
|
|
|
String fullUrl = seresConfig.getUrl() + apiPath;
|
|
|
logger.info("fullUrl {}",fullUrl);
|
|
|
+ logger.info("Authorization {}","Bearer " + token);
|
|
|
CloseableHttpClient httpClient = HttpClients.createDefault();
|
|
|
HttpPost httpPost = new HttpPost(fullUrl);
|
|
|
// 鉴权头
|
|
|
@@ -276,7 +277,7 @@ public class SERESServiceImpl implements SERESService {
|
|
|
}
|
|
|
try (CloseableHttpResponse response = httpClient.execute(httpPost)) {
|
|
|
String respStr = EntityUtils.toString(response.getEntity(), "UTF-8");
|
|
|
- logger.info("rtest espStr {}", respStr);
|
|
|
+ logger.info("test respStr {}", respStr);
|
|
|
return JSON.parseObject(respStr);
|
|
|
}catch (Exception e){
|
|
|
logger.info("Exception {}",e.getMessage());
|
|
|
@@ -288,8 +289,8 @@ public class SERESServiceImpl implements SERESService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void testToken() throws IOException {
|
|
|
- String token = getValidToken();
|
|
|
+ public void testToken(String token) throws IOException {
|
|
|
+ logger.info("testToken token {}", token);
|
|
|
String fullUrl = "https://dis-api-test.seres.cn/aito/public/API_zsgsw/1.0.0";
|
|
|
|
|
|
CloseableHttpClient httpClient = HttpClients.createDefault();
|