提交内容:BIP提交接口调用

备注:BIP提交接口调用
提交人:邹江涛
This commit is contained in:
zoujiangtao 2024-12-18 19:36:29 +08:00
parent d9fe632590
commit de045fa8ab
1 changed files with 2 additions and 2 deletions

View File

@ -601,11 +601,11 @@ public class ApiService {
ResponseEntity<String> response = restTemplate.postForEntity(linkUrl + "?access_token=" + token, requestEntity, String.class); ResponseEntity<String> response = restTemplate.postForEntity(linkUrl + "?access_token=" + token, requestEntity, String.class);
if (response.getStatusCode().is2xxSuccessful()) { if (response.getStatusCode().is2xxSuccessful()) {
String responseBody = response.getBody() != null ? response.getBody() : "请求成功 → 无响应内容"; String responseBody = response.getBody() != null ? response.getBody() : "请求成功 → 无响应内容";
logger.info("提交接口调用成功,响应成功信息:{}", responseBody); logger.info("提交接口调用成功,,请求体:{}\n响应成功信息:{}", requestBody, responseBody);
return "提交接口 → 响应成功: " + responseBody; return "提交接口 → 响应成功: " + responseBody;
} else { } else {
String errorBody = response.getBody() != null ? response.getBody() : "请求失败 → 无响应内容"; String errorBody = response.getBody() != null ? response.getBody() : "请求失败 → 无响应内容";
logger.info("提交接口调用失败,响应失败信息:{}", errorBody); logger.info("提交接口调用失败,请求体:{}\n响应失败信息:{}", requestBody, response);
return "提交接口 → 响应失败: " + errorBody; return "提交接口 → 响应失败: " + errorBody;
} }
} catch (Exception e) { } catch (Exception e) {