| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 查询节点的历史列表(节点的上级节点”程序包名“因为存在多个版本,所以历史记录也需要根据不同版本程序包名进行查询) |
| | | * @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); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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(); |
| | | } |
| | | } |