|
|
@@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="knownledgeId" column="knownledge_id" />
|
|
|
<result property="subjectId" column="subject_id" />
|
|
|
<result property="paperId" column="paper_id" />
|
|
|
- <result property="answers" column="answers" />
|
|
|
+ <result property="answer" column="answer" />
|
|
|
<result property="answer1" column="answer1" />
|
|
|
<result property="answer2" column="answer2" />
|
|
|
<result property="scoreTotal" column="score_total" />
|
|
|
@@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectLearnWrongBookVo">
|
|
|
- select wrong_id, student_id, question_id, source, state, knownledge_id, subject_id, paper_id, answers, answer1, answer2, score_total, score, score_level, score_rate, wrong_count, right_count, total_count, created_time, updated_time, collect from learn_wrong_book
|
|
|
+ select wrong_id, student_id, question_id, source, state, knownledge_id, subject_id, paper_id, answer, answer1, answer2, score_total, score, score_level, score_rate, wrong_count, right_count, total_count, created_time, updated_time, collect from learn_wrong_book
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectLearnWrongBookList" parameterType="LearnWrongBook" resultMap="LearnWrongBookResult">
|
|
|
@@ -43,7 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="knownledgeId != null "> and knownledge_id = #{knownledgeId}</if>
|
|
|
<if test="subjectId != null "> and subject_id = #{subjectId}</if>
|
|
|
<if test="paperId != null "> and paper_id = #{paperId}</if>
|
|
|
- <if test="answers != null and answers != ''"> and answers = #{answers}</if>
|
|
|
+ <if test="answer != null and answer != ''"> and answer = #{answer}</if>
|
|
|
<if test="answer1 != null and answer1 != ''"> and answer1 = #{answer1}</if>
|
|
|
<if test="answer2 != null and answer2 != ''"> and answer2 = #{answer2}</if>
|
|
|
<if test="scoreTotal != null "> and score_total = #{scoreTotal}</if>
|
|
|
@@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="knownledgeId != null">knownledge_id,</if>
|
|
|
<if test="subjectId != null">subject_id,</if>
|
|
|
<if test="paperId != null">paper_id,</if>
|
|
|
- <if test="answers != null">answers,</if>
|
|
|
+ <if test="answer != null">answer,</if>
|
|
|
<if test="answer1 != null">answer1,</if>
|
|
|
<if test="answer2 != null">answer2,</if>
|
|
|
<if test="scoreTotal != null">score_total,</if>
|
|
|
@@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="knownledgeId != null">#{knownledgeId},</if>
|
|
|
<if test="subjectId != null">#{subjectId},</if>
|
|
|
<if test="paperId != null">#{paperId},</if>
|
|
|
- <if test="answers != null">#{answers},</if>
|
|
|
+ <if test="answer != null">#{answer},</if>
|
|
|
<if test="answer1 != null">#{answer1},</if>
|
|
|
<if test="answer2 != null">#{answer2},</if>
|
|
|
<if test="scoreTotal != null">#{scoreTotal},</if>
|
|
|
@@ -122,7 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="knownledgeId != null">knownledge_id = #{knownledgeId},</if>
|
|
|
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
|
|
<if test="paperId != null">paper_id = #{paperId},</if>
|
|
|
- <if test="answers != null">answers = #{answers},</if>
|
|
|
+ <if test="answer != null">answer = #{answer},</if>
|
|
|
<if test="answer1 != null">answer1 = #{answer1},</if>
|
|
|
<if test="answer2 != null">answer2 = #{answer2},</if>
|
|
|
<if test="scoreTotal != null">score_total = #{scoreTotal},</if>
|
|
|
@@ -163,14 +163,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="findWrongQuestions" parameterType="map" resultMap="LearnWrongBookResult">
|
|
|
- SELECT wb.`wrong_id`, wb.`question_id`, q.`title`, q.parse, wb.`knownledge_id`, k.`name` knownledge_name, wb.`wrong_count`, q.qtpye
|
|
|
- ,q.option_a,q.option_b,q.option_c,q.option_d,q.option_e,q.option_f,q.option_g,q.answer1,q.answer2,q.title0,wb.answers, qc.question_id>0 collect
|
|
|
+ SELECT wb.`wrong_id`, wb.`question_id`, wb.`knownledge_id`, k.`name` knowledge, wb.`wrong_count`, wb.`answer`, qc.question_id>0 collect
|
|
|
FROM `learn_wrong_book` wb
|
|
|
JOIN `learn_questions` q ON wb.`question_id` = q.`id`
|
|
|
LEFT JOIN `learn_knowledge_tree` k ON wb.`knownledge_id` = k.`id`
|
|
|
- LEFT JOIN mxjb_question_collection qc on qc.question_id = q.id and qc.user_id = 11
|
|
|
+ LEFT JOIN mxjb_question_collection qc on qc.question_id = q.id and qc.user_id = wb.`student_id`
|
|
|
<where>
|
|
|
- wb.`student_id` = #{creatorId} AND q.`qtpye` IN ('判断题', '单选题', '选择题','单项选择','单项选择题','多选题')
|
|
|
+ wb.`student_id` = #{studentId} AND q.`qtpye` IN ('判断题', '单选题', '选择题','单项选择','单项选择题','多选题')
|
|
|
<if test="subjectId != null "> and wb.`subject_id` = #{subjectId}</if>
|
|
|
</where>
|
|
|
|