Forráskód Böngészése

八大类列表筛选接口

ldz 2 hete
szülő
commit
a828fd9324

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

@@ -820,7 +820,7 @@ public class StoreInfoController {
             @ApiImplicitParam(name = "lat", value = "纬度", dataType = "Double", paramType = "query", required = true),
             @ApiImplicitParam(name = "distance", value = "距离范围(单位:公里)", dataType = "Double", paramType = "query"),
             @ApiImplicitParam(name = "sortType", value = "排序模式(1:智能排序,2:好评优先,3:距离优先)", dataType = "int", paramType = "query"),
-            @ApiImplicitParam(name = "businessType", value = "店铺类型(KTV=3、洗浴汗蒸=4、按摩足浴=5,酒吧=14)", dataType = "int", paramType = "query"),
+            @ApiImplicitParam(name = "businessType", value = "店铺类型(KTV=3、洗浴汗蒸=4、按摩足浴=5,酒吧=11)", dataType = "int", paramType = "query"),
             @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "int", paramType = "query", required = true),
             @ApiImplicitParam(name = "pageSize", value = "页容", dataType = "int", paramType = "query", required = true)
     })

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

@@ -308,6 +308,7 @@ public interface StoreInfoService extends IService<StoreInfo> {
      * @param distance    距离范围(单位:公里)
      * @param sortType    排序模式(1:智能排序,2:好评优先,3:距离优先)
      * @param businessType 店铺类型(KTV=3、洗浴汗蒸=4、按摩足浴=5,酒吧需要查询字典表),可选
+     * @param categoryId  分类ID(二级或三级分类的dictId,从getAllBusinessSection接口获取),可选
      * @param pageNum     页码
      * @param pageSize    页容
      * @return IPage<StoreInfoVo> 分页的门店信息列表

+ 1 - 24
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -2484,7 +2484,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         } else {
             // 如果没有指定businessType,则查询所有四种类型的店铺
             // 需要查询字典表获取所有四种类型的dictId
-            List<String> storeTypeNames = Arrays.asList("酒吧", "KTV", "洗浴汗蒸", "按摩足");
+            List<String> storeTypeNames = Arrays.asList("酒吧", "KTV", "洗浴汗蒸", "按摩足");
             List<StoreDictionary> storeDictionaries = storeDictionaryMapper.selectList(
                     new LambdaQueryWrapper<StoreDictionary>()
                             .eq(StoreDictionary::getTypeName, "business_section")
@@ -2492,29 +2492,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                             .eq(StoreDictionary::getDeleteFlag, 0)
             );
             
-            // 构建business_section的ID列表
-//            List<Integer> businessSectionIds = new ArrayList<>();
-//            businessSectionIds.add(3); // KTV
-//            businessSectionIds.add(4); // 洗浴汗蒸
-//            businessSectionIds.add(5); // 按摩足浴
-//            businessSectionIds.add(11);// 酒吧
-//
-//            // 添加从字典表查询到的其他类型(如酒吧)
-//            if (!CollectionUtils.isEmpty(storeDictionaries)) {
-//                for (StoreDictionary dict : storeDictionaries) {
-//                    if (StringUtils.isNotEmpty(dict.getDictId())) {
-//                        try {
-//                            Integer dictId = Integer.parseInt(dict.getDictId());
-//                            if (!businessSectionIds.contains(dictId)) {
-//                                businessSectionIds.add(dictId);
-//                            }
-//                        } catch (NumberFormatException e) {
-//                            // 忽略非数字的dictId
-//                        }
-//                    }
-//                }
-//            }
-
             List<Integer> businessSectionIds = storeDictionaries.stream()
                     .filter(dict -> StringUtils.isNotEmpty(dict.getDictId()))
                     .map(StoreDictionary::getDictId)