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