| | |
| | | * @param name 节点名称 |
| | | * @return |
| | | */ |
| | | List<NcNodeVO> historyByParentIdAndName(@Param("parentId")Long parentId,@Param("name") String name); |
| | | List<NcNodeVO> historyByParentIdAndName(@Param("name") String name,@Param("parentNode")NcNode parentNode); |
| | | } |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="historyByParentIdAndName" resultType="org.springblade.mdm.program.vo.NcNodeVO"> |
| | | select n.id,n.name,n.create_time,n.update_time,u.name create_user_name,n.process_no |
| | | from mdm_nc_node n left join blade_user u on n.create_user=u.id and u.is_deleted=0 |
| | | |
| | | where n.is_deleted=0 and n.parent_id=#{parentId} and n.name=#{name} |
| | | where n.is_deleted=0 and n.parent_id in (select id from mdm_nc_node where parent_id=#{parentNode.parentId}) and n.name=#{name} |
| | | |
| | | </select> |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 查询节点的历史列表(节点的上级节点”程序包名“因为存在多个版本,所以历史记录也需要根据不同版本程序包名进行查询) |
| | | * @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); |
| | | } |
| | | |
| | | /** |