Browse Source

访问三方接口状态码更新

Gaosheng 1 day ago
parent
commit
93a6f9bbd1

+ 1 - 1
xinkeaboard-server/b2b2c-core/src/main/java/com/slodon/b2b2c/core/util/HttpClientUtil.java

@@ -192,7 +192,7 @@ public class HttpClientUtil {
         CloseableHttpResponse response = httpClient.execute(httpPost);
 
         try {
-            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_CREATED) {
+            if (response.getStatusLine().getStatusCode() == HttpStatus.SC_CREATED || response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
                 HttpEntity entity = response.getEntity();
                 result = EntityUtils.toString(entity, StandardCharsets.UTF_8);
                 EntityUtils.consume(entity);