yangys
2025-08-06 053a438acf9ec33e182b25211ce8108f0367feac
blade-service/blade-mdm/src/main/java/org/springblade/mdm/program/service/NcNodeService.java
@@ -170,10 +170,16 @@
   }
   /**
    * 查询节点的历史列表(节点的上级节点”程序包名“因为存在多个版本,所以历史记录也需要根据不同版本程序包名进行查询)
    * @param id
    * @return
    */
   @Transactional(readOnly = true)
    public List<NcNodeVO> historyByNodeId(Long id) {
      NcNode node = this.getById(id);
      return this.baseMapper.historyByParentIdAndName(node.getParentId(),node.getName());
      NcNode parentNode = this.getById(node.getParentId());
      return this.baseMapper.historyByParentIdAndName(node.getName(),parentNode);
    }
   /**
@@ -207,4 +213,14 @@
         return nodes.get(0);
      }
   }
   /**
    * 获取node的历史列表(同一个父节点下,同名的所有节点)
    * @param pkgNode node
    * @return 历史列表,报错节点本身
    */
    public List<NcNode> getNodeHistorys(NcNode pkgNode) {
      return this.lambdaQuery().eq(NcNode::getParentId,pkgNode.getParentId())
         .eq(NcNode::getName,pkgNode.getName()).list();
    }
}