fix: scope version group total count to current cross-review task only
This commit is contained in:
@@ -469,10 +469,14 @@ class CrossReviewServiceImpl(ICrossReviewService):
|
|||||||
LIMIT 1
|
LIMIT 1
|
||||||
) df ON TRUE
|
) df ON TRUE
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT version_group_key, COUNT(*) AS total_versions
|
SELECT d2.version_group_key, COUNT(*) AS total_versions
|
||||||
FROM leaudit_documents
|
FROM leaudit_documents d2
|
||||||
WHERE deleted_at IS NULL
|
JOIN leaudit_cross_review_task_documents td2
|
||||||
GROUP BY version_group_key
|
ON td2.document_id = d2.id
|
||||||
|
AND td2.delete_time IS NULL
|
||||||
|
AND td2.task_id = :task_id
|
||||||
|
WHERE d2.deleted_at IS NULL
|
||||||
|
GROUP BY d2.version_group_key
|
||||||
) vc ON vc.version_group_key = d.version_group_key
|
) vc ON vc.version_group_key = d.version_group_key
|
||||||
WHERE {whereSql}
|
WHERE {whereSql}
|
||||||
ORDER BY d.created_at DESC, d.id DESC
|
ORDER BY d.created_at DESC, d.id DESC
|
||||||
|
|||||||
Reference in New Issue
Block a user