1
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user