This commit is contained in:
2025-08-20 01:23:26 +08:00
parent 65cca681ef
commit 44b7a7bfd2
2 changed files with 4 additions and 5 deletions

View File

@@ -87,10 +87,8 @@ public abstract class ERPRequestBase {
System.out.println("请求地址: " + requestUrl);
System.out.println("请求体: " + body);
if (requestBody == null) {
return HttpUtils.sendPost(requestUrl, body); // 保持 body 一致
}
return HttpUtils.sendJsonPost(requestUrl, body);
// 统一通过自定义 SSL 通道发起请求,提升与开放平台的 TLS 兼容性
return HttpUtils.sendSSLPost(requestUrl, body, org.springframework.http.MediaType.APPLICATION_JSON_VALUE);
} catch (Exception e) {
log.error("HTTP请求失败: {}", e.getMessage(), e);
throw new RuntimeException("ERP接口调用失败: " + e.getMessage(), e);