|
@@ -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})
|
|
(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",
|
|
AS "has_children",
|
|
(SELECT count(1) FROM m_archive_tree_contract a
|
|
(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
|
|
WHERE a.is_deleted = 0
|
|
and a.project_id = #{projectId}
|
|
and a.project_id = #{projectId}
|
|
and (FIND_IN_SET(d.id,a.ancestors) or a.id = d.id)
|
|
and (FIND_IN_SET(d.id,a.ancestors) or a.id = d.id)
|