From 0879a157fd7c85ec34f1dac51a2b113bf1f5f2f6 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 07 六月 2024 15:53:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/resources/mapper/ExamTemplateMapper.xml |   52 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/src/main/resources/mapper/ExamTemplateMapper.xml b/src/main/resources/mapper/ExamTemplateMapper.xml
index 2243cd1..2175930 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" />
@@ -16,18 +22,22 @@
         <result column="gap_score" property="gapScore" />
         <result column="true_false_score" property="trueFalseScore" />
         <result column="short_answer_score" property="shortAnswerScore" />
-        <result column="calculation_score" property="calculationScore" />
+        <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,
@@ -40,6 +50,8 @@
             TET.true_false_score,
             TET.short_answer_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,
@@ -63,11 +81,23 @@
             TET.true_false_score,
             TET.short_answer_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 id = #{id}
+    </delete>
 </mapper>

--
Gitblit v1.8.0