Преглед изворни кода

档案系统-文件收集-树节点统计文件树 sql调整

LHB пре 1 месец
родитељ
комит
17219d8b8a

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.xml

@@ -233,7 +233,7 @@
         (SELECT CASE WHEN count(1) > 0 THEN 1 ELSE 0 END FROM m_archive_tree_contract WHERE parent_id = d.id and is_deleted = 0 and project_id = #{projectId})
         AS "has_children",
         (SELECT  count(1)  FROM m_archive_tree_contract a
-                        inner join u_archive_file b on b.node_id = a.id and b.is_deleted = a.is_deleted and b.project_id = a.project_id and (b.is_auto_file is null or b.is_auto_file != 1)
+                        left join u_archive_file b on b.node_id = a.id and b.is_deleted = a.is_deleted and b.project_id = a.project_id and (b.is_auto_file is null or b.is_auto_file != 1)
                            WHERE  a.is_deleted = 0
                              and a.project_id = #{projectId}
                              and (FIND_IN_SET(d.id,a.ancestors) or a.id = d.id)