|
@@ -78,6 +78,7 @@
|
78
|
78
|
<result property="schoolid" column="schoolid"></result>
|
79
|
79
|
<result property="subjectid" column="subjectid"></result>
|
80
|
80
|
<result property="areaall" column="areaall"></result>
|
|
81
|
+ <result property="qlevel" column="qlevel"></result>
|
81
|
82
|
<collection property="points" ofType="com.xhkjedu.sstudy.vo.subjectbook.PointVo" javaType="java.util.List"
|
82
|
83
|
select="listPoint" column="{questionid=questionid}">
|
83
|
84
|
</collection>
|
|
@@ -115,7 +116,7 @@
|
115
|
116
|
<select id="findById" resultMap="questionResult">
|
116
|
117
|
select q.questionid,q.score,q.complexity,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.belong
|
117
|
118
|
,q.qtypeid,q.qtypename,q.createtime,q.source,q.year,q.region,q.schoolname,q.subjectid,q.schoolid
|
118
|
|
- ,qd.directorid,d.directorall directorname,d.lsbid,q.hearfile
|
|
119
|
+ ,qd.directorid,d.directorall directorname,d.lsbid,q.hearfile,q.qlevel,
|
119
|
120
|
sb.level,sb.subjectid,s.subjectname,v.versionname,sb.lsbname
|
120
|
121
|
,(select a.areaall from t_areazone a where a.areacode=q.region)areaall
|
121
|
122
|
from t_question q left join t_question_director qd on q.questionid=qd.questionid
|
|
@@ -125,10 +126,15 @@
|
125
|
126
|
left join t_version v on sb.versionid = v.versionid
|
126
|
127
|
where q.questionid=#{questionid}
|
127
|
128
|
</select>
|
|
129
|
+ <select id="listSonQuestionsForDetail" resultType="java.util.Map">
|
|
130
|
+ select q.questionid,q.score,q.complexity,q.qstem,q.qoption,q.qanswer,q.qanalyze
|
|
131
|
+ ,q.qtypeid,q.qtypename,q.ctype,q.qlevel,q.sorder
|
|
132
|
+ from t_question q where q.qlevel=3 and q.questionpid=#{questionid} order by q.sorder
|
|
133
|
+ </select>
|
128
|
134
|
<!--管理端试题列表-->
|
129
|
135
|
<select id="findAll" resultType="com.xhkjedu.sstudy.vo.question.QuestionVo">
|
130
|
136
|
select q.questionid,q.score,q.complexity,q.ctype,q.qstem,q.qoption,q.qanswer,q.qanalyze,q.belong,q.createid
|
131
|
|
- ,q.qtypeid,q.qtypename,q.createtime,q.count,q.qstate,q.source,q.year,q.region,q.schoolname,q.hearfile
|
|
137
|
+ ,q.qtypeid,q.qtypename,q.createtime,q.count,q.qstate,q.source,q.year,q.region,q.schoolname,q.hearfile,q.qlevel
|
132
|
138
|
from t_question q left join t_question_director qd on q.questionid=qd.questionid
|
133
|
139
|
<if test="question.belong!=null and question.belong==5">
|
134
|
140
|
left join t_question_collect qc on q.questionid = qc.questionid
|
|
@@ -186,10 +192,37 @@
|
186
|
192
|
</where>
|
187
|
193
|
group by q.questionid order by q.qstate,q.createtime desc
|
188
|
194
|
</select>
|
|
195
|
+
|
|
196
|
+ <!--章节、知识点选题-->
|
|
197
|
+ <resultMap id="directPointQuestions" type="java.util.Map">
|
|
198
|
+ <result property="questionid" column="questionid"></result>
|
|
199
|
+ <result property="score" column="score"></result>
|
|
200
|
+ <result property="complexity" column="complexity"></result>
|
|
201
|
+ <result property="qstem" column="qstem"></result>
|
|
202
|
+ <result property="qoption" column="qoption"></result>
|
|
203
|
+ <result property="qanswer" column="qanswer"></result>
|
|
204
|
+ <result property="qanalyze" column="qanalyze"></result>
|
|
205
|
+ <result property="qtypeid" column="qtypeid"></result>
|
|
206
|
+ <result property="qtypename" column="qtypename"></result>
|
|
207
|
+ <result property="count" column="count"></result>
|
|
208
|
+ <result property="points" column="points"></result>
|
|
209
|
+ <result property="ctype" column="ctype"></result>
|
|
210
|
+ <result property="source" column="source"></result>
|
|
211
|
+ <result property="year" column="year"></result>
|
|
212
|
+ <result property="region" column="region"></result>
|
|
213
|
+ <result property="schoolname" column="schoolname"></result>
|
|
214
|
+ <result property="qlevel" column="qlevel"></result>
|
|
215
|
+ <result property="snum" column="snum"></result>
|
|
216
|
+ <result property="hearfile" column="hearfile"></result>
|
|
217
|
+ <collection property="sonqlist" ofType="java.util.Map"
|
|
218
|
+ column="questionid" select="listSonQuestionForSelect">
|
|
219
|
+ </collection>
|
|
220
|
+ </resultMap>
|
|
221
|
+
|
189
|
222
|
<!--章节、知识点选题-->
|
190
|
|
- <select id="listForSelect" resultType="com.xhkjedu.sstudy.vo.question.SelectQuestionVo">
|
|
223
|
+ <select id="listForSelect" resultMap="directPointQuestions">
|
191
|
224
|
select q.questionid,q.score,q.complexity,q.qstem,q.qoption,q.qanswer,q.qanalyze
|
192
|
|
- ,q.qtypeid,q.qtypename,q.count,GROUP_CONCAT(p.pointname)points,q.ctype,q.belong,q.createid
|
|
225
|
+ ,q.qtypeid,q.qtypename,q.count,GROUP_CONCAT(p.pointname)points,q.ctype
|
193
|
226
|
,q.source,q.year,q.region,q.schoolname,q.qlevel,q.hearfile
|
194
|
227
|
from t_question q left join t_question_point qp on q.questionid = qp.questionid
|
195
|
228
|
left join t_point p on p.pointid=qp.pointid
|
|
@@ -246,6 +279,12 @@
|
246
|
279
|
and q.qlevel < 3
|
247
|
280
|
group by q.questionid order by q.createtime desc
|
248
|
281
|
</select>
|
|
282
|
+
|
|
283
|
+ <select id="listSonQuestionForSelect" resultType="java.util.Map">
|
|
284
|
+ select q.questionid,q.score,q.complexity,q.qstem,q.qoption,q.qanswer,q.qanalyze
|
|
285
|
+ ,q.qtypeid,q.qtypename,q.ctype,q.qlevel,q.sorder
|
|
286
|
+ from t_question q where q.qlevel=3 and q.questionpid=#{questionid} order by q.sorder
|
|
287
|
+ </select>
|
249
|
288
|
<!--修改试题状态-->
|
250
|
289
|
<update id="updateQuestionState">
|
251
|
290
|
update t_question set qstate=#{qstate} where questionid in (${questionIds})
|