|
|
@@ -6,8 +6,11 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.http.HttpEntity;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.http.MediaType;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.client.HttpClientErrorException;
|
|
|
+import org.springframework.web.client.HttpServerErrorException;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
import shop.alien.lawyer.service.AiUserAuditTaskService;
|
|
|
|
|
|
@@ -45,16 +48,16 @@ public class AiUserAuditTaskServiceImpl implements AiUserAuditTaskService {
|
|
|
log.info("异步调用AI用户申诉接口,URL:{},请求头:{}", aiUserAuditTaskUrl, aiHeaders);
|
|
|
|
|
|
// 调用AI服务
|
|
|
- org.springframework.http.ResponseEntity<String> responseEntity = restTemplate.postForEntity(
|
|
|
+ ResponseEntity<String> responseEntity = restTemplate.postForEntity(
|
|
|
aiUserAuditTaskUrl, request, String.class);
|
|
|
|
|
|
log.info("异步调用AI用户申诉接口成功,响应状态:{},响应体:{}",
|
|
|
responseEntity.getStatusCode(), responseEntity.getBody());
|
|
|
|
|
|
- } catch (org.springframework.web.client.HttpServerErrorException e) {
|
|
|
+ } catch (HttpServerErrorException e) {
|
|
|
log.error("异步调用AI用户申诉接口返回服务器错误,状态码:{},响应体:{},URL:{}",
|
|
|
e.getStatusCode(), e.getResponseBodyAsString(), aiUserAuditTaskUrl, e);
|
|
|
- } catch (org.springframework.web.client.HttpClientErrorException e) {
|
|
|
+ } catch (HttpClientErrorException e) {
|
|
|
log.error("异步调用AI用户申诉接口返回客户端错误,状态码:{},响应体:{},URL:{}",
|
|
|
e.getStatusCode(), e.getResponseBodyAsString(), aiUserAuditTaskUrl, e);
|
|
|
} catch (Exception e) {
|