Ver código fonte

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

lyx 3 meses atrás
pai
commit
a551c7f317

+ 1 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreCuisineComboMapper.java

@@ -18,3 +18,4 @@ public interface StoreCuisineComboMapper extends BaseMapper<StoreCuisineCombo> {
 
 
 
 
 
 
+

+ 1 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreCuisineMapper.java

@@ -18,3 +18,4 @@ public interface StoreCuisineMapper extends BaseMapper<StoreCuisine> {
 
 
 
 
 
 
+

+ 1 - 0
alien-entity/src/main/resources/mapper/StoreCuisineComboMapper.xml

@@ -28,3 +28,4 @@
 
 
 
 
 
 
+

+ 0 - 7
alien-gateway/pom.xml

@@ -224,13 +224,6 @@
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
                 <configuration>
                 <configuration>
                     <mainClass>shop.alien.gateway.AlienGatewayApplication</mainClass>
                     <mainClass>shop.alien.gateway.AlienGatewayApplication</mainClass>
-                    <layout>ZIP</layout>
-                    <includes>
-                        <include>
-                            <groupId>nothing</groupId>
-                            <artifactId>nothing</artifactId>
-                        </include>
-                    </includes>
                 </configuration>
                 </configuration>
                 <executions>
                 <executions>
                     <execution>
                     <execution>

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

@@ -89,10 +89,10 @@ public class AiAuditAspect {
     }
     }
 
 
     /**
     /**
-     * 将审核结果写入入参的status字段(通过=1,不通过=0
+     * 将审核结果写入入参的status字段(通过=1,不通过=2
      */
      */
     private void applyStatus(Object[] args, boolean passed) {
     private void applyStatus(Object[] args, boolean passed) {
-        int status = passed ? 1 : 0;
+        int status = passed ? 1 : 2;
         for (Object arg : args) {
         for (Object arg : args) {
             if (arg == null) {
             if (arg == null) {
                 continue;
                 continue;

+ 1 - 1
alien-store/src/main/java/shop/alien/store/controller/AiSearchController.java

@@ -44,7 +44,7 @@ public class AiSearchController {
         requestBody.put("query", map.get("storeName"));
         requestBody.put("query", map.get("storeName"));
         requestBody.put("limit", map.get("pageSize"));
         requestBody.put("limit", map.get("pageSize"));
         requestBody.put("user_lat", map.get("lat"));
         requestBody.put("user_lat", map.get("lat"));
-        requestBody.put("user_lng", map.get("lan"));
+        requestBody.put("user_lng", map.get("lon"));
         requestBody.put("category", map.get("category"));
         requestBody.put("category", map.get("category"));
         HttpHeaders aiHeaders = new HttpHeaders();
         HttpHeaders aiHeaders = new HttpHeaders();
         aiHeaders.setContentType(MediaType.APPLICATION_JSON);
         aiHeaders.setContentType(MediaType.APPLICATION_JSON);

+ 1 - 7
alien-store/src/main/java/shop/alien/store/controller/AiUploadController.java

@@ -7,7 +7,6 @@ import io.swagger.annotations.ApiOperationSupport;
 import io.swagger.annotations.ApiSort;
 import io.swagger.annotations.ApiSort;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -39,13 +38,8 @@ public class AiUploadController {
             return R.fail("音频文件不能为空");
             return R.fail("音频文件不能为空");
         }
         }
         
         
-        String accessToken = aiFeedbackAssignUtils.getAccessToken();
-        if (!StringUtils.hasText(accessToken)) {
-          return  R.fail("调用AI语音识别接口 登录接口失败");
-        }
-        
         try {
         try {
-            String speechRecognitionResult = aiFeedbackAssignUtils.getSpeechRecognition1(file, accessToken, language, use_itn, merge_vad);
+            String speechRecognitionResult = aiFeedbackAssignUtils.getSpeechRecognition1(file, null, language, use_itn, merge_vad);
             if (speechRecognitionResult == null) {
             if (speechRecognitionResult == null) {
                 return R.fail("语音识别失败");
                 return R.fail("语音识别失败");
             }
             }

+ 2 - 2
alien-store/src/main/java/shop/alien/store/controller/StoreCuisineController.java

@@ -68,8 +68,8 @@ public class StoreCuisineController {
     @ApiOperation("获取所有美食单品名称,用于添加套餐")
     @ApiOperation("获取所有美食单品名称,用于添加套餐")
     @ApiOperationSupport(order = 1)
     @ApiOperationSupport(order = 1)
     @GetMapping("/getSingleName")
     @GetMapping("/getSingleName")
-    public R<List<StoreCuisine>> getSingleName() {
-        return R.data(storeCuisineService.getSingleName());
+    public R<List<StoreCuisine>> getSingleName(Integer storeId) {
+        return R.data(storeCuisineService.getSingleName(storeId));
     }
     }
 
 
     @ApiOperation("根据id与类型获取美食单品或套餐详情")
     @ApiOperation("根据id与类型获取美食单品或套餐详情")

+ 1 - 0
alien-store/src/main/java/shop/alien/store/service/StoreCuisineComboService.java

@@ -35,3 +35,4 @@ public interface StoreCuisineComboService extends IService<StoreCuisineCombo> {
 
 
 
 
 
 
+

+ 1 - 1
alien-store/src/main/java/shop/alien/store/service/StoreCuisineService.java

@@ -29,7 +29,7 @@ public interface StoreCuisineService extends IService<StoreCuisine> {
     /**
     /**
      * 获取所有单品名称(cuisine_type = 1),用于添加套餐时选择
      * 获取所有单品名称(cuisine_type = 1),用于添加套餐时选择
      */
      */
-    List<StoreCuisine> getSingleName();
+    List<StoreCuisine> getSingleName(Integer storeId);
 
 
     /**
     /**
      * 根据 id 与类型获取详情(新格式):
      * 根据 id 与类型获取详情(新格式):

+ 29 - 2
alien-store/src/main/java/shop/alien/store/service/impl/SportsEquipmentFacilityServiceImpl.java

@@ -793,8 +793,8 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
         categoryVo.setFacilityList(fitnessEquipmentInfoList);
         categoryVo.setFacilityList(fitnessEquipmentInfoList);
         categoryVo.setFacilityCount(fitnessEquipmentInfoList.size());
         categoryVo.setFacilityCount(fitnessEquipmentInfoList.size());
 
 
-        // 5. 查询并设置图片列表(根据区域ID查询
-        List<String> imageList = queryCategoryImageListByAreaId(storeId, area.getId());
+        // 5. 从sports_facility_area表的area_head_url字段获取图片列表(逗号分隔
+        List<String> imageList = parseImageListFromAreaHeadUrl(area.getAreaHeadUrl());
         categoryVo.setImageList(imageList);
         categoryVo.setImageList(imageList);
         categoryVo.setAreaLogoImg(area.getAreaLogoImg());
         categoryVo.setAreaLogoImg(area.getAreaLogoImg());
         return categoryVo;
         return categoryVo;
@@ -915,13 +915,40 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
     }
     }
     
     
     /**
     /**
+     * 从area_head_url字段解析图片列表(逗号分隔)
+     *
+     * @param areaHeadUrl 区域头部图片URL字符串(逗号分隔)
+     * @return 图片URL列表
+     */
+    private List<String> parseImageListFromAreaHeadUrl(String areaHeadUrl) {
+        try {
+            if (StringUtils.isBlank(areaHeadUrl)) {
+                return new ArrayList<>();
+            }
+            
+            // 按逗号分隔,去除空白字符,过滤空字符串
+            return java.util.Arrays.stream(areaHeadUrl.split(","))
+                    .map(String::trim)
+                    .filter(StringUtils::isNotBlank)
+                    .distinct()
+                    .collect(Collectors.toList());
+        } catch (Exception e) {
+            log.error("解析区域头部图片URL列表异常,areaHeadUrl={},异常信息:{}", 
+                    areaHeadUrl, e.getMessage(), e);
+            return new ArrayList<>();
+        }
+    }
+    
+    /**
      * 根据区域ID查询图片列表(专门用于categorySummary接口)
      * 根据区域ID查询图片列表(专门用于categorySummary接口)
      * 图片存储时business_id存储的是区域ID(area_id)
      * 图片存储时business_id存储的是区域ID(area_id)
+     * 注意:此方法已废弃,现在使用parseImageListFromAreaHeadUrl方法从area_head_url字段获取
      *
      *
      * @param storeId 门店ID
      * @param storeId 门店ID
      * @param areaId  区域ID
      * @param areaId  区域ID
      * @return 图片URL列表
      * @return 图片URL列表
      */
      */
+    @Deprecated
     private List<String> queryCategoryImageListByAreaId(Integer storeId, Integer areaId) {
     private List<String> queryCategoryImageListByAreaId(Integer storeId, Integer areaId) {
         try {
         try {
             // 查询该区域下的图片
             // 查询该区域下的图片

+ 5 - 1
alien-store/src/main/java/shop/alien/store/service/impl/StoreCuisineServiceImpl.java

@@ -98,9 +98,13 @@ public class StoreCuisineServiceImpl extends ServiceImpl<StoreCuisineMapper, Sto
      * 获取所有单品名称(cuisine_type = 1),用于添加套餐
      * 获取所有单品名称(cuisine_type = 1),用于添加套餐
      */
      */
     @Override
     @Override
-    public List<StoreCuisine> getSingleName() {
+    public List<StoreCuisine> getSingleName(Integer storeId) {
         return lambdaQuery()
         return lambdaQuery()
                 .eq(StoreCuisine::getCuisineType, 1)
                 .eq(StoreCuisine::getCuisineType, 1)
+                .eq(StoreCuisine::getStatus, 1)
+                .eq(StoreCuisine::getShelfStatus, 1)
+                .eq(StoreCuisine::getDeleteFlag, 0)
+                .eq(StoreCuisine::getStoreId, storeId)
                 .list();
                 .list();
     }
     }
 
 

+ 1 - 1
pom.xml

@@ -83,7 +83,7 @@
             <dependency>
             <dependency>
                 <groupId>org.redisson</groupId>
                 <groupId>org.redisson</groupId>
                 <artifactId>redisson-spring-boot-starter</artifactId>
                 <artifactId>redisson-spring-boot-starter</artifactId>
-                <version>3.17.7</version>
+                <version>3.15.0</version>
             </dependency>
             </dependency>
 
 
             <dependency>
             <dependency>