修复了查询subtask时hasChildren字段都为true的Bug
parent
c4ce74c365
commit
17f516545b
|
@ -6,10 +6,10 @@
|
||||||
task_name,
|
task_name,
|
||||||
task_project_id,
|
task_project_id,
|
||||||
task_holder_id,
|
task_holder_id,
|
||||||
s.staff_fullname AS task_holder_name,
|
s.staff_fullname AS task_holder_name,
|
||||||
task_status,
|
task_status,
|
||||||
task_type,
|
task_type,
|
||||||
task_father_id,
|
t.task_father_id,
|
||||||
task_created_time,
|
task_created_time,
|
||||||
task_start_time,
|
task_start_time,
|
||||||
task_end_time,
|
task_end_time,
|
||||||
|
@ -17,11 +17,12 @@
|
||||||
task_priority,
|
task_priority,
|
||||||
task_description,
|
task_description,
|
||||||
attached_info,
|
attached_info,
|
||||||
EXISTS(SELECT task_id FROM task WHERE task_father_id = task.task_id) AS has_children
|
judge.task_father_id IS NOT NULL AS has_children
|
||||||
FROM task
|
FROM task AS t
|
||||||
JOIN (SELECT staff_id, staff_fullname FROM staff) AS s ON task.task_holder_id = s.staff_id
|
JOIN (SELECT staff_id, staff_fullname FROM staff) AS s ON t.task_holder_id = s.staff_id
|
||||||
|
LEFT JOIN (SELECT DISTINCT task_father_id FROM task) AS judge ON t.task_id = judge.task_father_id
|
||||||
WHERE is_deleted = 0
|
WHERE is_deleted = 0
|
||||||
AND task_project_id = #{projectId}
|
AND task_project_id = #{projectId}
|
||||||
AND task_father_id = #{fatherId}
|
AND t.task_father_id = #{fatherId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue