Просмотр исходного кода

Merge remote-tracking branch 'origin/sit-three-categories' into sit-three-categories

lyx 3 месяцев назад
Родитель
Сommit
0007315496
50 измененных файлов с 824 добавлено и 463 удалено
  1. 5 0
      alien-api/pom.xml
  2. 5 4
      alien-api/src/main/resources/bootstrap-dev.yml
  3. 11 6
      alien-api/src/main/resources/bootstrap-test.yml
  4. 0 4
      alien-entity/pom.xml
  5. 23 0
      alien-entity/src/main/java/shop/alien/entity/store/AiAuditable.java
  6. 1 1
      alien-entity/src/main/java/shop/alien/entity/store/StorePrice.java
  7. 2 1
      alien-entity/src/main/java/shop/alien/entity/store/dto/CuisineComboDto.java
  8. 6 1
      alien-entity/src/main/java/shop/alien/entity/store/dto/CuisineTypeResponseDto.java
  9. 33 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/UpdateAreaRequestVo.java
  10. 39 41
      alien-gateway/pom.xml
  11. 5 0
      alien-gateway/src/main/java/shop/alien/gateway/config/JwtTokenFilter.java
  12. 6 2
      alien-gateway/src/main/resources/bootstrap-test.yml
  13. 39 33
      alien-job/pom.xml
  14. 5 4
      alien-job/src/main/resources/bootstrap-dev.yml
  15. 11 6
      alien-job/src/main/resources/bootstrap-test.yml
  16. 39 33
      alien-lawyer/pom.xml
  17. 11 6
      alien-lawyer/src/main/resources/bootstrap-test.yml
  18. 1 1
      alien-lawyer/src/main/resources/logback-spring.xml
  19. 39 48
      alien-second/pom.xml
  20. 11 6
      alien-second/src/main/resources/bootstrap-test.yml
  21. 2 1
      alien-second/src/main/resources/logback-spring.xml
  22. 39 48
      alien-store-platform/pom.xml
  23. 11 6
      alien-store-platform/src/main/resources/bootstrap-test.yml
  24. 2 1
      alien-store-platform/src/main/resources/logback-spring.xml
  25. 39 33
      alien-store/pom.xml
  26. 58 35
      alien-store/src/main/java/shop/alien/store/aspect/AiAuditAspect.java
  27. 2 0
      alien-store/src/main/java/shop/alien/store/config/ElasticSearchComponent.java
  28. 2 0
      alien-store/src/main/java/shop/alien/store/config/GaoDeMapUtil.java
  29. 4 3
      alien-store/src/main/java/shop/alien/store/controller/BarPerformanceController.java
  30. 14 13
      alien-store/src/main/java/shop/alien/store/controller/SportsFacilityAreaController.java
  31. 3 2
      alien-store/src/main/java/shop/alien/store/service/BarPerformanceService.java
  32. 108 8
      alien-store/src/main/java/shop/alien/store/service/impl/BarPerformanceServiceImpl.java
  33. 24 10
      alien-store/src/main/java/shop/alien/store/service/impl/SportsFacilityAreaServiceImpl.java
  34. 7 2
      alien-store/src/main/java/shop/alien/store/service/impl/StoreCuisineServiceImpl.java
  35. 171 0
      alien-store/src/main/java/shop/alien/store/service/impl/StoreStaffAuditAsyncService.java
  36. 5 89
      alien-store/src/main/java/shop/alien/store/service/impl/StoreStaffConfigServiceImpl.java
  37. 2 0
      alien-store/src/main/java/shop/alien/store/util/FileUploadUtil.java
  38. 2 0
      alien-store/src/main/java/shop/alien/store/util/ai/AiAuthTokenUtil.java
  39. 2 0
      alien-store/src/main/java/shop/alien/store/util/ai/AiContentModerationUtil.java
  40. 1 1
      alien-store/src/main/java/shop/alien/store/util/ai/AiFeedbackAssignUtils.java
  41. 2 0
      alien-store/src/main/java/shop/alien/store/util/ai/AiGetPriceUtil.java
  42. 2 0
      alien-store/src/main/java/shop/alien/store/util/ai/AiImageColorExtractUtil.java
  43. 2 0
      alien-store/src/main/java/shop/alien/store/util/ai/AiVideoModerationUtil.java
  44. 2 0
      alien-store/src/main/java/shop/alien/store/util/ali/AliApi.java
  45. 2 0
      alien-store/src/main/java/shop/alien/store/util/ali/AliSms.java
  46. 6 2
      alien-store/src/main/resources/bootstrap-test.yml
  47. 0 4
      alien-util/pom.xml
  48. 2 0
      alien-util/src/main/java/shop/alien/util/ali/AliOSSUtil.java
  49. 1 1
      alien-util/src/main/java/shop/alien/util/common/VideoUtils.java
  50. 15 7
      pom.xml

+ 5 - 0
alien-api/pom.xml

@@ -147,6 +147,11 @@
             <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>

+ 5 - 4
alien-api/src/main/resources/bootstrap-dev.yml

@@ -6,15 +6,16 @@ spring:
     nacos:
       #注册中心
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
 
       #配置中心
       config:
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         file-extension: yml

+ 11 - 6
alien-api/src/main/resources/bootstrap-test.yml

@@ -6,17 +6,22 @@ spring:
     nacos:
       #注册中心
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        password: Alien123456
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
       #配置中心
       config:
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         file-extension: yml
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 0 - 4
alien-entity/pom.xml

@@ -94,10 +94,6 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>

+ 23 - 0
alien-entity/src/main/java/shop/alien/entity/store/AiAuditable.java

@@ -0,0 +1,23 @@
+package shop.alien.entity.store;
+
+/**
+ * 标记可被 AI 审核的入参,统一提供所需的字段。
+ */
+public interface AiAuditable {
+
+    /**
+     * 图片列表的 JSON 字符串,供内容审核使用。
+     */
+    String getImages();
+
+    /**
+     * 设置审核状态:0-待审核,1-通过,2-拒绝。
+     */
+    void setStatus(Integer status);
+
+    /**
+     * 设置审核失败原因。
+     */
+    void setRejectionReason(String rejectionReason);
+}
+

+ 1 - 1
alien-entity/src/main/java/shop/alien/entity/store/StorePrice.java

@@ -21,7 +21,7 @@ import java.util.List;
 @JsonInclude
 @TableName("store_price")
 @ApiModel(value = "StorePrice", description = "通用价目表")
