|
|
@@ -26,8 +26,10 @@ import java.net.URLEncoder;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
/**
|
|
|
* 平台字典库管理ServiceImpl
|
|
|
@@ -45,12 +47,20 @@ public class DictionaryLibraryServiceImpl extends ServiceImpl<StoreDictionaryMap
|
|
|
|
|
|
/**
|
|
|
* 查询字典库(三级树形结构)
|
|
|
+ * 如果传入dictDetail,则查询匹配的记录及其父级和子级树形结构
|
|
|
+ * 如果不传dictDetail,则返回完整的字典库树形结构
|
|
|
*
|
|
|
+ * @param dictDetail 字典描述(可选),如果传入则根据此参数过滤
|
|
|
* @return 字典库树形结构列表
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<StoreDictionary> queryDictionaryLibraryTree() {
|
|
|
- // 查询所有字典库数据
|
|
|
+ public List<StoreDictionary> queryDictionaryLibraryTree(String dictDetail) {
|
|
|
+ // 如果传入了dictDetail,使用过滤逻辑
|
|
|
+ if (StringUtils.isNotBlank(dictDetail)) {
|
|
|
+ return selectDictBydictDetail(dictDetail);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 否则使用原有逻辑:查询所有字典库数据
|
|
|
LambdaQueryWrapper<StoreDictionary> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.in(StoreDictionary::getTypeName, "report", "report_type", "report_classify");
|
|
|
queryWrapper.eq(StoreDictionary::getDeleteFlag, 0);
|
|
|
@@ -951,5 +961,456 @@ public class DictionaryLibraryServiceImpl extends ServiceImpl<StoreDictionaryMap
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int deleteDictionaryLibrary(Long id) {
|
|
|
+ return storeDictionaryMapper.deleteById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改字典库状态(通过id修改hidden为1)
|
|
|
+ *
|
|
|
+ * @param id 字典库ID
|
|
|
+ * @return 修改结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int updateHiddenStatus(Long id) {
|
|
|
+ if (id == null) {
|
|
|
+ throw new IllegalArgumentException("ID不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 查询原记录
|
|
|
+ StoreDictionary existing = storeDictionaryMapper.selectById(id);
|
|
|
+ if (existing == null) {
|
|
|
+ throw new IllegalArgumentException("记录不存在");
|
|
|
+ }
|
|
|
+ if (existing.getDeleteFlag() == 1) {
|
|
|
+ throw new IllegalArgumentException("该记录已删除");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 设置hidden为1
|
|
|
+ existing.setHidden(1);
|
|
|
+ existing.setUpdatedTime(new Date());
|
|
|
+
|
|
|
+ // 更新记录
|
|
|
+ return storeDictionaryMapper.updateById(existing);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据dictDetail查询字典库(包含父级或子级树形结构)
|
|
|
+ * 支持查询多个同名数据及其父级和子级
|
|
|
+ *
|
|
|
+ * @param dictDetail 字典描述
|
|
|
+ * @return 字典库树形结构列表
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<StoreDictionary> selectDictBydictDetail(String dictDetail) {
|
|
|
+ if (StringUtils.isBlank(dictDetail)) {
|
|
|
+ throw new IllegalArgumentException("dictDetail不能为空");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 通过dictDetail模糊查询所有匹配的记录(可能有多个同名数据)
|
|
|
+ LambdaQueryWrapper<StoreDictionary> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.in(StoreDictionary::getTypeName, "report", "report_type", "report_classify");
|
|
|
+ queryWrapper.eq(StoreDictionary::getDeleteFlag, 0);
|
|
|
+ queryWrapper.like(StoreDictionary::getDictDetail, dictDetail);
|
|
|
+
|
|
|
+ List<StoreDictionary> matchedDicts = storeDictionaryMapper.selectList(queryWrapper);
|
|
|
+
|
|
|
+ if (matchedDicts == null || matchedDicts.isEmpty()) {
|
|
|
+ log.warn("未找到dictDetail为[{}]的记录", dictDetail);
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+
|
|
|
+ log.info("找到{}条dictDetail为[{}]的记录", matchedDicts.size(), dictDetail);
|
|
|
+
|
|
|
+ // 用于存储每个根节点对应的所有节点(按根节点分组)
|
|
|
+ Map<Integer, Set<Integer>> rootToNodeIdsMap = new HashMap<>();
|
|
|
+
|
|
|
+ // 遍历所有匹配的记录,收集相关节点ID
|
|
|
+ for (StoreDictionary currentDict : matchedDicts) {
|
|
|
+ Integer parentId = currentDict.getParentId();
|
|
|
+ Integer rootId;
|
|
|
+
|
|
|
+ if (parentId != null && parentId != 0) {
|
|
|
+ // 如果有父级,查找根节点
|
|
|
+ rootId = findRootId(currentDict.getId());
|
|
|
+ log.info("记录ID[{}]有父级[{}], 根节点ID[{}]", currentDict.getId(), parentId, rootId);
|
|
|
+
|
|
|
+ // 收集从根节点到当前节点的路径上的所有节点ID
|
|
|
+ List<Integer> pathNodeIds = new ArrayList<>();
|
|
|
+ collectPathNodes(currentDict.getId(), pathNodeIds);
|
|
|
+ log.info("路径节点IDs: {}", pathNodeIds);
|
|
|
+
|
|
|
+ // 收集该根节点下的所有相关节点ID(包括路径节点及其所有子节点)
|
|
|
+ Set<Integer> nodeIds = rootToNodeIdsMap.computeIfAbsent(rootId, k -> new HashSet<>());
|
|
|
+ for (Integer nodeId : pathNodeIds) {
|
|
|
+ nodeIds.add(nodeId);
|
|
|
+ collectChildrenIds(nodeId, nodeIds);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // 如果没有父级,以当前节点为根
|
|
|
+ rootId = currentDict.getId();
|
|
|
+ log.info("记录ID[{}]没有父级, 作为根节点", currentDict.getId());
|
|
|
+
|
|
|
+ // 收集该根节点下的所有相关节点ID
|
|
|
+ Set<Integer> nodeIds = rootToNodeIdsMap.computeIfAbsent(rootId, k -> new HashSet<>());
|
|
|
+ nodeIds.add(currentDict.getId());
|
|
|
+ collectChildrenIds(currentDict.getId(), nodeIds);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 收集所有需要返回的节点数据
|
|
|
+ Map<Integer, StoreDictionary> allNodeMap = new HashMap<>();
|
|
|
+ for (Set<Integer> nodeIds : rootToNodeIdsMap.values()) {
|
|
|
+ for (Integer nodeId : nodeIds) {
|
|
|
+ if (!allNodeMap.containsKey(nodeId)) {
|
|
|
+ StoreDictionary node = storeDictionaryMapper.selectById(nodeId);
|
|
|
+ if (node != null && node.getDeleteFlag() == 0) {
|
|
|
+ allNodeMap.put(nodeId, node);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ log.info("总共收集到{}个节点", allNodeMap.size());
|
|
|
+
|
|
|
+ // 构建树形结构,为每个唯一的根节点构建一棵树
|
|
|
+ List<StoreDictionary> resultList = new ArrayList<>();
|
|
|
+
|
|
|
+ for (Map.Entry<Integer, Set<Integer>> entry : rootToNodeIdsMap.entrySet()) {
|
|
|
+ Integer rootId = entry.getKey();
|
|
|
+ Set<Integer> nodeIds = entry.getValue();
|
|
|
+
|
|
|
+ log.info("处理根节点[{}], 包含{}个节点", rootId, nodeIds.size());
|
|
|
+
|
|
|
+ // 从所有节点中筛选出该根节点下的相关节点
|
|
|
+ List<StoreDictionary> relatedNodes = new ArrayList<>();
|
|
|
+ for (Integer nodeId : nodeIds) {
|
|
|
+ StoreDictionary node = allNodeMap.get(nodeId);
|
|
|
+ if (node != null) {
|
|
|
+ relatedNodes.add(node);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ log.info("根节点[{}]筛选出{}个相关节点", rootId, relatedNodes.size());
|
|
|
+
|
|
|
+ // 如果找到相关节点,构建树形结构
|
|
|
+ if (!relatedNodes.isEmpty()) {
|
|
|
+ StoreDictionary root = buildTreeFromNodeList(relatedNodes, rootId);
|
|
|
+ if (root != null) {
|
|
|
+ resultList.add(root);
|
|
|
+ log.info("成功构建根节点[{}]的树形结构", rootId);
|
|
|
+ } else {
|
|
|
+ log.warn("构建根节点[{}]的树形结构失败", rootId);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ log.warn("根节点[{}]没有相关节点", rootId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ log.info("最终返回{}棵树", resultList.size());
|
|
|
+ return resultList;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 收集节点的所有子节点ID(递归)
|
|
|
+ *
|
|
|
+ * @param nodeId 节点ID
|
|
|
+ * @param childrenIds 子节点ID集合
|
|
|
+ */
|
|
|
+ private void collectChildrenIds(Integer nodeId, Set<Integer> childrenIds) {
|
|
|
+ LambdaQueryWrapper<StoreDictionary> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.in(StoreDictionary::getTypeName, "report", "report_type", "report_classify");
|
|
|
+ queryWrapper.eq(StoreDictionary::getDeleteFlag, 0);
|
|
|
+ queryWrapper.eq(StoreDictionary::getParentId, nodeId);
|
|
|
+
|
|
|
+ List<StoreDictionary> children = storeDictionaryMapper.selectList(queryWrapper);
|
|
|
+
|
|
|
+ if (children != null && !children.isEmpty()) {
|
|
|
+ for (StoreDictionary child : children) {
|
|
|
+ if (!childrenIds.contains(child.getId())) {
|
|
|
+ childrenIds.add(child.getId());
|
|
|
+ collectChildrenIds(child.getId(), childrenIds);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 递归查找根节点ID
|
|
|
+ *
|
|
|
+ * @param id 当前节点ID
|
|
|
+ * @return 根节点ID
|
|
|
+ */
|
|
|
+ private Integer findRootId(Integer id) {
|
|
|
+ StoreDictionary dict = storeDictionaryMapper.selectById(id);
|
|
|
+ if (dict == null || dict.getDeleteFlag() == 1) {
|
|
|
+ // 如果节点不存在或已删除,返回当前ID作为根节点
|
|
|
+ return id;
|
|
|
+ }
|
|
|
+
|
|
|
+ Integer parentId = dict.getParentId();
|
|
|
+ if (parentId == null || parentId == 0) {
|
|
|
+ return id;
|
|
|
+ }
|
|
|
+
|
|
|
+ return findRootId(parentId);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 收集从当前节点到根节点的路径上的所有节点ID
|
|
|
+ *
|
|
|
+ * @param nodeId 当前节点ID
|
|
|
+ * @param pathNodeIds 路径节点ID列表
|
|
|
+ */
|
|
|
+ private void collectPathNodes(Integer nodeId, List<Integer> pathNodeIds) {
|
|
|
+ StoreDictionary dict = storeDictionaryMapper.selectById(nodeId);
|
|
|
+ if (dict == null || dict.getDeleteFlag() == 1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 避免重复添加
|
|
|
+ if (!pathNodeIds.contains(nodeId)) {
|
|
|
+ pathNodeIds.add(nodeId);
|
|
|
+ }
|
|
|
+
|
|
|
+ Integer parentId = dict.getParentId();
|
|
|
+ if (parentId != null && parentId != 0) {
|
|
|
+ collectPathNodes(parentId, pathNodeIds);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 从树形结构中过滤出包含指定dictDetail的树
|
|
|
+ *
|
|
|
+ * @param treeList 树形结构列表
|
|
|
+ * @param dictDetail 字典描述
|
|
|
+ * @return 过滤后的树形结构列表
|
|
|
+ */
|
|
|
+ private List<StoreDictionary> filterTreeByDictDetail(List<StoreDictionary> treeList, String dictDetail) {
|
|
|
+ List<StoreDictionary> result = new ArrayList<>();
|
|
|
+
|
|
|
+ for (StoreDictionary node : treeList) {
|
|
|
+ // 检查当前节点是否包含目标dictDetail
|
|
|
+ if (containsDictDetail(node, dictDetail)) {
|
|
|
+ // 如果包含,复制节点并保留树形结构
|
|
|
+ StoreDictionary filteredNode = filterNodeByDictDetail(node, dictDetail);
|
|
|
+ if (filteredNode != null) {
|
|
|
+ result.add(filteredNode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 检查节点及其子树是否包含指定dictDetail
|
|
|
+ *
|
|
|
+ * @param node 节点
|
|
|
+ * @param dictDetail 字典描述
|
|
|
+ * @return 是否包含
|
|
|
+ */
|
|
|
+ private boolean containsDictDetail(StoreDictionary node, String dictDetail) {
|
|
|
+ if (node == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (dictDetail.equals(node.getDictDetail())) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<StoreDictionary> children = node.getStoreDictionaryList();
|
|
|
+ if (children != null && !children.isEmpty()) {
|
|
|
+ for (StoreDictionary child : children) {
|
|
|
+ if (containsDictDetail(child, dictDetail)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 过滤节点,只保留包含目标dictDetail的路径
|
|
|
+ *
|
|
|
+ * @param node 节点
|
|
|
+ * @param dictDetail 字典描述
|
|
|
+ * @return 过滤后的节点
|
|
|
+ */
|
|
|
+ private StoreDictionary filterNodeByDictDetail(StoreDictionary node, String dictDetail) {
|
|
|
+ if (node == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ StoreDictionary result = new StoreDictionary();
|
|
|
+ result.setId(node.getId());
|
|
|
+ result.setTypeName(node.getTypeName());
|
|
|
+ result.setTypeDetail(node.getTypeDetail());
|
|
|
+ result.setParentId(node.getParentId());
|
|
|
+ result.setDictId(node.getDictId());
|
|
|
+ result.setDictDetail(node.getDictDetail());
|
|
|
+ result.setDeleteFlag(node.getDeleteFlag());
|
|
|
+ result.setCreatedTime(node.getCreatedTime());
|
|
|
+ result.setCreatedUserId(node.getCreatedUserId());
|
|
|
+ result.setUpdatedTime(node.getUpdatedTime());
|
|
|
+ result.setUpdatedUserId(node.getUpdatedUserId());
|
|
|
+ result.setHidden(node.getHidden());
|
|
|
+ result.setSortId(node.getSortId());
|
|
|
+
|
|
|
+ List<StoreDictionary> filteredChildren = new ArrayList<>();
|
|
|
+ List<StoreDictionary> children = node.getStoreDictionaryList();
|
|
|
+
|
|
|
+ if (children != null && !children.isEmpty()) {
|
|
|
+ for (StoreDictionary child : children) {
|
|
|
+ if (containsDictDetail(child, dictDetail)) {
|
|
|
+ StoreDictionary filteredChild = filterNodeByDictDetail(child, dictDetail);
|
|
|
+ if (filteredChild != null) {
|
|
|
+ filteredChildren.add(filteredChild);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ result.setStoreDictionaryList(filteredChildren);
|
|
|
+
|
|
|
+ // 如果当前节点匹配,或者有子节点,则返回
|
|
|
+ if (dictDetail.equals(node.getDictDetail()) || !filteredChildren.isEmpty()) {
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 收集节点及其所有子节点
|
|
|
+ *
|
|
|
+ * @param nodeId 节点ID
|
|
|
+ * @param nodeList 节点列表
|
|
|
+ */
|
|
|
+ private void collectNodeAndChildren(Integer nodeId, List<StoreDictionary> nodeList) {
|
|
|
+ StoreDictionary node = storeDictionaryMapper.selectById(nodeId);
|
|
|
+ if (node == null || node.getDeleteFlag() == 1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 检查是否已经添加过(避免重复)
|
|
|
+ boolean alreadyAdded = nodeList.stream().anyMatch(n -> n.getId().equals(nodeId));
|
|
|
+ if (!alreadyAdded) {
|
|
|
+ nodeList.add(node);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 查询所有子节点
|
|
|
+ LambdaQueryWrapper<StoreDictionary> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.in(StoreDictionary::getTypeName, "report", "report_type", "report_classify");
|
|
|
+ queryWrapper.eq(StoreDictionary::getDeleteFlag, 0);
|
|
|
+ queryWrapper.eq(StoreDictionary::getParentId, nodeId);
|
|
|
+ queryWrapper.orderByAsc(StoreDictionary::getSortId);
|
|
|
+
|
|
|
+ List<StoreDictionary> children = storeDictionaryMapper.selectList(queryWrapper);
|
|
|
+
|
|
|
+ if (children != null && !children.isEmpty()) {
|
|
|
+ for (StoreDictionary child : children) {
|
|
|
+ collectNodeAndChildren(child.getId(), nodeList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 收集节点及其所有子节点(使用Map去重)
|
|
|
+ *
|
|
|
+ * @param nodeId 节点ID
|
|
|
+ * @param nodeMap 节点Map(用于去重)
|
|
|
+ */
|
|
|
+ private void collectNodeAndChildren(Integer nodeId, Map<Integer, StoreDictionary> nodeMap) {
|
|
|
+ StoreDictionary node = storeDictionaryMapper.selectById(nodeId);
|
|
|
+ if (node == null || node.getDeleteFlag() == 1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 添加到Map(自动去重)
|
|
|
+ nodeMap.put(nodeId, node);
|
|
|
+
|
|
|
+ // 查询所有子节点
|
|
|
+ LambdaQueryWrapper<StoreDictionary> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.in(StoreDictionary::getTypeName, "report", "report_type", "report_classify");
|
|
|
+ queryWrapper.eq(StoreDictionary::getDeleteFlag, 0);
|
|
|
+ queryWrapper.eq(StoreDictionary::getParentId, nodeId);
|
|
|
+ queryWrapper.orderByAsc(StoreDictionary::getSortId);
|
|
|
+
|
|
|
+ List<StoreDictionary> children = storeDictionaryMapper.selectList(queryWrapper);
|
|
|
+
|
|
|
+ if (children != null && !children.isEmpty()) {
|
|
|
+ for (StoreDictionary child : children) {
|
|
|
+ collectNodeAndChildren(child.getId(), nodeMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 从节点列表构建树形结构
|
|
|
+ *
|
|
|
+ * @param nodeList 节点列表
|
|
|
+ * @param rootId 根节点ID
|
|
|
+ * @return 根节点
|
|
|
+ */
|
|
|
+ private StoreDictionary buildTreeFromNodeList(List<StoreDictionary> nodeList, Integer rootId) {
|
|
|
+ // 创建ID到节点的映射
|
|
|
+ Map<Integer, StoreDictionary> nodeMap = new HashMap<>();
|
|
|
+ for (StoreDictionary node : nodeList) {
|
|
|
+ nodeMap.put(node.getId(), node);
|
|
|
+ node.setStoreDictionaryList(new ArrayList<>());
|
|
|
+ }
|
|
|
+
|
|
|
+ // 找到根节点
|
|
|
+ StoreDictionary root = nodeMap.get(rootId);
|
|
|
+ if (root == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 建立父子关系
|
|
|
+ for (StoreDictionary node : nodeList) {
|
|
|
+ if (node.getId().equals(rootId)) {
|
|
|
+ continue; // 跳过根节点
|
|
|
+ }
|
|
|
+
|
|
|
+ Integer parentId = node.getParentId();
|
|
|
+ if (parentId != null && parentId != 0) {
|
|
|
+ StoreDictionary parent = nodeMap.get(parentId);
|
|
|
+ if (parent != null) {
|
|
|
+ parent.getStoreDictionaryList().add(node);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 对子节点列表按sortId排序
|
|
|
+ sortChildren(root);
|
|
|
+
|
|
|
+ return root;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 递归排序子节点
|
|
|
+ *
|
|
|
+ * @param node 节点
|
|
|
+ */
|
|
|
+ private void sortChildren(StoreDictionary node) {
|
|
|
+ if (node == null || node.getStoreDictionaryList() == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ node.getStoreDictionaryList().sort((a, b) -> {
|
|
|
+ Integer sortIdA = a.getSortId() != null ? a.getSortId() : 0;
|
|
|
+ Integer sortIdB = b.getSortId() != null ? b.getSortId() : 0;
|
|
|
+ return sortIdA.compareTo(sortIdB);
|
|
|
+ });
|
|
|
+
|
|
|
+ // 递归排序所有子节点
|
|
|
+ for (StoreDictionary child : node.getStoreDictionaryList()) {
|
|
|
+ sortChildren(child);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|