From cd59ededbf05a0ae73b8f4944fbf40a1fb01d28a Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期一, 11 十一月 2024 18:03:43 +0800
Subject: [PATCH] 错题详情

---
 src/main/resources/mapper/ExamPaperMapper.xml |   49 ++++++++++++++++++++++---------------------------
 1 files changed, 22 insertions(+), 27 deletions(-)

diff --git a/src/main/resources/mapper/ExamPaperMapper.xml b/src/main/resources/mapper/ExamPaperMapper.xml
index a8e01d7..b7c419a 100644
--- a/src/main/resources/mapper/ExamPaperMapper.xml
+++ b/src/main/resources/mapper/ExamPaperMapper.xml
@@ -2,23 +2,24 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ycl.jxkg.mapper.ExamPaperMapper">
     <resultMap id="BaseResultMap" type="com.ycl.jxkg.domain.entity.ExamPaper">
-        <id column="id" jdbcType="INTEGER" property="id"/>
-        <result column="name" jdbcType="VARCHAR" property="name"/>
-        <result column="subject_id" jdbcType="INTEGER" property="subjectId"/>
-        <result column="paper_type" jdbcType="INTEGER" property="paperType"/>
-        <result column="score" jdbcType="INTEGER" property="score"/>
-        <result column="question_count" jdbcType="INTEGER" property="questionCount"/>
-        <result column="suggest_time" jdbcType="INTEGER" property="suggestTime"/>
-        <result column="visibility" jdbcType="INTEGER" property="visibility"/>
-        <result column="deduct_type" jdbcType="INTEGER" property="deductType"/>
-        <result column="create_user" jdbcType="INTEGER" property="createUser"/>
-        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
-        <result column="deleted" jdbcType="BIT" property="deleted"/>
+        <id column="id"  property="id"/>
+        <result column="name"  property="name"/>
+        <result column="paper_type"  property="paperType"/>
+        <result column="score"  property="score"/>
+        <result column="question_count"  property="questionCount"/>
+        <result column="suggest_time"  property="suggestTime"/>
+        <result column="visibility"  property="visibility"/>
+        <result column="deduct_type" property="deductType"/>
+        <result column="deduct_type_score"  property="deductTypeScore"/>
+        <result column="content"  property="content"/>
+        <result column="create_user"  property="createUser"/>
+        <result column="create_time"  property="createTime"/>
+        <result column="deleted"  property="deleted"/>
     </resultMap>
 
     <sql id="Base_Column_List">
-        id, name, subject_id, paper_type, score, question_count, suggest_time,visibility
-        ,deduct_type,create_user, create_time,deleted
+        id, name, paper_type, score, question_count, suggest_time,visibility
+        ,deduct_type,deduct_type_score,create_user, create_time,deleted
     </sql>
 
     <resultMap id="PaperInfoResultMap" type="com.ycl.jxkg.domain.vo.student.dashboard.PaperInfo">
@@ -28,23 +29,20 @@
     </resultMap>
 
 
-    <select id="page" resultMap="BaseResultMap" parameterType="com.ycl.jxkg.domain.vo.admin.exam.ExamPaperPageRequestVO">
+    <select id="page" resultMap="BaseResultMap">
         SELECT
-        <include refid="Base_Column_List"/>
-        FROM t_exam_paper
+        tep.*
+        FROM t_exam_paper tep
         <where>
-            and deleted=0
+            and tep.deleted=0 and (create_user = #{createUser} or visibility = 'Public')
             <if test="id != null ">
-                and id= #{id}
+                and tep.id= #{id}
             </if>
             <if test="name != null and name != ''">
-                and name like concat('%',#{name},'%')
-            </if>
-            <if test="subjectId != null ">
-                and subject_id= #{subjectId}
+                and tep.name like concat('%',#{name},'%')
             </if>
             <if test="paperType != null ">
-                and paper_type= #{paperType}
+                and tep.paper_type= #{paperType}
             </if>
         </where>
     </select>
@@ -66,9 +64,6 @@
         FROM t_exam_paper
         <where>
             and deleted=0
-            <if test="subjectId != null ">
-                and subject_id=#{subjectId}
-            </if>
             <if test="levelId != null ">
                 and grade_level=#{levelId}
             </if>

--
Gitblit v1.8.0