|
|
@@ -201,6 +201,7 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
|
|
|
* 查询指定店铺按分类汇总的设备信息(用户端)
|
|
|
* 包含每个分类的设备数量、图片列表和设备列表
|
|
|
* 通过fitnessEquipmentIds关联FitnessEquipmentInfo信息
|
|
|
+ * 按facility_category_name分组查询,支持商户自定义分类名称
|
|
|
*
|
|
|
* @param storeId 门店ID,不能为空且必须大于0
|
|
|
* @return 分类汇总列表,不会返回null
|
|
|
@@ -218,11 +219,22 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
|
|
|
try {
|
|
|
List<SportsEquipmentFacilityCategorySummaryVo> result = new ArrayList<>();
|
|
|
|
|
|
- // 遍历所有分类(1:有氧区, 2:力量区, 3:单功能机械区)
|
|
|
- for (int category = MIN_CATEGORY_NUM; category < FACILITY_CATEGORY_NAMES.length; category++) {
|
|
|
- SportsEquipmentFacilityCategorySummaryVo categoryVo = buildCategorySummaryVo(
|
|
|
- storeId, category);
|
|
|
- result.add(categoryVo);
|
|
|
+ // 查询该店铺下所有不同的设施分类名称
|
|
|
+ List<String> categoryNameList = queryDistinctCategoryNames(storeId);
|
|
|
+
|
|
|
+ if (CollectionUtils.isEmpty(categoryNameList)) {
|
|
|
+ log.info("查询指定店铺按分类汇总的设备信息完成,storeId={},未找到分类数据", storeId);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 按分类名称分组查询
|
|
|
+ for (String categoryName : categoryNameList) {
|
|
|
+ SportsEquipmentFacilityCategorySummaryVo categoryVo = buildCategorySummaryVoByCategoryName(
|
|
|
+ storeId, categoryName);
|
|
|
+ // 只添加有设备数据的分类
|
|
|
+ if (categoryVo.getFacilityCount() > 0 || !CollectionUtils.isEmpty(categoryVo.getFacilityList())) {
|
|
|
+ result.add(categoryVo);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
log.info("查询指定店铺按分类汇总的设备信息完成,storeId={},分类数量:{}", storeId, result.size());
|
|
|
@@ -234,12 +246,99 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 构建分类汇总VO对象
|
|
|
+ * 查询指定店铺下所有不同的设施分类名称
|
|
|
+ *
|
|
|
+ * @param storeId 门店ID
|
|
|
+ * @return 分类名称列表,不会返回null
|
|
|
+ */
|
|
|
+ private List<String> queryDistinctCategoryNames(Integer storeId) {
|
|
|
+ try {
|
|
|
+ LambdaQueryWrapper<SportsEquipmentFacility> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(SportsEquipmentFacility::getStoreId, storeId)
|
|
|
+ .eq(SportsEquipmentFacility::getDeleteFlag, DELETE_FLAG_NOT_DELETED)
|
|
|
+ .isNotNull(SportsEquipmentFacility::getFacilityCategoryName)
|
|
|
+ .ne(SportsEquipmentFacility::getFacilityCategoryName, "");
|
|
|
+
|
|
|
+ List<SportsEquipmentFacility> facilityList = facilityMapper.selectList(queryWrapper);
|
|
|
+
|
|
|
+ if (CollectionUtils.isEmpty(facilityList)) {
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 提取所有不同的分类名称并排序
|
|
|
+ return facilityList.stream()
|
|
|
+ .map(SportsEquipmentFacility::getFacilityCategoryName)
|
|
|
+ .filter(StringUtils::isNotBlank)
|
|
|
+ .distinct()
|
|
|
+ .sorted()
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("查询设施分类名称列表异常,storeId={},异常信息:{}", storeId, e.getMessage(), e);
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据分类名称构建分类汇总VO对象
|
|
|
+ *
|
|
|
+ * @param storeId 门店ID
|
|
|
+ * @param categoryName 分类名称
|
|
|
+ * @return 分类汇总VO对象
|
|
|
+ */
|
|
|
+ private SportsEquipmentFacilityCategorySummaryVo buildCategorySummaryVoByCategoryName(Integer storeId, String categoryName) {
|
|
|
+ SportsEquipmentFacilityCategorySummaryVo categoryVo = new SportsEquipmentFacilityCategorySummaryVo();
|
|
|
+ categoryVo.setStoreId(storeId);
|
|
|
+ categoryVo.setFacilityCategoryName(categoryName);
|
|
|
+
|
|
|
+ // 查询该分类名称下的设备列表
|
|
|
+ List<SportsEquipmentFacility> facilityList = queryFacilityListByCategoryName(storeId, categoryName);
|
|
|
+
|
|
|
+ // 设置设备数量:统计该分类名称下的SportsEquipmentFacility记录数量
|
|
|
+ categoryVo.setFacilityCount(facilityList != null ? facilityList.size() : 0);
|
|
|
+
|
|
|
+ // 收集并解析fitnessEquipmentIds
|
|
|
+ List<Integer> fitnessEquipmentIdList = collectFitnessEquipmentIds(facilityList, storeId, null);
|
|
|
+
|
|
|
+ // 查询FitnessEquipmentInfo列表
|
|
|
+ List<FitnessEquipmentInfo> fitnessEquipmentInfoList = queryFitnessEquipmentInfoList(fitnessEquipmentIdList, null, storeId);
|
|
|
+
|
|
|
+ // 设置设备列表
|
|
|
+ categoryVo.setFacilityList(fitnessEquipmentInfoList);
|
|
|
+
|
|
|
+ // 查询并设置图片列表
|
|
|
+ // 兼容处理:图片存储时business_id存储的是facility_category编号
|
|
|
+ // 需要从该分类名称下的设备中获取facility_category值来查询图片
|
|
|
+ List<String> imageList = queryCategoryImageListByCategoryName(storeId, categoryName, facilityList);
|
|
|
+ categoryVo.setImageList(imageList);
|
|
|
+
|
|
|
+ return categoryVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据分类名称查询设备列表
|
|
|
+ *
|
|
|
+ * @param storeId 门店ID
|
|
|
+ * @param categoryName 分类名称
|
|
|
+ * @return 设备列表
|
|
|
+ */
|
|
|
+ private List<SportsEquipmentFacility> queryFacilityListByCategoryName(Integer storeId, String categoryName) {
|
|
|
+ LambdaQueryWrapper<SportsEquipmentFacility> facilityWrapper = new LambdaQueryWrapper<>();
|
|
|
+ facilityWrapper.eq(SportsEquipmentFacility::getStoreId, storeId)
|
|
|
+ .eq(SportsEquipmentFacility::getFacilityCategoryName, categoryName)
|
|
|
+ .eq(SportsEquipmentFacility::getDeleteFlag, DELETE_FLAG_NOT_DELETED)
|
|
|
+ .orderByDesc(SportsEquipmentFacility::getCreatedTime);
|
|
|
+ return facilityMapper.selectList(facilityWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 构建分类汇总VO对象(旧方法,已废弃,保留用于兼容)
|
|
|
*
|
|
|
* @param storeId 门店ID
|
|
|
* @param category 分类编号
|
|
|
* @return 分类汇总VO对象
|
|
|
+ * @deprecated 请使用 buildCategorySummaryVoByCategoryName 方法
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
private SportsEquipmentFacilityCategorySummaryVo buildCategorySummaryVo(Integer storeId, Integer category) {
|
|
|
SportsEquipmentFacilityCategorySummaryVo categoryVo = new SportsEquipmentFacilityCategorySummaryVo();
|
|
|
categoryVo.setStoreId(storeId);
|
|
|
@@ -286,7 +385,7 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
|
|
|
*
|
|
|
* @param facilityList 设备列表
|
|
|
* @param storeId 门店ID(用于日志)
|
|
|
- * @param category 分类编号(用于日志)
|
|
|
+ * @param category 分类编号(用于日志,可为null)
|
|
|
* @return 去重后的设备ID列表
|
|
|
*/
|
|
|
private List<Integer> collectFitnessEquipmentIds(List<SportsEquipmentFacility> facilityList,
|
|
|
@@ -411,7 +510,55 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 查询分类下的图片列表
|
|
|
+ * 根据分类名称查询图片列表
|
|
|
+ * 兼容处理:图片存储时business_id存储的是facility_category编号
|
|
|
+ * 需要从该分类名称下的设备中获取facility_category值来查询图片
|
|
|
+ *
|
|
|
+ * @param storeId 门店ID
|
|
|
+ * @param categoryName 分类名称
|
|
|
+ * @param facilityList 该分类下的设备列表
|
|
|
+ * @return 图片URL列表
|
|
|
+ */
|
|
|
+ private List<String> queryCategoryImageListByCategoryName(Integer storeId, String categoryName,
|
|
|
+ List<SportsEquipmentFacility> facilityList) {
|
|
|
+ try {
|
|
|
+ // 从设备列表中获取所有不同的facility_category值
|
|
|
+ List<Integer> categoryIdList = facilityList.stream()
|
|
|
+ .map(SportsEquipmentFacility::getFacilityCategory)
|
|
|
+ .filter(category -> category != null && category > 0)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ if (CollectionUtils.isEmpty(categoryIdList)) {
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 查询所有相关分类的图片
|
|
|
+ LambdaQueryWrapper<StoreImg> imageWrapper = new LambdaQueryWrapper<>();
|
|
|
+ imageWrapper.eq(StoreImg::getStoreId, storeId)
|
|
|
+ .in(StoreImg::getBusinessId, categoryIdList)
|
|
|
+ .eq(StoreImg::getImgType, IMG_TYPE_SPORTS_EQUIPMENT)
|
|
|
+ .orderByAsc(StoreImg::getImgSort);
|
|
|
+
|
|
|
+ List<StoreImg> imageList = storeImgMapper.selectList(imageWrapper);
|
|
|
+
|
|
|
+ if (CollectionUtils.isEmpty(imageList)) {
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+
|
|
|
+ return imageList.stream()
|
|
|
+ .map(StoreImg::getImgUrl)
|
|
|
+ .distinct()
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("查询分类图片列表异常,storeId={},categoryName={},异常信息:{}",
|
|
|
+ storeId, categoryName, e.getMessage(), e);
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询分类下的图片列表(旧方法,保留用于兼容)
|
|
|
*
|
|
|
* @param storeId 门店ID
|
|
|
* @param category 分类编号
|
|
|
@@ -582,18 +729,19 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
|
|
|
* 查询分类的设备详情(用户端)
|
|
|
* 包含图片列表、各子分类的设备数量汇总、设备列表
|
|
|
* 通过fitnessEquipmentIds关联FitnessEquipmentInfo信息
|
|
|
- * 如果facilityCategory为空,返回所有分类的数据
|
|
|
+ * 按facility_category_name查询,支持商户自定义分类名称
|
|
|
+ * 如果facilityCategoryName为空,返回所有分类的数据
|
|
|
* 如果equipmentType为空,返回该分类下所有类型的数据
|
|
|
*
|
|
|
- * @param storeId 门店ID,不能为空且必须大于0
|
|
|
- * @param facilityCategory 设施分类(1:有氧区, 2:力量区, 3:单功能机械区),可选,为空时返回所有分类
|
|
|
- * @param equipmentType 设备类型(1:心肺训练, 2:核心训练, 3:臀腿训练, 4:上肢训练, 5:全身训练, 6:其他),可选,为空时返回所有类型
|
|
|
+ * @param storeId 门店ID,不能为空且必须大于0
|
|
|
+ * @param facilityCategoryName 设施分类名称(商户自定义),可选,为空时返回所有分类
|
|
|
+ * @param equipmentType 设备类型(1:心肺训练, 2:核心训练, 3:臀腿训练, 4:上肢训练, 5:全身训练, 6:其他),可选,为空时返回所有类型
|
|
|
* @return 分类详情列表,不会返回null
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<FitnessEquipmentCategoryDetailVo> getCategoryDetail(Integer storeId, Integer facilityCategory, Integer equipmentType) {
|
|
|
- log.info("查询分类的设备详情(用户端),storeId={},facilityCategory={},equipmentType={}",
|
|
|
- storeId, facilityCategory, equipmentType);
|
|
|
+ public List<FitnessEquipmentCategoryDetailVo> getCategoryDetail(Integer storeId, String facilityCategoryName, Integer equipmentType) {
|
|
|
+ log.info("查询分类的设备详情(用户端),storeId={},facilityCategoryName={},equipmentType={}",
|
|
|
+ storeId, facilityCategoryName, equipmentType);
|
|
|
|
|
|
// 参数验证
|
|
|
if (!isValidStoreId(storeId)) {
|
|
|
@@ -604,41 +752,91 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
|
|
|
try {
|
|
|
List<FitnessEquipmentCategoryDetailVo> resultList = new ArrayList<>();
|
|
|
|
|
|
- // 如果facilityCategory为空,返回所有分类的数据
|
|
|
- if (facilityCategory == null) {
|
|
|
- for (int category = MIN_CATEGORY_NUM; category < FACILITY_CATEGORY_NAMES.length; category++) {
|
|
|
- FitnessEquipmentCategoryDetailVo detailVo = buildCategoryDetailVo(storeId, category, equipmentType);
|
|
|
- resultList.add(detailVo);
|
|
|
+ // 如果facilityCategoryName为空,返回所有分类的数据
|
|
|
+ if (StringUtils.isBlank(facilityCategoryName)) {
|
|
|
+ // 查询该店铺下所有不同的设施分类名称
|
|
|
+ List<String> categoryNameList = queryDistinctCategoryNames(storeId);
|
|
|
+
|
|
|
+ if (CollectionUtils.isEmpty(categoryNameList)) {
|
|
|
+ log.info("查询分类详情完成,storeId={},未找到分类数据", storeId);
|
|
|
+ return resultList;
|
|
|
}
|
|
|
- } else {
|
|
|
- // 验证facilityCategory有效性
|
|
|
- if (!isValidFacilityCategory(facilityCategory)) {
|
|
|
- log.warn("查询分类详情失败,设施分类无效:{}", facilityCategory);
|
|
|
- return new ArrayList<>();
|
|
|
+
|
|
|
+ // 遍历所有分类名称
|
|
|
+ for (String categoryName : categoryNameList) {
|
|
|
+ FitnessEquipmentCategoryDetailVo detailVo = buildCategoryDetailVoByCategoryName(storeId, categoryName, equipmentType);
|
|
|
+ // 只添加有设备数据的分类
|
|
|
+ if (detailVo.getEquipmentTypeList() != null && !detailVo.getEquipmentTypeList().isEmpty()) {
|
|
|
+ resultList.add(detailVo);
|
|
|
+ }
|
|
|
}
|
|
|
- // 返回指定分类的数据
|
|
|
- FitnessEquipmentCategoryDetailVo detailVo = buildCategoryDetailVo(storeId, facilityCategory, equipmentType);
|
|
|
+ } else {
|
|
|
+ // 返回指定分类名称的数据
|
|
|
+ FitnessEquipmentCategoryDetailVo detailVo = buildCategoryDetailVoByCategoryName(storeId, facilityCategoryName, equipmentType);
|
|
|
resultList.add(detailVo);
|
|
|
}
|
|
|
|
|
|
- log.info("查询分类详情成功,storeId={},facilityCategory={},equipmentType={},返回分类数量:{}",
|
|
|
- storeId, facilityCategory, equipmentType, resultList.size());
|
|
|
+ log.info("查询分类详情成功,storeId={},facilityCategoryName={},equipmentType={},返回分类数量:{}",
|
|
|
+ storeId, facilityCategoryName, equipmentType, resultList.size());
|
|
|
return resultList;
|
|
|
} catch (Exception e) {
|
|
|
- log.error("查询分类详情异常,storeId={},facilityCategory={},equipmentType={},异常信息:{}",
|
|
|
- storeId, facilityCategory, equipmentType, e.getMessage(), e);
|
|
|
+ log.error("查询分类详情异常,storeId={},facilityCategoryName={},equipmentType={},异常信息:{}",
|
|
|
+ storeId, facilityCategoryName, equipmentType, e.getMessage(), e);
|
|
|
throw new RuntimeException("查询分类详情异常:" + e.getMessage(), e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 构建单个分类的详情VO对象
|
|
|
+ * 根据分类名称构建单个分类的详情VO对象
|
|
|
+ *
|
|
|
+ * @param storeId 门店ID
|
|
|
+ * @param facilityCategoryName 设施分类名称
|
|
|
+ * @param equipmentType 设备类型,可选,如果传入则只返回该类型的设备列表
|
|
|
+ * @return 分类详情VO对象
|
|
|
+ */
|
|
|
+ private FitnessEquipmentCategoryDetailVo buildCategoryDetailVoByCategoryName(Integer storeId, String facilityCategoryName, Integer equipmentType) {
|
|
|
+ FitnessEquipmentCategoryDetailVo detailVo = buildBaseCategoryDetailVoByCategoryName(storeId, facilityCategoryName);
|
|
|
+
|
|
|
+ // 查询该分类名称下的设备列表(用于查询图片)
|
|
|
+ List<SportsEquipmentFacility> facilityList = queryFacilityListByCategoryName(storeId, facilityCategoryName);
|
|
|
+
|
|
|
+ // 查询并设置设备相关信息
|
|
|
+ List<FitnessEquipmentInfo> allEquipmentList = queryCategoryEquipmentListByCategoryName(storeId, facilityCategoryName);
|
|
|
+
|
|
|
+ // 如果传入了equipmentType,只筛选该类型的设备
|
|
|
+ List<FitnessEquipmentInfo> filteredEquipmentList = filterAndSortEquipmentList(allEquipmentList, equipmentType);
|
|
|
+
|
|
|
+ // 构建设备类型汇总列表(包含设备列表)
|
|
|
+ List<FitnessEquipmentTypeSummaryVo> equipmentTypeList = buildEquipmentTypeSummaryList(filteredEquipmentList);
|
|
|
+ detailVo.setEquipmentTypeList(equipmentTypeList);
|
|
|
+
|
|
|
+ // 计算所有equipmentList中的设备总数
|
|
|
+ int totalEquipmentCount = equipmentTypeList.stream()
|
|
|
+ .mapToInt(vo -> vo.getEquipmentList() != null ? vo.getEquipmentList().size() : 0)
|
|
|
+ .sum();
|
|
|
+
|
|
|
+ // 设置设备数量:所有equipmentTypeList中equipmentList的设备总数
|
|
|
+ detailVo.setFacilityCount(totalEquipmentCount);
|
|
|
+
|
|
|
+ // 查询并设置图片列表
|
|
|
+ List<String> imageList = queryCategoryImageListByCategoryName(storeId, facilityCategoryName, facilityList);
|
|
|
+ detailVo.setImageList(imageList);
|
|
|
+
|
|
|
+ log.debug("构建分类详情VO完成,storeId={},facilityCategoryName={},equipmentType={},设备数量:{}",
|
|
|
+ storeId, facilityCategoryName, equipmentType, totalEquipmentCount);
|
|
|
+ return detailVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 构建单个分类的详情VO对象(旧方法,已废弃,保留用于兼容)
|
|
|
*
|
|
|
* @param storeId 门店ID
|
|
|
* @param facilityCategory 设施分类
|
|
|
* @param equipmentType 设备类型,可选,如果传入则只返回该类型的设备列表
|
|
|
* @return 分类详情VO对象
|
|
|
+ * @deprecated 请使用 buildCategoryDetailVoByCategoryName 方法
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
private FitnessEquipmentCategoryDetailVo buildCategoryDetailVo(Integer storeId, Integer facilityCategory, Integer equipmentType) {
|
|
|
FitnessEquipmentCategoryDetailVo detailVo = buildBaseCategoryDetailVo(storeId, facilityCategory);
|
|
|
|
|
|
@@ -688,12 +886,28 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 构建基础分类详情VO对象
|
|
|
+ * 根据分类名称构建基础分类详情VO对象
|
|
|
+ *
|
|
|
+ * @param storeId 门店ID
|
|
|
+ * @param facilityCategoryName 设施分类名称
|
|
|
+ * @return 基础分类详情VO对象
|
|
|
+ */
|
|
|
+ private FitnessEquipmentCategoryDetailVo buildBaseCategoryDetailVoByCategoryName(Integer storeId, String facilityCategoryName) {
|
|
|
+ FitnessEquipmentCategoryDetailVo detailVo = new FitnessEquipmentCategoryDetailVo();
|
|
|
+ detailVo.setStoreId(storeId);
|
|
|
+ detailVo.setFacilityCategoryName(facilityCategoryName);
|
|
|
+ return detailVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 构建基础分类详情VO对象(旧方法,已废弃,保留用于兼容)
|
|
|
*
|
|
|
* @param storeId 门店ID
|
|
|
* @param facilityCategory 设施分类
|
|
|
* @return 基础分类详情VO对象
|
|
|
+ * @deprecated 请使用 buildBaseCategoryDetailVoByCategoryName 方法
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
private FitnessEquipmentCategoryDetailVo buildBaseCategoryDetailVo(Integer storeId, Integer facilityCategory) {
|
|
|
FitnessEquipmentCategoryDetailVo detailVo = new FitnessEquipmentCategoryDetailVo();
|
|
|
detailVo.setStoreId(storeId);
|
|
|
@@ -705,12 +919,32 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 查询分类下的设备列表
|
|
|
+ * 根据分类名称查询分类下的设备列表
|
|
|
+ *
|
|
|
+ * @param storeId 门店ID
|
|
|
+ * @param facilityCategoryName 设施分类名称
|
|
|
+ * @return 设备信息列表
|
|
|
+ */
|
|
|
+ private List<FitnessEquipmentInfo> queryCategoryEquipmentListByCategoryName(Integer storeId, String facilityCategoryName) {
|
|
|
+ // 查询该分类名称下的设备列表
|
|
|
+ List<SportsEquipmentFacility> facilityList = queryFacilityListByCategoryName(storeId, facilityCategoryName);
|
|
|
+
|
|
|
+ // 收集并解析fitnessEquipmentIds
|
|
|
+ List<Integer> fitnessEquipmentIdList = collectFitnessEquipmentIds(facilityList, storeId, null);
|
|
|
+
|
|
|
+ // 查询所有有效的FitnessEquipmentInfo列表
|
|
|
+ return queryAllFitnessEquipmentInfo(fitnessEquipmentIdList, storeId, null);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询分类下的设备列表(旧方法,已废弃,保留用于兼容)
|
|
|
*
|
|
|
* @param storeId 门店ID
|
|
|
* @param facilityCategory 设施分类
|
|
|
* @return 设备信息列表
|
|
|
+ * @deprecated 请使用 queryCategoryEquipmentListByCategoryName 方法
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
private List<FitnessEquipmentInfo> queryCategoryEquipmentList(Integer storeId, Integer facilityCategory) {
|
|
|
// 查询该分类下的设备列表
|
|
|
List<SportsEquipmentFacility> facilityList = queryFacilityListByCategory(storeId, facilityCategory);
|