`id`,`qu_type`,`level`,`image`,`content`,`create_time`,`update_time`,`remark`,`analysis`
SELECT a.*
FROM el_qu a
LEFT JOIN el_qu_repo b ON a.id=b.qu_id
WHERE b.repo_id=#{repoId} AND a.qu_type=#{quType}
AND a.id NOT IN
'${item}'
AND a.`level`=#{level}
ORDER BY RAND()
LIMIT ${size}
SELECT repo_id FROM el_qu_repo po WHERE po.qu_id=#{qId}
AND q.qu_type = #{query.quType}
AND po.repo_id IN
#{repoId}
AND q.content LIKE '%${query.content}%'
AND q.id NOT IN
#{quId}
SELECT q.*
FROM el_qu q
LEFT JOIN el_qu_repo po ON q.id=po.qu_id
GROUP BY q.id ORDER BY q.update_time DESC
SELECT
q.id as q_id,
q.qu_type,
q.content AS q_content,
q.analysis as q_analysis,
a.content as a_content,
a.is_right as a_is_right,
a.analysis as a_analysis
FROM el_qu q
LEFT JOIN el_qu_answer a ON q.id=a.qu_id
LEFT JOIN el_qu_repo po ON q.id=po.qu_id
GROUP BY a.id ORDER BY q.id
LIMIT 10000