专家评审数据排序
This commit is contained in:
parent
b429ce6563
commit
6faba9a9c5
|
@ -429,16 +429,12 @@
|
|||
(tmp.taskAuditCount + tmp.competitionAuditCount) as "total"
|
||||
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 = 2 and `status` in (1,2)) as competitionAuditCount
|
||||
(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 experts e
|
||||
inner join users u on e.user_id = u.id
|
||||
left join expert_resource_library erl on e.id = erl.user_id
|
||||
left join users u on e.user_id = u.id
|
||||
where e.is_delete = '0'
|
||||
and e.status = 1) tmp
|
||||
-- order by (tmp.taskAuditCount + tmp.competitionAuditCount) desc
|
||||
order by (tmp.taskAuditCount + tmp.competitionAuditCount) desc
|
||||
limit 0,12
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue