专家评审数据排序

This commit is contained in:
13036795865 2025-05-21 17:03:33 +08:00
parent b429ce6563
commit 6faba9a9c5
1 changed files with 3 additions and 7 deletions

View File

@ -429,16 +429,12 @@
(tmp.taskAuditCount + tmp.competitionAuditCount) as "total" (tmp.taskAuditCount + tmp.competitionAuditCount) as "total"
from (select e.expert_name, from (select e.expert_name,
(select COUNT(distinct container_id) from task_expert where expert_id = e.id and container_type = 1 and `status` in (1,2)) as taskAuditCount, (select COUNT(distinct container_id) from task_expert where expert_id = e.id and container_type = 1 and `status` in (1,2)) as taskAuditCount,
(select COUNT(distinct container_id) (select COUNT(distinct container_id) from task_expert where expert_id = e.id and container_type = 2 and `status` in (1,2)) as competitionAuditCount
from task_expert
where expert_id = e.id
and container_type = 2 and `status` in (1,2)) as competitionAuditCount
from experts e from experts e
inner join users u on e.user_id = u.id left join users u on e.user_id = u.id
left join expert_resource_library erl on e.id = erl.user_id
where e.is_delete = '0' where e.is_delete = '0'
and e.status = 1) tmp and e.status = 1) tmp
-- order by (tmp.taskAuditCount + tmp.competitionAuditCount) desc order by (tmp.taskAuditCount + tmp.competitionAuditCount) desc
limit 0,12 limit 0,12
</select> </select>