|
|
@@ -3424,40 +3424,4 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
- @Override
|
|
|
- public List<StoreDictionaryVo> getBusinessClassifyData(Integer parentId) {
|
|
|
- // 构建查询条件
|
|
|
- LambdaQueryWrapper<StoreDictionary> queryWrapper = new LambdaQueryWrapper<StoreDictionary>()
|
|
|
- .eq(StoreDictionary::getTypeName, "business_classify")
|
|
|
- .eq(StoreDictionary::getDeleteFlag, 0)
|
|
|
- .orderByAsc(StoreDictionary::getDictId);
|
|
|
-
|
|
|
- // 如果指定了parentId,则只查询该父分类下的子分类
|
|
|
- if (parentId != null) {
|
|
|
- queryWrapper.eq(StoreDictionary::getParentId, parentId);
|
|
|
- } else {
|
|
|
- // 如果没有指定parentId,则查询所有子分类(parentId不为0或null的分类)
|
|
|
- queryWrapper.isNotNull(StoreDictionary::getParentId)
|
|
|
- .ne(StoreDictionary::getParentId, 0);
|
|
|
- }
|
|
|
-
|
|
|
- // 查询字典数据
|
|
|
- List<StoreDictionary> allClassifies = storeDictionaryMapper.selectList(queryWrapper);
|
|
|
-
|
|
|
- // 构建扁平化的结果列表(仅返回子分类,用于多选功能)
|
|
|
- List<StoreDictionaryVo> result = new ArrayList<>();
|
|
|
-
|
|
|
- for (StoreDictionary classify : allClassifies) {
|
|
|
- StoreDictionaryVo vo = new StoreDictionaryVo();
|
|
|
- BeanUtils.copyProperties(classify, vo);
|
|
|
- // 不设置subDataList,返回扁平化列表
|
|
|
- result.add(vo);
|
|
|
- }
|
|
|
-
|
|
|
- return result;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+}
|