From 1210ff2e35f3048e085f7c7b1aa3dcd2dfaf3040 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期三, 12 六月 2024 17:35:34 +0800
Subject: [PATCH] fix:成绩管理

---
 src/main/resources/mapper/ExamTemplateMapper.xml |   54 ++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 42 insertions(+), 12 deletions(-)

diff --git a/src/main/resources/mapper/ExamTemplateMapper.xml b/src/main/resources/mapper/ExamTemplateMapper.xml
index 2243cd1..d39d1ea 100644
--- a/src/main/resources/mapper/ExamTemplateMapper.xml
+++ b/src/main/resources/mapper/ExamTemplateMapper.xml
@@ -1,10 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.monkeylessey.mapper.ExamTemplateMapper">
+<mapper namespace="com.ycl.jxkg.mapper.ExamTemplateMapper">
 
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
-    <resultMap id="BaseResultMap" type="com.ycl.jxkg.domain.vo.admin.exam.ExamTemplateVO">
-        <result column="exam_paper_id" property="examPaperId" />
+    <resultMap id="BaseResultMap" type="com.ycl.jxkg.domain.entity.ExamTemplate">
+        <result column="name" property="name" />
+        <result column="subject_id" property="subjectId" />
+        <result column="score" property="score" />
+        <result column="visibility" property="visibility" />
+        <result column="suggest_time" property="suggestTime" />
+        <result column="deduct_type" property="deductType" />
+        <result column="deduct_type_score" property="deductTypeScore" />
         <result column="single_choice" property="singleChoice" />
         <result column="multiple_choice" property="multipleChoice" />
         <result column="gap_filling" property="gapFilling" />
@@ -17,17 +23,21 @@
         <result column="true_false_score" property="trueFalseScore" />
         <result column="short_answer_score" property="shortAnswerScore" />
         <result column="calculation_score" property="calculationScore" />
+        <result column="create_user" property="createUser" />
+        <result column="create_time" property="createTime" />
     </resultMap>
-
-
-
-
 
 
 
     <select id="getById" resultMap="BaseResultMap">
         SELECT
-            TET.exam_paper_id,
+            TET.name,
+            TET.subject_id,
+            TET.score,
+            TET.visibility,
+            TET.suggest_time,
+            TET.deduct_type,
+            TET.deduct_type_score,
             TET.single_choice,
             TET.multiple_choice,
             TET.gap_filling,
@@ -39,7 +49,9 @@
             TET.gap_score,
             TET.true_false_score,
             TET.short_answer_score,
-            TET.calculation__score,
+            TET.calculation_score,
+            TET.create_user,
+            TET.create_time,
             TET.id
         FROM
             t_exam_template TET
@@ -50,7 +62,13 @@
 
     <select id="getPage" resultMap="BaseResultMap">
         SELECT
-            TET.exam_paper_id,
+            TET.name,
+            TET.subject_id,
+            TET.score,
+            TET.visibility,
+            TET.suggest_time,
+            TET.deduct_type,
+            TET.deduct_type_score,
             TET.single_choice,
             TET.multiple_choice,
             TET.gap_filling,
@@ -62,12 +80,24 @@
             TET.gap_score,
             TET.true_false_score,
             TET.short_answer_score,
-            TET.calculation__score,
+            TET.calculation_score,
+            TET.create_user,
+            TET.create_time,
             TET.id
         FROM
             t_exam_template TET
-        WHERE
+        <where>
             TET.deleted = 0
+        <if test="query.name!=null and query.name !=''">
+            and name like concat ('%',#{query.name},'%')
+        </if>
+        <if test="query.subjectId!=null ">
+            and subject_id = #{query.subjectId}
+        </if>
+        </where>
     </select>
 
+    <delete id="removeById">
+        delete from t_exam_template where exam_paper_id = #{id}
+    </delete>
 </mapper>

--
Gitblit v1.8.0