-public class StorePrice {
+public class StorePrice implements AiAuditable {
 
     @ApiModelProperty(value = "主键")
     @TableId(value = "id", type = IdType.AUTO)

+ 2 - 1
alien-entity/src/main/java/shop/alien/entity/store/dto/CuisineComboDto.java

@@ -5,12 +5,13 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import shop.alien.entity.store.AiAuditable;
 
 import java.math.BigDecimal;
 
 @Data
 @ApiModel(value = "CuisineComboDto", description = "添加美食套餐dto")
-public class CuisineComboDto {
+public class CuisineComboDto implements AiAuditable {
 
     @ApiModelProperty(value = "id,修改时必传")
     @TableField("id")

+ 6 - 1
alien-entity/src/main/java/shop/alien/entity/store/dto/CuisineTypeResponseDto.java

@@ -1,6 +1,5 @@
 package shop.alien.entity.store.dto;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -68,6 +67,12 @@ public class CuisineTypeResponseDto {
 
         @ApiModelProperty(value = "套餐组合JSON字符串")
         private String groupJson;
+
+        @ApiModelProperty("门店电话")
+        private String storePhone;
+
+        @ApiModelProperty("门店名称")
+        private String storeName;
     }
 }
 

+ 33 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/UpdateAreaRequestVo.java

@@ -0,0 +1,33 @@
+package shop.alien.entity.store.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 更新区域请求VO
+ *
+ * @author assistant
+ * @since 2025-01-XX
+ */
+@Data
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@ApiModel(value = "UpdateAreaRequestVo对象", description = "更新区域请求视图对象")
+public class UpdateAreaRequestVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "区域ID", required = true, example = "1")
+    private Integer areaId;
+
+    @ApiModelProperty(value = "区域名称(可选,限10字)", required = false, example = "新洗浴区")
+    private String areaName;
+
+    @ApiModelProperty(value = "排序号(可选,数字越小越靠前)", required = false, example = "1")
+    private Integer sortOrder;
+}
+
+

+ 39 - 41
alien-gateway/pom.xml

@@ -188,6 +188,11 @@
 
         <dependency>
             <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-openfeign</artifactId>
         </dependency>
 
@@ -202,60 +207,53 @@
     <build>
         <plugins>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.gateway.AlienGatewayApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                     <execution>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                             <goal>copy-dependencies</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.gateway.AlienGatewayApplication</mainClass>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
-    <profiles>
-        <profile>
-            <id>test</id>
-            <properties>
-                <profiles.active>test</profiles.active>
-                <nacos.server-addr>192.168.2.252:8848</nacos.server-addr>
-                <nacos.namespace>0e1e2d77-56e8-422c-8317-6f71d7285e59</nacos.namespace>
-                <nacos.username>nacos</nacos.username>
-                <nacos.password>ngfriend198092</nacos.password>
-            </properties>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-    </profiles>
 </project>

+ 5 - 0
alien-gateway/src/main/java/shop/alien/gateway/config/JwtTokenFilter.java

@@ -88,6 +88,11 @@ public class JwtTokenFilter implements GlobalFilter, Ordered {
         if (null != skipAuthUrls && url.contains("/alienStore/socket/")) {
             return chain.filter(exchange);
         }
+        // 跳过AI语音识别接口的认证
+        if (url.contains("/alienStore/aiUp/GetAIUpload")) {
+            log.info("跳过AI语音识别接口认证: {}", url);
+            return allowChain(exchange, chain);
+        }
         if (url.startsWith("/alienStore/webjars") || url.startsWith("/alienSecond/webjars")) {
             return allowChain(exchange, chain);
         }

+ 6 - 2
alien-gateway/src/main/resources/bootstrap-test.yml

@@ -9,7 +9,7 @@ spring:
         server-addr: 8.130.79.5:8848
         username: nacos
         password: Alien123456
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
       #配置中心
       config:
@@ -20,4 +20,8 @@ spring:
         password: Alien123456
         group: DEFAULT_GROUP
         file-extension: yml
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 39 - 33
alien-job/pom.xml

@@ -84,6 +84,11 @@
         </dependency>
 
         <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>com.baomidou</groupId>
             <artifactId>mybatis-plus-boot-starter</artifactId>
         </dependency>
@@ -139,52 +144,53 @@
     <build>
         <plugins>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.job.AlienJobApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                     <execution>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                             <goal>copy-dependencies</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.job.AlienJobApplication</mainClass>
-                    <layout>ZIP</layout>
-                    <includes>
-                        <include>
-                            <groupId>nothing</groupId>
-                            <artifactId>nothing</artifactId>
-                        </include>
-                    </includes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
     <profiles>

+ 5 - 4
alien-job/src/main/resources/bootstrap-dev.yml

@@ -6,15 +6,16 @@ spring:
     nacos:
       #注册中心
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
 
       #配置中心
       config:
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         file-extension: yml

+ 11 - 6
alien-job/src/main/resources/bootstrap-test.yml

@@ -6,17 +6,22 @@ spring:
     nacos:
       #注册中心
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        password: Alien123456
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
       #配置中心
       config:
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         file-extension: yml
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 39 - 33
alien-lawyer/pom.xml

@@ -237,6 +237,11 @@
         </dependency>
 
         <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>shop.alien</groupId>
             <artifactId>alien-entity</artifactId>
             <version>1.0.0</version>
@@ -288,52 +293,53 @@
     <build>
         <plugins>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.lawyer.AlienLawyerApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                     <execution>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                             <goal>copy-dependencies</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.lawyer.AlienLawyerApplication</mainClass>
-                    <layout>ZIP</layout>
-<!--                    <includes>-->
-<!--                        <include>-->
-<!--                            <groupId>nothing</groupId>-->
-<!--                            <artifactId>nothing</artifactId>-->
-<!--                        </include>-->
-<!--                    </includes>-->
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 </project>

+ 11 - 6
alien-lawyer/src/main/resources/bootstrap-test.yml

@@ -6,17 +6,22 @@ spring:
     nacos:
       #注册中心
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        password: Alien123456
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
       #配置中心
       config:
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         file-extension: yml
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 1 - 1
alien-lawyer/src/main/resources/logback-spring.xml

@@ -12,7 +12,7 @@
     <!-- 定义全局参数常量 -->
     <property name="log.level" value="debug"/>
     <property name="log.maxHistory" value="30"/><!-- 30表示30个 -->
-    <springProperty scope="context" name="logging.path" source="logging.path"/>
+    <springProperty scope="context" name="logging.path" source="logging.path"  defaultValue="C:/project/ext/log"/>
     <!--输出文件前缀-->
     <property name="FILENAME" value="alien"/>
 

+ 39 - 48
alien-second/pom.xml

@@ -238,6 +238,11 @@
             <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+
         <!-- openfeign -->
         <dependency>
             <groupId>org.springframework.cloud</groupId>
@@ -273,67 +278,53 @@
     <build>
         <plugins>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.second.AlienSecondApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                     <execution>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                             <goal>copy-dependencies</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.second.AlienSecondApplication</mainClass>
-                    <layout>ZIP</layout>
-                    <includes>
-                        <include>
-                            <groupId>nothing</groupId>
-                            <artifactId>nothing</artifactId>
-                        </include>
-                    </includes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
-    <profiles>
-        <profile>
-            <id>test</id>
-            <properties>
-                <profiles.active>test</profiles.active>
-                <nacos.server-addr>192.168.2.252:8848</nacos.server-addr>
-                <nacos.namespace>0e1e2d77-56e8-422c-8317-6f71d7285e59</nacos.namespace>
-                <nacos.username>nacos</nacos.username>
-                <nacos.password>ngfriend198092</nacos.password>
-            </properties>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-    </profiles>
 </project>

+ 11 - 6
alien-second/src/main/resources/bootstrap-test.yml

@@ -6,17 +6,22 @@ spring:
     nacos:
       #注册中心
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        password: Alien123456
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
       #配置中心
       config:
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         file-extension: yml
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 2 - 1
alien-second/src/main/resources/logback-spring.xml

@@ -12,7 +12,8 @@
     <!-- 定义全局参数常量 -->
     <property name="log.level" value="debug"/>
     <property name="log.maxHistory" value="30"/><!-- 30表示30个 -->
-    <springProperty scope="context" name="logging.path" source="logging.path"/>
+    <springProperty scope="context" name="logging.path" source="logging.path"  defaultValue="C:/project/ext/log"/>
+
     <!--输出文件前缀-->
     <property name="FILENAME" value="alien"/>
 

+ 39 - 48
alien-store-platform/pom.xml

@@ -242,6 +242,11 @@
         </dependency>
 
         <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>shop.alien</groupId>
             <artifactId>alien-entity</artifactId>
             <version>1.0.0</version>
@@ -285,67 +290,53 @@
     <build>
         <plugins>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.storeplatform.AlienStorePlatformApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                     <execution>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                             <goal>copy-dependencies</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.storeplatform.AlienStorePlatformApplication</mainClass>
-                    <layout>ZIP</layout>
-                    <includes>
-                        <include>
-                            <groupId>nothing</groupId>
-                            <artifactId>nothing</artifactId>
-                        </include>
-                    </includes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
-    <profiles>
-        <profile>
-            <id>test</id>
-            <properties>
-                <profiles.active>test</profiles.active>
-                <nacos.server-addr>192.168.2.252:8848</nacos.server-addr>
-                <nacos.namespace>0e1e2d77-56e8-422c-8317-6f71d7285e59</nacos.namespace>
-                <nacos.username>nacos</nacos.username>
-                <nacos.password>ngfriend198092</nacos.password>
-            </properties>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-    </profiles>
 </project>

+ 11 - 6
alien-store-platform/src/main/resources/bootstrap-test.yml

@@ -6,17 +6,22 @@ spring:
     nacos:
       #注册中心
       discovery:
-        server-addr: 192.168.2.252:8848
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        password: Alien123456
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
       #配置中心
       config:
         enabled: true
-        server-addr: 192.168.2.252:8848
+        refresh-enabled: true
+        server-addr: 8.130.79.5:8848
         username: nacos
-        password: ngfriend198092
+        password: Alien123456
         group: DEFAULT_GROUP
         file-extension: yml
-        namespace: 0e1e2d77-56e8-422c-8317-6f71d7285e59
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 2 - 1
alien-store-platform/src/main/resources/logback-spring.xml

@@ -12,7 +12,8 @@
     <!-- 定义全局参数常量 -->
     <property name="log.level" value="debug"/>
     <property name="log.maxHistory" value="30"/><!-- 30表示30个 -->
-    <springProperty scope="context" name="logging.path" source="logging.path"/>
+    <springProperty scope="context" name="logging.path" source="logging.path"  defaultValue="C:/project/ext/log"/>
+
     <!--输出文件前缀-->
     <property name="FILENAME" value="alien"/>
 

+ 39 - 33
alien-store/pom.xml

@@ -247,6 +247,11 @@
         </dependency>
 
         <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-bootstrap</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>shop.alien</groupId>
             <artifactId>alien-entity</artifactId>
             <version>1.0.0</version>
@@ -303,52 +308,53 @@
     <build>
         <plugins>
             <plugin>
+                <!-- 指定项目编译时的java版本和编码方式 -->
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <target>1.8</target>
+                    <source>1.8</source>
+                    <encoding>UTF-8</encoding>
+                    <!-- <compilerArguments> <extdirs>lib</extdirs> </compilerArguments> -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <!-- 是否要把第三方jar加入到类构建路径 -->
+                            <addClasspath>true</addClasspath>
+                            <!-- 外部依赖jar包的最终位置 -->
+                            <classpathPrefix>lib/</classpathPrefix>
+                            <!--指定jar程序入口-->
+                            <mainClass>shop.alien.store.AlienStoreApplication</mainClass>
+                        </manifest>
+                    </archive>
+                </configuration>
+            </plugin>
+            <!--拷贝依赖到jar外面的lib目录-->
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-dependency-plugin</artifactId>
-                <version>3.1.2</version> <!-- 使用最新版本 -->
                 <executions>
                     <execution>
                         <id>copy-dependencies</id>
-                        <phase>prepare-package</phase> <!-- 在package之前执行 -->
+                        <phase>prepare-package</phase>
                         <goals>
                             <goal>copy-dependencies</goal>
                         </goals>
                         <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory> <!-- 指定输出目录 -->
-                            <includeScope>runtime</includeScope> <!-- 仅包含运行时依赖 -->
+                            <!-- 拷贝项目依赖包到lib/目录下 -->
+                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
+                            <overWriteReleases>false</overWriteReleases>
+                            <overWriteSnapshots>false</overWriteSnapshots>
+                            <overWriteIfNewer>true</overWriteIfNewer>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <configuration>
-                    <mainClass>shop.alien.store.AlienStoreApplication</mainClass>
-                    <layout>ZIP</layout>
-                    <includes>
-                        <include>
-                            <groupId>nothing</groupId>
-                            <artifactId>nothing</artifactId>
-                        </include>
-                    </includes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 </project>

+ 58 - 35
alien-store/src/main/java/shop/alien/store/aspect/AiAuditAspect.java

@@ -9,8 +9,7 @@ import org.aspectj.lang.annotation.Aspect;
 import org.aspectj.lang.annotation.Pointcut;
 import org.springframework.core.annotation.Order;
 import org.springframework.stereotype.Component;
-import shop.alien.entity.store.StorePrice;
-import shop.alien.entity.store.dto.CuisineComboDto;
+import shop.alien.entity.store.AiAuditable;
 import shop.alien.store.util.ai.AiContentModerationUtil;
 
 import java.util.ArrayList;
@@ -51,13 +50,14 @@ public class AiAuditAspect {
         String payload = JSON.toJSONString(args);
         log.info("AI审核切面拦截方法: {}, payload={}", joinPoint.getSignature().toShortString(), payload);
 
-        List<String> imageUrls = extractImageUrls(args);
+        List<AiAuditable> auditTargets = extractAuditTargets(args);
+        List<String> imageUrls = extractImageUrls(auditTargets);
 
         // AI审核:文本采用入参JSON,图片列表来自入参的 images 字符串字段
-        boolean auditPassed = performAiAudit( payload, imageUrls, args);
+        boolean auditPassed = performAiAudit(payload, imageUrls, auditTargets);
 
         // 将审核结果写入请求对象
-        applyStatus(args, auditPassed);
+        applyStatus(auditTargets, auditPassed);
 
         return joinPoint.proceed(args);
     }
@@ -65,25 +65,25 @@ public class AiAuditAspect {
     /**
      * AI审核调用:使用文本审核(图片列表暂为空)
      */
-    private boolean performAiAudit(String payload, List<String> imageUrls, Object[] args) {
+    private boolean performAiAudit(String payload, List<String> imageUrls, List<AiAuditable> auditTargets) {
         try {
             // token 目前仅预留,如后续需要可添加到header或payload
             AiContentModerationUtil.AuditResult result = aiContentModerationUtil.auditContent(payload, imageUrls);
             if (result == null) {
                 log.warn("AI审核返回为空,视为未通过");
-                applyFailureReason(args, "审核异常");
+                applyFailureReason(auditTargets, "审核异常");
                 return false;
             }
             boolean passed = result.isPassed();
             if (!passed) {
                 String reason = result.getFailureReason();
                 log.warn("AI审核不通过,原因: {}", reason);
-                applyFailureReason(args, reason);
+                applyFailureReason(auditTargets, reason);
             }
             return passed;
         } catch (Exception e) {
             log.error("AI审核调用异常", e);
-            applyFailureReason(args, "审核异常");
+            applyFailureReason(auditTargets, "审核异常");
             return false;
         }
     }
@@ -91,50 +91,73 @@ public class AiAuditAspect {
     /**
      * 将审核结果写入入参的status字段(通过=1,不通过=2)
      */
-    private void applyStatus(Object[] args, boolean passed) {
+    private void applyStatus(List<AiAuditable> auditTargets, boolean passed) {
         int status = passed ? 1 : 2;
-        for (Object arg : args) {
-            if (arg == null) {
-                continue;
-            }
-            if (arg instanceof CuisineComboDto) {
-                ((CuisineComboDto) arg).setStatus(status);
-            } else if (arg instanceof StorePrice) {
-                ((StorePrice) arg).setStatus(status);
-            }
+        for (AiAuditable target : auditTargets) {
+            target.setStatus(status);
         }
     }
 
     /**
      * 将审核失败原因写入入参
      */
-    private void applyFailureReason(Object[] args, String reason) {
+    private void applyFailureReason(List<AiAuditable> auditTargets, String reason) {
         String safeReason = reason != null ? reason : "审核未通过";
-        for (Object arg : args) {
-            if (arg == null) {
-                continue;
-            }
-            if (arg instanceof CuisineComboDto) {
-                ((CuisineComboDto) arg).setRejectionReason(safeReason);
-            } else if (arg instanceof StorePrice) {
-                ((StorePrice) arg).setRejectionReason(safeReason);
-            }
+        for (AiAuditable target : auditTargets) {
+            target.setRejectionReason(safeReason);
         }
     }
 
     /**
      * 从入参中提取图片URL列表;images字段为JSON字符串数组
      */
-    private List<String> extractImageUrls(Object[] args) {
+    private List<String> extractImageUrls(List<AiAuditable> auditTargets) {
+        if (auditTargets.isEmpty()) {
+            return Collections.emptyList();
+        }
+        List<String> urls = new ArrayList<>();
+        for (AiAuditable target : auditTargets) {
+            List<String> parsed = parseImages(target.getImages());
+            if (!parsed.isEmpty()) {
+                urls.addAll(parsed);
+            }
+        }
+        return urls;
+    }
+
+    /**
+     * 将参数中支持 AI 审核的对象提取出来,支持单个对象、集合、数组
+     */
+    private List<AiAuditable> extractAuditTargets(Object[] args) {
+        if (args == null || args.length == 0) {
+            return Collections.emptyList();
+        }
+        List<AiAuditable> targets = new ArrayList<>();
         for (Object arg : args) {
-            if (arg instanceof CuisineComboDto) {
-                return parseImages(((CuisineComboDto) arg).getImages());
+            collectAuditable(arg, targets);
+        }
+        return targets;
+    }
+
+    private void collectAuditable(Object candidate, List<AiAuditable> targets) {
+        if (candidate == null) {
+            return;
+        }
+        if (candidate instanceof AiAuditable) {
+            targets.add((AiAuditable) candidate);
+            return;
+        }
+        if (candidate instanceof Iterable<?>) {
+            for (Object item : (Iterable<?>) candidate) {
+                collectAuditable(item, targets);
             }
-            if (arg instanceof StorePrice) {
-                return parseImages(((StorePrice) arg).getImages());
+            return;
+        }
+        if (candidate instanceof Object[]) {
+            for (Object item : (Object[]) candidate) {
+                collectAuditable(item, targets);
             }
         }
-        return Collections.emptyList();
     }
 
     private List<String> parseImages(String images) {

+ 2 - 0
alien-store/src/main/java/shop/alien/store/config/ElasticSearchComponent.java

@@ -27,6 +27,7 @@ import org.elasticsearch.search.SearchHits;
 import org.elasticsearch.search.builder.SearchSourceBuilder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.PostConstruct;
@@ -41,6 +42,7 @@ import java.util.UUID;
  */
 @Slf4j
 @Component
+@RefreshScope
 public class ElasticSearchComponent {
 
     @Autowired

+ 2 - 0
alien-store/src/main/java/shop/alien/store/config/GaoDeMapUtil.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Component;
 import shop.alien.entity.store.EssentialCityCode;
 import shop.alien.mapper.EssentialCityCodeMapper;
@@ -29,6 +30,7 @@ import java.util.Map;
  */
 @Slf4j
 @Component
+@RefreshScope
 @RequiredArgsConstructor
 public class GaoDeMapUtil {
 

+ 4 - 3
alien-store/src/main/java/shop/alien/store/controller/BarPerformanceController.java

@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.*;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.BarPerformance;
 import shop.alien.entity.store.dto.BarPerformanceOnlineStatusDto;
+import shop.alien.entity.store.vo.BarPerformanceDetailVo;
 import shop.alien.store.service.BarPerformanceService;
 
 /**
@@ -84,15 +85,15 @@ public class BarPerformanceController {
      * 获取酒吧演出详情
      *
      * @param id 演出ID
-     * @return 演出详情
+     * @return 演出详情(包含表演嘉宾信息)
      */
     @ApiOperation("获取酒吧演出详情")
     @ApiImplicitParam(name = "id", value = "演出ID", dataType = "Integer", paramType = "query", required = true)
     @GetMapping("/detail")
-    public R<BarPerformance> getBarPerformanceDetail(@RequestParam Integer id) {
+    public R<BarPerformanceDetailVo> getBarPerformanceDetail(@RequestParam Integer id) {
         log.info("BarPerformanceController.getBarPerformanceDetail?id={}", id);
         try {
-            BarPerformance performance = barPerformanceService.getBarPerformanceDetail(id);
+            BarPerformanceDetailVo performance = barPerformanceService.getBarPerformanceDetail(id);
             if (performance != null) {
                 return R.data(performance);
             } else {

+ 14 - 13
alien-store/src/main/java/shop/alien/store/controller/SportsFacilityAreaController.java

@@ -11,6 +11,7 @@ import shop.alien.entity.store.vo.BatchDeleteAreaRequestVo;
 import shop.alien.entity.store.vo.CreateAreaRequestVo;
 import shop.alien.entity.store.vo.DeleteAreaRequestVo;
 import shop.alien.entity.store.vo.UpdateAreaHeadUrlRequestVo;
+import shop.alien.entity.store.vo.UpdateAreaRequestVo;
 import shop.alien.store.service.SportsFacilityAreaService;
 
 import java.util.List;
@@ -111,26 +112,26 @@ public class SportsFacilityAreaController {
     @ApiOperation("更新区域信息")
     @ApiOperationSupport(order = 3)
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "areaId", value = "区域ID", dataType = "Integer", paramType = "query", required = true),
-            @ApiImplicitParam(name = "areaName", value = "区域名称(可选)", dataType = "String", paramType = "query", required = false),
-            @ApiImplicitParam(name = "sortOrder", value = "排序号(可选)", dataType = "Integer", paramType = "query", required = false)
+            @ApiImplicitParam(name = "request", value = "更新区域请求参数", dataType = "UpdateAreaRequestVo", paramType = "body", required = true)
     })
     @PostMapping("/update")
-    public R<Boolean> updateArea(
-            @RequestParam("areaId") Integer areaId,
-            @RequestParam(required = false) String areaName,
-            @RequestParam(required = false) Integer sortOrder) {
-        log.info("更新区域,areaId={},areaName={},sortOrder={}", areaId, areaName, sortOrder);
+    public R<Boolean> updateArea(@RequestBody UpdateAreaRequestVo request) {
+        log.info("更新区域,request={}", request);
         try {
             // 参数验证
-            if (areaId == null || areaId < MIN_VALID_VALUE) {
-                log.warn("更新区域失败,区域ID无效:{}", areaId);
+            if (request == null) {
+                log.warn("更新区域失败,请求参数为空");
+                return R.fail("请求参数不能为空");
+            }
+
+            if (request.getAreaId() == null || request.getAreaId() < MIN_VALID_VALUE) {
+                log.warn("更新区域失败,区域ID无效:{}", request.getAreaId());
                 return R.fail("区域ID不能为空且必须大于0");
             }
 
-            boolean result = areaService.updateArea(areaId, areaName, sortOrder);
+            boolean result = areaService.updateArea(request.getAreaId(), request.getAreaName(), request.getSortOrder());
             if (result) {
-                log.info("更新区域成功,areaId={}", areaId);
+                log.info("更新区域成功,areaId={}", request.getAreaId());
                 return R.success("更新区域成功");
             }
             return R.fail("更新区域失败");
@@ -138,7 +139,7 @@ public class SportsFacilityAreaController {
             log.warn("更新区域失败,参数验证失败:{}", e.getMessage());
             return R.fail(e.getMessage());
         } catch (Exception e) {
-            log.error("更新区域异常,areaId={},异常信息:{}", areaId, e.getMessage(), e);
+            log.error("更新区域异常,request={},异常信息:{}", request, e.getMessage(), e);
             return R.fail("更新区域失败:" + e.getMessage());
         }
     }

+ 3 - 2
alien-store/src/main/java/shop/alien/store/service/BarPerformanceService.java

@@ -2,6 +2,7 @@ package shop.alien.store.service;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import shop.alien.entity.store.BarPerformance;
+import shop.alien.entity.store.vo.BarPerformanceDetailVo;
 
 /**
  * 酒吧演出服务接口
@@ -34,9 +35,9 @@ public interface BarPerformanceService {
      * 获取酒吧演出详情
      *
      * @param id 演出ID
-     * @return 演出详情
+     * @return 演出详情(包含表演嘉宾信息)
      */
-    BarPerformance getBarPerformanceDetail(Integer id);
+    BarPerformanceDetailVo getBarPerformanceDetail(Integer id);
 
     /**
      * 删除酒吧演出

+ 108 - 8
alien-store/src/main/java/shop/alien/store/service/impl/BarPerformanceServiceImpl.java

@@ -7,15 +7,21 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import shop.alien.entity.store.BarPerformance;
+import shop.alien.entity.store.StoreStaffConfig;
+import shop.alien.entity.store.vo.BarPerformanceDetailVo;
+import shop.alien.entity.store.vo.PerformerVo;
 import shop.alien.mapper.BarPerformanceMapper;
+import shop.alien.mapper.StoreStaffConfigMapper;
 import shop.alien.store.service.BarPerformanceService;
 import shop.alien.store.util.ai.AiContentModerationUtil;
 
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 酒吧演出服务实现类
@@ -30,6 +36,7 @@ import java.util.List;
 public class BarPerformanceServiceImpl implements BarPerformanceService {
 
     private final BarPerformanceMapper barPerformanceMapper;
+    private final StoreStaffConfigMapper storeStaffConfigMapper;
     private final AiContentModerationUtil aiContentModerationUtil;
 
     @Override
@@ -190,14 +197,15 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         }
 
         // 8. 图文内容审核(调用AI内容审核接口)- 新增或更新时都必须进行
-        // - 文本:名称 + 详情 + 须知 + 风格(如果有
+        // - 文本:名称 + 风格 + 演出详情文字 + 演出须知(文本字段,不包含图片URL
         // - 图片:海报URL(如果有) + 图文详情图片URL(如果有)
         String moderationText = buildModerationText(barPerformance);
         List<String> imageUrls = new ArrayList<>();
+        // 添加演出海报到图片审核列表
         if (StringUtils.isNotEmpty(barPerformance.getPerformancePoster())) {
             imageUrls.add(barPerformance.getPerformancePoster());
         }
-        // 添加图文详情图片到审核列表
+        // 添加图文详情图片到图片审核列表(performanceDetail是图片URL列表,只做图片审核)
         if (StringUtils.isNotEmpty(barPerformance.getPerformanceDetail())) {
             String[] detailImages = barPerformance.getPerformanceDetail().split(",");
             for (String imageUrl : detailImages) {
@@ -206,7 +214,8 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
                 }
             }
         }
-        // 调用AI内容审核接口,如果检测到违规内容会抛出异常
+        // 调用AI内容审核接口,文本和图片分开审核
+        // 如果检测到违规内容会抛出异常
         AiContentModerationUtil.AuditResult auditResult = aiContentModerationUtil.auditContent(moderationText, imageUrls);
         if (auditResult == null || !auditResult.isPassed()) {
             // AI审核失败,设置审核状态为2(审核拒绝)并记录拒绝原因
@@ -299,16 +308,98 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
     }
 
     @Override
-    public BarPerformance getBarPerformanceDetail(Integer id) {
+    public BarPerformanceDetailVo getBarPerformanceDetail(Integer id) {
         if (id == null || id <= 0) {
             return null;
         }
 
+        // 查询演出基本信息
         QueryWrapper<BarPerformance> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("id", id);
         queryWrapper.eq("delete_flag", 0);
 
-        return barPerformanceMapper.selectOne(queryWrapper);
+        BarPerformance barPerformance = barPerformanceMapper.selectOne(queryWrapper);
+        if (barPerformance == null) {
+            return null;
+        }
+
+        // 转换为VO对象
+        BarPerformanceDetailVo detailVo = new BarPerformanceDetailVo();
+        BeanUtils.copyProperties(barPerformance, detailVo);
+
+        // 查询并设置表演嘉宾列表
+        List<PerformerVo> performers = queryPerformersByStaffConfigIds(barPerformance.getStaffConfigIds());
+        detailVo.setPerformers(performers);
+
+        return detailVo;
+    }
+
+    /**
+     * 根据员工配置ID字符串查询表演嘉宾列表
+     * 
+     * @param staffConfigIds 员工配置ID字符串,逗号分隔,如 "41,25"
+     * @return 表演嘉宾列表
+     */
+    private List<PerformerVo> queryPerformersByStaffConfigIds(String staffConfigIds) {
+        List<PerformerVo> performerList = new ArrayList<>();
+        
+        if (StringUtils.isEmpty(staffConfigIds)) {
+            return performerList;
+        }
+
+        try {
+            // 解析员工ID字符串
+            String[] idArray = staffConfigIds.split(",");
+            List<Integer> staffIdList = new ArrayList<>();
+            
+            for (String idStr : idArray) {
+                if (StringUtils.isNotEmpty(idStr.trim())) {
+                    try {
+                        Integer staffId = Integer.parseInt(idStr.trim());
+                        if (staffId > 0) {
+                            staffIdList.add(staffId);
+                        }
+                    } catch (NumberFormatException e) {
+                        log.warn("解析员工配置ID失败,无效的ID:{}", idStr);
+                    }
+                }
+            }
+
+            if (staffIdList.isEmpty()) {
+                return performerList;
+            }
+
+            // 批量查询员工配置信息
+            List<StoreStaffConfig> staffList = storeStaffConfigMapper.selectBatchIds(staffIdList);
+            
+            if (staffList != null && !staffList.isEmpty()) {
+                // 过滤已删除的员工,并转换为PerformerVo
+                performerList = staffList.stream()
+                        .filter(staff -> staff != null && staff.getDeleteFlag() != null && staff.getDeleteFlag() == 0)
+                        .map(this::convertToPerformerVo)
+                        .collect(Collectors.toList());
+            }
+        } catch (Exception e) {
+            log.error("查询表演嘉宾列表异常,staffConfigIds={},异常信息:{}", 
+                    staffConfigIds, e.getMessage(), e);
+        }
+
+        return performerList;
+    }
+
+    /**
+     * 将StoreStaffConfig转换为PerformerVo
+     * 
+     * @param staffConfig 员工配置信息
+     * @return 表演嘉宾VO
+     */
+    private PerformerVo convertToPerformerVo(StoreStaffConfig staffConfig) {
+        PerformerVo performerVo = new PerformerVo();
+        performerVo.setId(staffConfig.getId());
+        performerVo.setAvatar(staffConfig.getStaffImage());
+        performerVo.setName(staffConfig.getName());
+        performerVo.setStyle(staffConfig.getStaffPosition());
+        return performerVo;
     }
 
     @Override
@@ -471,26 +562,35 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         return second1 < second2;
     }
 
+    /**
+     * 构建AI审核文本内容
+     * 只包含文本字段,不包含图片URL
+     * 
+     * @param barPerformance 演出信息
+     * @return 审核文本内容
+     */
     private String buildModerationText(BarPerformance barPerformance) {
         StringBuilder sb = new StringBuilder();
         if (barPerformance == null) {
             return "";
         }
+        // 演出名称(文本)
         if (StringUtils.isNotEmpty(barPerformance.getPerformanceName())) {
             sb.append("演出名称:").append(barPerformance.getPerformanceName()).append("\n");
         }
+        // 演出风格(文本)
         if (StringUtils.isNotEmpty(barPerformance.getPerformanceStyle())) {
             sb.append("演出风格:").append(barPerformance.getPerformanceStyle()).append("\n");
         }
+        // 演出详情文字(文本,performanceContent字段)
         if (StringUtils.isNotEmpty(barPerformance.getPerformanceContent())) {
             sb.append("演出详情:").append(barPerformance.getPerformanceContent()).append("\n");
         }
+        // 演出须知(文本)
         if (StringUtils.isNotEmpty(barPerformance.getPerformanceNotice())) {
             sb.append("演出须知:").append(barPerformance.getPerformanceNotice()).append("\n");
         }
-        if (StringUtils.isNotEmpty(barPerformance.getPerformanceDetail())) {
-            sb.append("图文详情:").append(barPerformance.getPerformanceDetail()).append("\n");
-        }
+        // 注意:performanceDetail是图片URL列表,不作为文本审核,只作为图片审核
         return sb.toString();
     }
 }

+ 24 - 10
alien-store/src/main/java/shop/alien/store/service/impl/SportsFacilityAreaServiceImpl.java

@@ -109,24 +109,38 @@ public class SportsFacilityAreaServiceImpl extends ServiceImpl<SportsFacilityAre
         // 查询该门店下的所有未删除区域,按排序号升序,相同排序号按创建时间降序
         // 查询结果包含所有字段:id、storeId、areaName、sortOrder、deleteFlag、createdTime、updatedTime、
         // createdUserId、updatedUserId、areaLogoImg、areaHeadUrl
+        // 注意:MyBatis-Plus的list()方法默认会查询所有字段,包括areaLogoImg和areaHeadUrl
         LambdaQueryWrapper<SportsFacilityArea> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(SportsFacilityArea::getStoreId, storeId)
                 .eq(SportsFacilityArea::getDeleteFlag, DELETE_FLAG_NOT_DELETED)
                 .orderByAsc(SportsFacilityArea::getSortOrder)
                 .orderByDesc(SportsFacilityArea::getCreatedTime);
+        
+        // 明确指定要查询的字段,确保包含图片字段
+        queryWrapper.select(SportsFacilityArea::getId,
+                SportsFacilityArea::getStoreId,
+                SportsFacilityArea::getAreaName,
+                SportsFacilityArea::getSortOrder,
+                SportsFacilityArea::getDeleteFlag,
+                SportsFacilityArea::getCreatedTime,
+                SportsFacilityArea::getCreatedUserId,
+                SportsFacilityArea::getUpdatedTime,
+                SportsFacilityArea::getUpdatedUserId,
+                SportsFacilityArea::getAreaLogoImg,
+                SportsFacilityArea::getAreaHeadUrl);
 
         List<SportsFacilityArea> areaList = this.list(queryWrapper);
         
-        // 记录查询结果详情(包括区域头图URL长度信息,用于调试)
-        if (log.isDebugEnabled()) {
-            areaList.forEach(area -> {
-                log.debug("查询区域详情,areaId={},areaName={},areaHeadUrl长度={},areaLogoImg={}", 
-                        area.getId(), 
-                        area.getAreaName(),
-                        area.getAreaHeadUrl() != null ? area.getAreaHeadUrl().length() : 0,
-                        area.getAreaLogoImg());
-            });
-        }
+        // 记录查询结果详情(包括区域头图URL和logo图信息,用于调试)
+        // 使用INFO级别记录,方便排查图片不显示的问题
+        areaList.forEach(area -> {
+            log.info("查询区域详情,areaId={},areaName={},areaHeadUrl={},areaLogoImg={}", 
+                    area.getId(), 
+                    area.getAreaName(),
+                    area.getAreaHeadUrl() != null ? (area.getAreaHeadUrl().length() > 100 ? 
+                            area.getAreaHeadUrl().substring(0, 100) + "..." : area.getAreaHeadUrl()) : "null",
+                    area.getAreaLogoImg());
+        });
         
         log.info("查询区域列表成功,storeId={},区域数量:{}", storeId, areaList.size());
         return areaList;

+ 7 - 2
alien-store/src/main/java/shop/alien/store/service/impl/StoreCuisineServiceImpl.java

@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import shop.alien.entity.store.StoreCuisine;
 import shop.alien.entity.store.StoreCuisineCombo;
+import shop.alien.entity.store.StoreInfo;
 import shop.alien.entity.store.dto.CategoryGroupDto;
 import shop.alien.entity.store.dto.CuisineComboDto;
 import shop.alien.entity.store.dto.CuisineItemDto;
@@ -41,8 +42,6 @@ public class StoreCuisineServiceImpl extends ServiceImpl<StoreCuisineMapper, Sto
 
     private final ObjectMapper objectMapper = new ObjectMapper();
 
-    private final StoreCuisineMapper storeCuisineMapper;
-
     private final StoreInfoMapper storeInfoMapper;
 
     /**
@@ -150,6 +149,12 @@ public class StoreCuisineServiceImpl extends ServiceImpl<StoreCuisineMapper, Sto
         data.setPeopleLimit(base.getPeopleLimit());
         data.setUsageRule(base.getUsageRule());
         data.setRawJson(base.getRawJson());
+        // 补充门店电话/名称(仅用于详情返回,不落库)
+        StoreInfo storeInfo = storeInfoMapper.selectById(base.getStoreId());
+        if (storeInfo != null) {
+            data.setStorePhone(storeInfo.getStoreTel());
+            data.setStoreName(storeInfo.getStoreName());
+        }
         // 单品:groupJson 为空,name 为单品名称
         if (cuisineType != null && cuisineType == 1) {
             response.setName(base.getName());

+ 171 - 0
alien-store/src/main/java/shop/alien/store/service/impl/StoreStaffAuditAsyncService.java

@@ -0,0 +1,171 @@
+package shop.alien.store.service.impl;
+
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+import shop.alien.entity.store.StoreStaffConfig;
+import shop.alien.mapper.StoreStaffConfigMapper;
+import shop.alien.store.util.ai.AiContentModerationUtil;
+import shop.alien.store.util.ai.AiVideoModerationUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 员工审核异步服务
+ * 用于异步处理员工内容的AI审核
+ *
+ * @author assistant
+ * @since 2025-01-07
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class StoreStaffAuditAsyncService {
+
+    private final StoreStaffConfigMapper storeStaffConfigMapper;
+    private final AiContentModerationUtil aiContentModerationUtil;
+    private final AiVideoModerationUtil aiVideoModerationUtil;
+
+    /**
+     * 判断URL是否为视频
+     *
+     * @param url URL地址
+     * @return 是否为视频
+     */
+    private boolean isVideoUrl(String url) {
+        if (url == null || url.isEmpty()) {
+            return false;
+        }
+        String lowerUrl = url.toLowerCase();
+        return lowerUrl.endsWith(".mp4") ||
+               lowerUrl.endsWith(".avi") ||
+               lowerUrl.endsWith(".flv") ||
+               lowerUrl.endsWith(".mkv") ||
+               lowerUrl.endsWith(".rmvb") ||
+               lowerUrl.endsWith(".wmv") ||
+               lowerUrl.endsWith(".3gp") ||
+               lowerUrl.endsWith(".mov");
+    }
+
+    /**
+     * 异步审核员工内容
+     *
+     * @param staffId 员工ID
+     * @param storeStaffConfig 员工配置信息
+     */
+    @Async
+    public void auditStaffContentAsync(Integer staffId, StoreStaffConfig storeStaffConfig) {
+        try {
+            log.info("开始异步审核员工内容,staffId={}", staffId);
+
+            // 将状态置为"审核中"(0),清空拒绝原因
+            StoreStaffConfig auditingUpdate = new StoreStaffConfig();
+            auditingUpdate.setId(staffId);
+            auditingUpdate.setStatus("0");
+            auditingUpdate.setRejectionReason(null);
+            storeStaffConfigMapper.updateById(auditingUpdate);
+
+            // 组装 AI 审核文本和图片
+            StringBuilder textContent = new StringBuilder();
+            if (StringUtils.isNotEmpty(storeStaffConfig.getName())) {
+                textContent.append(storeStaffConfig.getName()).append(" ");
+            }
+            if (StringUtils.isNotEmpty(storeStaffConfig.getStaffPosition())) {
+                textContent.append(storeStaffConfig.getStaffPosition()).append(" ");
+            }
+            if (StringUtils.isNotEmpty(storeStaffConfig.getPersonalIntroduction())) {
+                textContent.append(storeStaffConfig.getPersonalIntroduction());
+            }
+            if (StringUtils.isNotEmpty(storeStaffConfig.getProficientProjects())) {
+                textContent.append(storeStaffConfig.getProficientProjects());
+            }
+
+            List<String> imageUrls = new ArrayList<>();
+            List<String> videoUrls = new ArrayList<>();
+
+            if (StringUtils.isNotEmpty(storeStaffConfig.getStaffImage())) {
+                imageUrls.add(storeStaffConfig.getStaffImage());
+            }
+            if (StringUtils.isNotEmpty(storeStaffConfig.getBackgroundUrl())) {
+                String[] urls = storeStaffConfig.getBackgroundUrl().split(",");
+                for (String url : urls) {
+                    if (StringUtils.isNotEmpty(url.trim())) {
+                        String trimmedUrl = url.trim();
+                        // 判断是视频还是图片
+                        if (isVideoUrl(trimmedUrl)) {
+                            videoUrls.add(trimmedUrl);
+                        } else {
+                            imageUrls.add(trimmedUrl);
+                        }
+                    }
+                }
+            }
+
+            // 1. 审核文本和图片
+            AiContentModerationUtil.AuditResult textImageAuditResult = aiContentModerationUtil.auditContent(
+                    textContent.toString().trim(), imageUrls
+            );
+
+            // 2. 审核视频(如果有)
+            AiVideoModerationUtil.VideoAuditResult videoAuditResult = null;
+            if (!videoUrls.isEmpty()) {
+                log.info("开始审核视频,视频数量:{}", videoUrls.size());
+                videoAuditResult = aiVideoModerationUtil.auditVideos(videoUrls);
+            }
+
+            // 3. 综合审核结果:文本图片审核和视频审核都必须通过
+            boolean allPassed = (textImageAuditResult != null && textImageAuditResult.isPassed()) &&
+                                (videoAuditResult == null || videoAuditResult.isPassed());
+
+            // 根据 AI 审核结果更新状态
+            // 审核通过:状态保持为"1"(审核通过)
+            // 审核失败:状态设置为"2"(审核拒绝)
+            StoreStaffConfig auditUpdate = new StoreStaffConfig();
+            auditUpdate.setId(staffId);
+            if (allPassed) {
+                // AI审核通过,状态保持为"审核中"(1)
+                auditUpdate.setStatus("1");
+                auditUpdate.setRejectionReason(null);
+                log.info("人员AI审核通过,状态设置为审核通过:staffId={}", staffId);
+            } else {
+                // AI审核失败,状态设置为"审核拒绝"(2)
+                // 收集所有失败原因
+                List<String> failureReasons = new ArrayList<>();
+                if (textImageAuditResult != null && !textImageAuditResult.isPassed()) {
+                    if (StringUtils.isNotEmpty(textImageAuditResult.getFailureReason())) {
+                        failureReasons.add("图文审核:" + textImageAuditResult.getFailureReason());
+                    } else {
+                        failureReasons.add("图文审核未通过");
+                    }
+                }
+                if (videoAuditResult != null && !videoAuditResult.isPassed()) {
+                    // 业务要求:视频审核失败统一记录"视频内容违规"
+                    failureReasons.add("视频内容违规");
+                }
+
+                String reason = failureReasons.isEmpty() ? "审核未通过" : String.join("; ", failureReasons);
+                log.warn("人员AI审核失败,状态设置为审核拒绝:staffId={}, reason={}", staffId, reason);
+                auditUpdate.setStatus("2");
+                auditUpdate.setRejectionReason(reason);
+            }
+            storeStaffConfigMapper.updateById(auditUpdate);
+
+            log.info("异步审核员工内容完成,staffId={}", staffId);
+        } catch (Exception e) {
+            log.error("异步审核员工内容异常,staffId={},异常信息:{}", staffId, e.getMessage(), e);
+            // 审核失败时,设置为审核拒绝状态
+            try {
+                StoreStaffConfig auditUpdate = new StoreStaffConfig();
+                auditUpdate.setId(staffId);
+                auditUpdate.setStatus("2");
+                auditUpdate.setRejectionReason("审核系统异常,请稍后重试");
+                storeStaffConfigMapper.updateById(auditUpdate);
+            } catch (Exception updateException) {
+                log.error("更新审核失败状态异常,staffId={},异常信息:{}", staffId, updateException.getMessage(), updateException);
+            }
+        }
+    }
+}

+ 5 - 89
alien-store/src/main/java/shop/alien/store/service/impl/StoreStaffConfigServiceImpl.java

@@ -96,6 +96,8 @@ public class StoreStaffConfigServiceImpl implements StoreStaffConfigService {
 
     private final LifeLikeRecordMapper lifeLikeRecordMapper;
 
+    private final StoreStaffAuditAsyncService storeStaffAuditAsyncService;
+
     /**
      * 认证类型:认证
      */
@@ -190,94 +192,8 @@ public class StoreStaffConfigServiceImpl implements StoreStaffConfigService {
             updateTitleStaffCount(storeStaffConfig.getTitleId());
         }
 
-        // 新增 / 修改成功后,先将状态置为"审核中"(0),清空拒绝原因
-        StoreStaffConfig auditingUpdate = new StoreStaffConfig();
-        auditingUpdate.setId(staffId);
-        auditingUpdate.setStatus("0");
-        auditingUpdate.setRejectionReason(null);
-        storeStaffConfigMapper.updateById(auditingUpdate);
-
-        // 组装 AI 审核文本和图片
-        StringBuilder textContent = new StringBuilder();
-        if (StringUtils.isNotEmpty(storeStaffConfig.getName())) {
-            textContent.append(storeStaffConfig.getName()).append(" ");
-        }
-        if (StringUtils.isNotEmpty(storeStaffConfig.getStaffPosition())) {
-            textContent.append(storeStaffConfig.getStaffPosition()).append(" ");
-        }
-        if (StringUtils.isNotEmpty(storeStaffConfig.getPersonalIntroduction())) {
-            textContent.append(storeStaffConfig.getPersonalIntroduction());
-        }
-
-        List<String> imageUrls = new ArrayList<>();
-        List<String> videoUrls = new ArrayList<>();
-        
-        if (StringUtils.isNotEmpty(storeStaffConfig.getStaffImage())) {
-            imageUrls.add(storeStaffConfig.getStaffImage());
-        }
-        if (StringUtils.isNotEmpty(storeStaffConfig.getBackgroundUrl())) {
-            String[] urls = storeStaffConfig.getBackgroundUrl().split(",");
-            for (String url : urls) {
-                if (StringUtils.isNotEmpty(url.trim())) {
-                    String trimmedUrl = url.trim();
-                    // 判断是视频还是图片
-                    if (isVideoUrl(trimmedUrl)) {
-                        videoUrls.add(trimmedUrl);
-                    } else {
-                        imageUrls.add(trimmedUrl);
-                    }
-                }
-            }
-        }
-
-        // 1. 审核文本和图片
-        AiContentModerationUtil.AuditResult textImageAuditResult = aiContentModerationUtil.auditContent(
-                textContent.toString().trim(), imageUrls
-        );
-
-        // 2. 审核视频(如果有)
-        AiVideoModerationUtil.VideoAuditResult videoAuditResult = null;
-        if (!videoUrls.isEmpty()) {
-            log.info("开始审核视频,视频数量:{}", videoUrls.size());
-            videoAuditResult = aiVideoModerationUtil.auditVideos(videoUrls);
-        }
-
-        // 3. 综合审核结果:文本图片审核和视频审核都必须通过
-        boolean allPassed = (textImageAuditResult != null && textImageAuditResult.isPassed()) &&
-                            (videoAuditResult == null || videoAuditResult.isPassed());
-
-        // 根据 AI 审核结果更新状态
-        // 审核通过:状态保持为"1"(审核通过)
-        // 审核失败:状态设置为"2"(审核拒绝)
-        StoreStaffConfig auditUpdate = new StoreStaffConfig();
-        auditUpdate.setId(staffId);
-        if (allPassed) {
-            // AI审核通过,状态保持为"审核中"(1)
-            auditUpdate.setStatus("1");
-            auditUpdate.setRejectionReason(null);
-            log.info("人员AI审核通过,状态设置为审核通过:staffId={}", staffId);
-        } else {
-            // AI审核失败,状态设置为"审核拒绝"(2)
-            // 收集所有失败原因
-            List<String> failureReasons = new ArrayList<>();
-            if (textImageAuditResult != null && !textImageAuditResult.isPassed()) {
-                if (StringUtils.isNotEmpty(textImageAuditResult.getFailureReason())) {
-                    failureReasons.add("图文审核:" + textImageAuditResult.getFailureReason());
-                } else {
-                    failureReasons.add("图文审核未通过");
-                }
-            }
-            if (videoAuditResult != null && !videoAuditResult.isPassed()) {
-                // 业务要求:视频审核失败统一记录“视频内容违规”
-                failureReasons.add("视频内容违规");
-            }
-            
-            String reason = failureReasons.isEmpty() ? "审核未通过" : String.join("; ", failureReasons);
-            log.warn("人员AI审核失败,状态设置为审核拒绝:staffId={}, reason={}", staffId, reason);
-            auditUpdate.setStatus("2");
-            auditUpdate.setRejectionReason(reason);
-        }
-        storeStaffConfigMapper.updateById(auditUpdate);
+        // 异步调用AI审核
+        storeStaffAuditAsyncService.auditStaffContentAsync(staffId, storeStaffConfig);
 
         return affected;
     }
@@ -425,7 +341,7 @@ public class StoreStaffConfigServiceImpl implements StoreStaffConfigService {
         // 构建查询条件:查询指定店铺下未删除的员工
         LambdaQueryWrapper<StoreStaffConfig> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(StoreStaffConfig::getStoreId, storeId)
-                .eq(StoreStaffConfig::getDeleteFlag, CommonConstant.DELETE_FLAG_UNDELETE)
+                .eq(StoreStaffConfig::getDeleteFlag, 0)
                 // 只查询staff_position不为空的记录
                 .isNotNull(StoreStaffConfig::getStaffPosition)
                 .ne(StoreStaffConfig::getStaffPosition, "")

+ 2 - 0
alien-store/src/main/java/shop/alien/store/util/FileUploadUtil.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Component;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartRequest;
@@ -25,6 +26,7 @@ import java.util.*;
  */
 @Slf4j
 @Component
+@RefreshScope
 @RequiredArgsConstructor
 public class FileUploadUtil {
 

+ 2 - 0
alien-store/src/main/java/shop/alien/store/util/ai/AiAuthTokenUtil.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.http.*;
 import org.springframework.stereotype.Component;
 import org.springframework.util.LinkedMultiValueMap;
@@ -16,6 +17,7 @@ import org.springframework.web.client.RestTemplate;
  */
 @Slf4j
 @Component
+@RefreshScope
 @RequiredArgsConstructor
 public class AiAuthTokenUtil {
 

+ 2 - 0
alien-store/src/main/java/shop/alien/store/util/ai/AiContentModerationUtil.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
@@ -24,6 +25,7 @@ import java.util.ArrayList;
  */
 @Slf4j
 @Component
+@RefreshScope
 @RequiredArgsConstructor
 public class AiContentModerationUtil {
 

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

@@ -22,8 +22,8 @@ import java.util.Map;
 
 @Slf4j
 @Component
-@RequiredArgsConstructor
 @RefreshScope
+@RequiredArgsConstructor
 public class AiFeedbackAssignUtils {
 
     private final RestTemplate restTemplate;

+ 2 - 0
alien-store/src/main/java/shop/alien/store/util/ai/AiGetPriceUtil.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.http.*;
 import org.springframework.http.client.SimpleClientHttpRequestFactory;
 import org.springframework.stereotype.Component;
@@ -24,6 +25,7 @@ import java.util.Map;
  */
 @Slf4j
 @Component
+@RefreshScope
 @RequiredArgsConstructor
 public class AiGetPriceUtil {
 

+ 2 - 0
alien-store/src/main/java/shop/alien/store/util/ai/AiImageColorExtractUtil.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.http.*;
 import org.springframework.stereotype.Component;
 import org.springframework.util.StringUtils;
@@ -22,6 +23,7 @@ import java.util.Map;
  */
 @Slf4j
 @Component
+@RefreshScope
 @RequiredArgsConstructor
 public class AiImageColorExtractUtil {
 

+ 2 - 0
alien-store/src/main/java/shop/alien/store/util/ai/AiVideoModerationUtil.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpStatus;
@@ -24,6 +25,7 @@ import java.util.List;
  */
 @Slf4j
 @Component
+@RefreshScope
 @RequiredArgsConstructor
 public class AiVideoModerationUtil {
 

+ 2 - 0
alien-store/src/main/java/shop/alien/store/util/ali/AliApi.java

@@ -15,6 +15,7 @@ import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Component;
 import org.springframework.web.multipart.MultipartFile;
 import shop.alien.entity.result.R;
@@ -42,6 +43,7 @@ import java.util.Map;
  */
 @Slf4j
 @Component
+@RefreshScope
 @RequiredArgsConstructor
 public class AliApi {
 

+ 2 - 0
alien-store/src/main/java/shop/alien/store/util/ali/AliSms.java

@@ -8,6 +8,7 @@ import com.aliyun.teautil.models.RuntimeOptions;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Component;
 import shop.alien.entity.store.StoreVerificationCode;
 import shop.alien.mapper.StoreVerificationCodeMapper;
@@ -26,6 +27,7 @@ import java.util.Date;
  */
 @Slf4j
 @Component
+@RefreshScope
 @RequiredArgsConstructor
 public class AliSms {
     private final BaseRedisService baseRedisService;

+ 6 - 2
alien-store/src/main/resources/bootstrap-test.yml

@@ -9,7 +9,7 @@ spring:
         server-addr: 8.130.79.5:8848
         username: nacos
         password: Alien123456
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
 
       #配置中心
       config:
@@ -20,4 +20,8 @@ spring:
         password: Alien123456
         group: DEFAULT_GROUP
         file-extension: yml
-        namespace: 00af4930-5bd5-4994-a6f6-591675a2949d
+        namespace: acd615de-5b62-4d92-996b-740183cd7f15
+        shared-configs:
+          - data-id: common.yml
+            group: DEFAULT_GROUP
+            refresh: true

+ 0 - 4
alien-util/pom.xml

@@ -340,10 +340,6 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <configuration>

+ 2 - 0
alien-util/src/main/java/shop/alien/util/ali/AliOSSUtil.java

@@ -9,6 +9,7 @@ import com.aliyun.oss.model.PutObjectResult;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Component;
 import org.springframework.web.multipart.MultipartFile;
 import shop.alien.util.file.FileUtil;
@@ -24,6 +25,7 @@ import java.io.File;
  */
 @Slf4j
 @Component
+@RefreshScope
 public class AliOSSUtil {
 
     @Value("${ali.oss.accessKeyId}")

+ 1 - 1
alien-util/src/main/java/shop/alien/util/common/VideoUtils.java

@@ -41,7 +41,7 @@ public class VideoUtils {
         String ffmpegPath = "ffmpeg";
         if ("windows".equals(OSUtil.getOsName())) {
             // ffmpegPath = "C:/Program Files (x86)/ffmpeg-6.0/bin/ffmpeg.exe";
-            ffmpegPath = "D:/project/ext/ffmpeg-6.0/bin/ffmpeg.exe";
+            ffmpegPath = "C:/project/ext/ffmpeg-6.0/bin/ffmpeg.exe";
         }
 
         // 调用ffmpeg 执行截取命令,需要服务器中安装了ffmpeg并配置了环境变量

+ 15 - 7
pom.xml

@@ -81,6 +81,12 @@
             </dependency>
 
             <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-starter-bootstrap</artifactId>
+                <version>3.0.4</version>
+            </dependency>
+
+            <dependency>
                 <groupId>org.redisson</groupId>
                 <artifactId>redisson-spring-boot-starter</artifactId>
                 <version>3.15.0</version>
@@ -391,12 +397,14 @@
     </dependencyManagement>
 
     <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>2.3.2.RELEASE</version>
-            </plugin>
-        </plugins>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-maven-plugin</artifactId>
+                    <version>2.3.2.RELEASE</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
     </build>
 </project>