From 528b1892d8e929b199dddc96f3a43f9b8039c8c8 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期四, 06 六月 2024 18:00:42 +0800 Subject: [PATCH] 模板接口打通 --- src/main/resources/mapper/ExamTemplateMapper.xml | 42 +++++++++++++++++++++++++++++++++++------- 1 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/main/resources/mapper/ExamTemplateMapper.xml b/src/main/resources/mapper/ExamTemplateMapper.xml index 2243cd1..a2ca3f5 100644 --- a/src/main/resources/mapper/ExamTemplateMapper.xml +++ b/src/main/resources/mapper/ExamTemplateMapper.xml @@ -1,10 +1,15 @@ <?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.vo.ExamTemplateVO"> + <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="single_choice" property="singleChoice" /> <result column="multiple_choice" property="multipleChoice" /> <result column="gap_filling" property="gapFilling" /> @@ -16,7 +21,9 @@ <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> @@ -27,7 +34,12 @@ <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.single_choice, TET.multiple_choice, TET.gap_filling, @@ -40,6 +52,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 +64,12 @@ <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.single_choice, TET.multiple_choice, TET.gap_filling, @@ -63,11 +82,20 @@ 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> </mapper> -- Gitblit v1.8.0