|
@@ -80,6 +80,14 @@ public class AiCheckXxlJob {
|
|
|
@Value("${third-party-pass-word.base-url}")
|
|
@Value("${third-party-pass-word.base-url}")
|
|
|
private String passWord;
|
|
private String passWord;
|
|
|
|
|
|
|
|
|
|
+ // 第三方接口地址 登录接口URL
|
|
|
|
|
+ @Value("${third-party-goods.base-url}")
|
|
|
|
|
+ private String goodsUrl;
|
|
|
|
|
+
|
|
|
|
|
+ // 第三方接口地址 登录接口URL
|
|
|
|
|
+ @Value("${third-party-goodsresult.base-url}")
|
|
|
|
|
+ private String goodsResultUrl;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* AI自动审核任务处理器
|
|
* AI自动审核任务处理器
|
|
|
* <p>
|
|
* <p>
|
|
@@ -112,7 +120,7 @@ public class AiCheckXxlJob {
|
|
|
HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(formData, headers);
|
|
HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(formData, headers);
|
|
|
ResponseEntity<String> postForEntity = null;
|
|
ResponseEntity<String> postForEntity = null;
|
|
|
try {
|
|
try {
|
|
|
- postForEntity = restTemplate.postForEntity("http://192.168.2.250:9000/ai/user-auth-core/api/v1/auth/login", requestEntity, String.class);
|
|
|
|
|
|
|
+ postForEntity = restTemplate.postForEntity(loginUrl, requestEntity, String.class);
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.error("类:PostMethod 方法:post", e);
|
|
log.error("类:PostMethod 方法:post", e);
|
|
|
}
|
|
}
|
|
@@ -188,7 +196,7 @@ public class AiCheckXxlJob {
|
|
|
HttpEntity<Map<String, Object>> request = new HttpEntity<>(requestBody, aiHeaders);
|
|
HttpEntity<Map<String, Object>> request = new HttpEntity<>(requestBody, aiHeaders);
|
|
|
ResponseEntity<String> response = null;
|
|
ResponseEntity<String> response = null;
|
|
|
try {
|
|
try {
|
|
|
- response = restTemplate.postForEntity("http://192.168.2.250:9000/ai/auto-review/api/v1/product_complaint_record/submit", request, String.class);
|
|
|
|
|
|
|
+ response = restTemplate.postForEntity(goodsUrl, request, String.class);
|
|
|
log.info("AI自动审核结果:{}", response.getBody());
|
|
log.info("AI自动审核结果:{}", response.getBody());
|
|
|
if (response.getStatusCodeValue() != 200) {
|
|
if (response.getStatusCodeValue() != 200) {
|
|
|
throw new RuntimeException("AI门店审核接口调用失败 http状态:" + response.getStatusCode());
|
|
throw new RuntimeException("AI门店审核接口调用失败 http状态:" + response.getStatusCode());
|
|
@@ -262,7 +270,7 @@ public class AiCheckXxlJob {
|
|
|
HttpEntity<Map<String, Object>> request = new HttpEntity<>(requestBody, aiHeaders);
|
|
HttpEntity<Map<String, Object>> request = new HttpEntity<>(requestBody, aiHeaders);
|
|
|
ResponseEntity<String> response = null;
|
|
ResponseEntity<String> response = null;
|
|
|
try {
|
|
try {
|
|
|
- response = restTemplate.postForEntity("http://192.168.2.250:9000/ai/auto-review/api/v1/product_complaint_record/result", request, String.class);
|
|
|
|
|
|
|
+ response = restTemplate.postForEntity(goodsResultUrl, request, String.class);
|
|
|
if (response.getStatusCodeValue() != 200) {
|
|
if (response.getStatusCodeValue() != 200) {
|
|
|
throw new RuntimeException("AI门店审核接口调用失败 http状态:" + response.getStatusCode());
|
|
throw new RuntimeException("AI门店审核接口调用失败 http状态:" + response.getStatusCode());
|
|
|
}
|
|
}
|