select a.id, a.name, a.category_id, a.status, a.del_flag,a.company_id,a.privatize,a.version,
a.create_by, a.create_time, a.update_by, a.update_time, a.remark,b.name as category_name,
(select count(1) from ex_question where bank_id=a.id and question_type=1) as single_count,
(select count(1) from ex_question where bank_id=a.id and question_type=2) as multi_count,
(select count(1) from ex_question where bank_id=a.id and question_type=3) as judge_count
from ex_question_bank a
left join sys_category b on b.id=a.category_id
update ex_question_bank set del_flag=1 where id=#{bankId}