|
@@ -248,15 +248,21 @@
|
248
|
248
|
<!--举一反三试题列表(随机返回3条)-->
|
249
|
249
|
<select id="listJYFSQuestion" resultType="java.util.Map">
|
250
|
250
|
select q.questionid,q.qtypeid,q.qtypename,q.complexity,q.count,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.ctype
|
251
|
|
- ,(select count(*) from t_question_collect qc where qc.questionid=q.questionid)collected
|
252
|
|
- ,group_concat(p.pointname)pointname
|
253
|
251
|
from t_question_point qp left join t_question q on qp.questionid=q.questionid
|
254
|
|
- left join t_question_point tqp on q.questionid=tqp.questionid
|
255
|
|
- left join t_point p on tqp.pointid=p.pointid
|
256
|
252
|
where qp.pointid in(${pointIds}) and qp.questionid!=#{questionid} and q.qstate=1
|
257
|
253
|
and (q.belong in(1,2) or (q.schoolid=#{schoolid} and q.belong=3) or (q.createid=#{userid} and q.belong=4))
|
258
|
254
|
group by qp.questionid order by rand() limit 3
|
259
|
255
|
</select>
|
|
256
|
+ <!--获取试题是否被某人收藏-->
|
|
257
|
+ <select id="getCollected" resultType="java.lang.Integer">
|
|
258
|
+ select count(*) from t_question_collect qc where qc.questionid=#{questionid} and qc.userid=#{userid}
|
|
259
|
+ </select>
|
|
260
|
+ <!--获取试题关联知识点-->
|
|
261
|
+ <select id="getPointName" resultType="java.lang.String">
|
|
262
|
+ select group_concat(p.pointname)
|
|
263
|
+ from t_question_point qp left join t_point p on qp.pointid=p.pointid
|
|
264
|
+ where qp.questionid=#{questionid}
|
|
265
|
+ </select>
|
260
|
266
|
|
261
|
267
|
<!-- 根据作业id获取作业附件 -->
|
262
|
268
|
<select id="listObjsByPaperid" resultType="java.util.Map">
|