lutong пре 1 месец
родитељ
комит
46b2df3c0c

+ 7 - 0
alien-store/src/main/java/shop/alien/store/service/impl/LifeDiscountCouponServiceImpl.java

@@ -725,6 +725,13 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
         if (StringUtils.isEmpty(tabType)) {
             throw new IllegalArgumentException("分页类型不能为空");
         }
+        // 分页类型仅支持:0未使用 1即将过期 2已使用 3已过期
+        if (!DiscountCouponEnum.ALL.getValue().equals(tabType)
+                && !DiscountCouponEnum.BE_ABOUT_TO_EXPORE.getValue().equals(tabType)
+                && !DiscountCouponEnum.HAVE_ALREADY_APPLIED.getValue().equals(tabType)
+                && !DiscountCouponEnum.HAVE_EXPIRED.getValue().equals(tabType)) {
+            throw new IllegalArgumentException("分页类型参数错误,必须为0(未使用)、1(即将过期)、2(已使用)、3(已过期)");
+        }
         
         List<LifeDiscountCouponVo> lifeDiscountCouponVos = new ArrayList<>();
         IPage<LifeDiscountCouponUser> iPage = new Page<>(page, size);

+ 5 - 10
alien-store/src/main/java/shop/alien/store/util/ai/AiFeedbackAssignUtils.java

@@ -39,9 +39,9 @@ public class AiFeedbackAssignUtils {
     @Value("${ai.service.assign-staff-url}")
     private String assignStaffUrl;
 
-    // 语音识别接口地址(从配置中读取,如果没有配置则使用默认值)
-    // @Value("${feign.alienAI.url}")
-    // private String aiServiceBaseUrl;
+//     语音识别接口地址(从配置中读取,如果没有配置则使用默认值)
+     @Value("${third-asr-upload.base-url}")
+     private String aiServiceBaseUrl;
 
     /**登录的语音识别文件登录
      * 登录 AI 服务,获取 token
@@ -117,14 +117,9 @@ public class AiFeedbackAssignUtils {
             }
 
             HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(formData, headers);
-
-            // 构建完整的URL
-            // String url = aiServiceBaseUrl + "/asr/upload";
-            String url = "http://124.93.18.180:8891/asr/upload";
-            log.info("调用AI语音识别接口,URL: {}", url);
-
+            log.info("调用AI语音识别接口,URL: {}", aiServiceBaseUrl);
             // 使用 RestTemplate 发送请求
-            ResponseEntity<String> response = restTemplate.postForEntity(url, requestEntity, String.class);
+            ResponseEntity<String> response = restTemplate.postForEntity(aiServiceBaseUrl, requestEntity, String.class);
             
             // 处理响应
             if (response != null && response.getStatusCode() == HttpStatus.OK) {