Browse Source

改为可编译接口

lutong 1 ngày trước cách đây
mục cha
commit
369931b439

+ 8 - 1
alien-job/src/main/java/shop/alien/job/store/AiTagJob.java

@@ -84,6 +84,13 @@ public class AiTagJob {
     @Value("${third-party-getresult.base-url}")
     private String getResultUrl;
 
+    /**
+     * 店铺入驻 AI 审核提交接口,例如: http://host:port/ai/auto-review/api/v1/merchant-onboarding/applications
+     * (与 {@link shop.alien.job.second.AiProductComplaintJob} 中 third-party-aiProductComplaintResultUrl 用法相同,在 Nacos 配置)
+     */
+    @Value("${third-party-aiMerchantOnboardingApplicationsUrl.base-url}")
+    private String aiMerchantOnboardingApplicationsUrl;
+
     //用户名
     @Value("${third-party-user-name.base-url}")
     private String userName;
@@ -978,7 +985,7 @@ public class AiTagJob {
                 HttpEntity<AiApproveStoreInfo> request = new HttpEntity<>(aiApproveStoreInfo, aiHeaders);
                 ResponseEntity<String> response = null;
                 try {
-                    response = restTemplate.postForEntity("http://192.168.2.250:9000/ai/auto-review/api/v1/merchant-onboarding/applications", request, String.class);
+                    response = restTemplate.postForEntity(aiMerchantOnboardingApplicationsUrl, request, String.class);
                     if (response.getStatusCodeValue() != 200) {
                         log.error("店铺AI审核接口调用失败 storeId={}, http状态={}", storeInfo.getId(), response.getStatusCode());
                         continue;