select c.*,
(select count(hcus.id) from hcus where c.id=hcus.id and study_status='finished') as learnStuNum,
(select count(hcus.id) from hcus where c.id=id ) as learnNum
from c
where c.id=#{id}
本文摘自 :https://www.cnblogs.com/
纯净搜索,智慧选择;海量资源,尽在掌握。
select c.*,
(select count(hcus.id) from hcus where c.id=hcus.id and study_status='finished') as learnStuNum,
(select count(hcus.id) from hcus where c.id=id ) as learnNum
from c
where c.id=#{id}
本文摘自 :https://www.cnblogs.com/