111
This commit is contained in:
1 parent
81eca8933a
commit
345f906c35
540 files changed
+494222
-90
No files matched your search
@@ -0,0 +1,100 @@
|
||||
<?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.luqj.exam.mapper.ExamPaperItemMapper">
|
||||
|
||||
<resultMap type="ExamPaperItem" id="ExamPaperItemResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="paperId" column="paper_id" />
|
||||
<result property="examPaperModuleId" column="exam_paper_module_id" />
|
||||
<result property="questionTypeId" column="question_type_id" />
|
||||
<result property="questionId" column="question_id" />
|
||||
<result property="score" column="score" />
|
||||
<result property="difficulty" column="difficulty" />
|
||||
<result property="sortNum" column="sort_num" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamPaperItemVo">
|
||||
select id, paper_id, exam_paper_module_id, question_type_id, question_id, score, difficulty, sort_num, create_time, creator_id, status from exam_paper_item
|
||||
</sql>
|
||||
|
||||
<select id="selectExamPaperItemList" parameterType="ExamPaperItem" resultMap="ExamPaperItemResult">
|
||||
<include refid="selectExamPaperItemVo"/>
|
||||
<where>
|
||||
<if test="paperId != null "> and paper_id = #{paperId}</if>
|
||||
<if test="examPaperModuleId != null "> and exam_paper_module_id = #{examPaperModuleId}</if>
|
||||
<if test="questionTypeId != null "> and question_type_id = #{questionTypeId}</if>
|
||||
<if test="questionId != null "> and question_id = #{questionId}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="difficulty != null "> and difficulty = #{difficulty}</if>
|
||||
<if test="sortNum != null "> and sort_num = #{sortNum}</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamPaperItemById" parameterType="Long" resultMap="ExamPaperItemResult">
|
||||
<include refid="selectExamPaperItemVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamPaperItem" parameterType="ExamPaperItem" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_paper_item
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id,</if>
|
||||
<if test="examPaperModuleId != null">exam_paper_module_id,</if>
|
||||
<if test="questionTypeId != null">question_type_id,</if>
|
||||
<if test="questionId != null">question_id,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="difficulty != null">difficulty,</if>
|
||||
<if test="sortNum != null">sort_num,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">#{paperId},</if>
|
||||
<if test="examPaperModuleId != null">#{examPaperModuleId},</if>
|
||||
<if test="questionTypeId != null">#{questionTypeId},</if>
|
||||
<if test="questionId != null">#{questionId},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="difficulty != null">#{difficulty},</if>
|
||||
<if test="sortNum != null">#{sortNum},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamPaperItem" parameterType="ExamPaperItem">
|
||||
update exam_paper_item
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id = #{paperId},</if>
|
||||
<if test="examPaperModuleId != null">exam_paper_module_id = #{examPaperModuleId},</if>
|
||||
<if test="questionTypeId != null">question_type_id = #{questionTypeId},</if>
|
||||
<if test="questionId != null">question_id = #{questionId},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="difficulty != null">difficulty = #{difficulty},</if>
|
||||
<if test="sortNum != null">sort_num = #{sortNum},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamPaperItemById" parameterType="Long">
|
||||
delete from exam_paper_item where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperItemByIds" parameterType="String">
|
||||
delete from exam_paper_item where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,200 @@
|
||||
<?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.luqj.exam.mapper.ExamPaperMapper">
|
||||
<resultMap type="ExamPaper" id="ExamPaperResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="no" column="no" />
|
||||
<result property="imgUrl" column="img_url" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="schoolId" column="school_id" />
|
||||
<result property="courseId" column="course_id" />
|
||||
<result property="teacherId" column="teacher_id" />
|
||||
<result property="auditorId" column="auditor_id" />
|
||||
<result property="year" column="year" />
|
||||
<result property="semester" column="semester" />
|
||||
<result property="unionType" column="union_type" />
|
||||
<result property="type" column="type" />
|
||||
<result property="difficulty" column="difficulty" />
|
||||
<result property="score" column="score" />
|
||||
<result property="passScore" column="pass_score" />
|
||||
<result property="examTime" column="exam_time" />
|
||||
<result property="timeLength" column="time_length" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
<result property="status" column="status" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ExamPaperExamPaperModuleResult" type="ExamPaper" extends="ExamPaperResult">
|
||||
<collection property="examPaperModuleList" notNullColumn="id" javaType="java.util.List" resultMap="ExamPaperModuleResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ExamPaperModule" id="ExamPaperModuleResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="paperId" column="paper_id" />
|
||||
<result property="moduleName" column="module_name" />
|
||||
<result property="questionTypeId" column="question_type_id" />
|
||||
<result property="timeLength" column="time_length" />
|
||||
<result property="imgUrl" column="img_url" />
|
||||
<result property="score" column="score" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="sortNum" column="sort_num" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamPaperVo">
|
||||
select id, name, no, img_url, province_id, city_id, school_id, course_id, teacher_id, auditor_id, year, semester, union_type, type, difficulty, score, pass_score, exam_time, time_length, create_time, update_time, is_delete, status, category_id from exam_paper
|
||||
</sql>
|
||||
|
||||
<select id="selectExamPaperList" parameterType="ExamPaper" resultMap="ExamPaperResult">
|
||||
<include refid="selectExamPaperVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="no != null and no != ''"> and no = #{no}</if>
|
||||
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
|
||||
<if test="provinceId != null "> and province_id = #{provinceId}</if>
|
||||
<if test="cityId != null "> and city_id = #{cityId}</if>
|
||||
<if test="schoolId != null "> and school_id = #{schoolId}</if>
|
||||
<if test="courseId != null "> and course_id = #{courseId}</if>
|
||||
<if test="teacherId != null "> and teacher_id = #{teacherId}</if>
|
||||
<if test="auditorId != null "> and auditor_id = #{auditorId}</if>
|
||||
<if test="year != null "> and year = #{year}</if>
|
||||
<if test="semester != null "> and semester = #{semester}</if>
|
||||
<if test="unionType != null "> and union_type = #{unionType}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="difficulty != null "> and difficulty = #{difficulty}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="passScore != null "> and pass_score = #{passScore}</if>
|
||||
<if test="examTime != null "> and exam_time = #{examTime}</if>
|
||||
<if test="timeLength != null "> and time_length = #{timeLength}</if>
|
||||
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamPaperById" parameterType="Long" resultMap="ExamPaperExamPaperModuleResult">
|
||||
select a.id, a.name, a.no, a.img_url, a.province_id, a.city_id, a.school_id, a.course_id, a.teacher_id, a.auditor_id, a.year, a.semester, a.union_type, a.type, a.difficulty, a.score, a.pass_score, a.exam_time, a.time_length, a.create_time, a.update_time, a.is_delete, a.status, a.category_id,
|
||||
b.id, b.paper_id, b.module_name, b.question_type_id, b.time_length, b.img_url, b.score, b.create_time, b.sort_num
|
||||
from exam_paper a
|
||||
left join exam_paper_module b on b.paper_id = a.id
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamPaper" parameterType="ExamPaper" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_paper
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="no != null">no,</if>
|
||||
<if test="imgUrl != null">img_url,</if>
|
||||
<if test="provinceId != null">province_id,</if>
|
||||
<if test="cityId != null">city_id,</if>
|
||||
<if test="schoolId != null">school_id,</if>
|
||||
<if test="courseId != null">course_id,</if>
|
||||
<if test="teacherId != null">teacher_id,</if>
|
||||
<if test="auditorId != null">auditor_id,</if>
|
||||
<if test="year != null">year,</if>
|
||||
<if test="semester != null">semester,</if>
|
||||
<if test="unionType != null">union_type,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="difficulty != null">difficulty,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="passScore != null">pass_score,</if>
|
||||
<if test="examTime != null">exam_time,</if>
|
||||
<if test="timeLength != null">time_length,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="categoryId != null">category_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="no != null">#{no},</if>
|
||||
<if test="imgUrl != null">#{imgUrl},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="cityId != null">#{cityId},</if>
|
||||
<if test="schoolId != null">#{schoolId},</if>
|
||||
<if test="courseId != null">#{courseId},</if>
|
||||
<if test="teacherId != null">#{teacherId},</if>
|
||||
<if test="auditorId != null">#{auditorId},</if>
|
||||
<if test="year != null">#{year},</if>
|
||||
<if test="semester != null">#{semester},</if>
|
||||
<if test="unionType != null">#{unionType},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="difficulty != null">#{difficulty},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="passScore != null">#{passScore},</if>
|
||||
<if test="examTime != null">#{examTime},</if>
|
||||
<if test="timeLength != null">#{timeLength},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="categoryId != null">#{categoryId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamPaper" parameterType="ExamPaper">
|
||||
update exam_paper
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="no != null">no = #{no},</if>
|
||||
<if test="imgUrl != null">img_url = #{imgUrl},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="cityId != null">city_id = #{cityId},</if>
|
||||
<if test="schoolId != null">school_id = #{schoolId},</if>
|
||||
<if test="courseId != null">course_id = #{courseId},</if>
|
||||
<if test="teacherId != null">teacher_id = #{teacherId},</if>
|
||||
<if test="auditorId != null">auditor_id = #{auditorId},</if>
|
||||
<if test="year != null">year = #{year},</if>
|
||||
<if test="semester != null">semester = #{semester},</if>
|
||||
<if test="unionType != null">union_type = #{unionType},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="difficulty != null">difficulty = #{difficulty},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="passScore != null">pass_score = #{passScore},</if>
|
||||
<if test="examTime != null">exam_time = #{examTime},</if>
|
||||
<if test="timeLength != null">time_length = #{timeLength},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="categoryId != null">category_id = #{categoryId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamPaperById" parameterType="Long">
|
||||
delete from exam_paper where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperByIds" parameterType="String">
|
||||
delete from exam_paper where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperModuleByPaperIds" parameterType="String">
|
||||
delete from exam_paper_module where paper_id in
|
||||
<foreach item="paperId" collection="array" open="(" separator="," close=")">
|
||||
#{paperId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperModuleByPaperId" parameterType="Long">
|
||||
delete from exam_paper_module where paper_id = #{paperId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchExamPaperModule">
|
||||
insert into exam_paper_module( id, paper_id, module_name, question_type_id, time_length, img_url, score, create_time, sort_num) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.paperId}, #{item.moduleName}, #{item.questionTypeId}, #{item.timeLength}, #{item.imgUrl}, #{item.score}, #{item.createTime}, #{item.sortNum})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,131 @@
|
||||
<?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.luqj.exam.mapper.ExamPaperModuleMapper">
|
||||
|
||||
<resultMap type="ExamPaperModule" id="ExamPaperModuleResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="paperId" column="paper_id" />
|
||||
<result property="moduleName" column="module_name" />
|
||||
<result property="questionTypeId" column="question_type_id" />
|
||||
<result property="timeLength" column="time_length" />
|
||||
<result property="imgUrl" column="img_url" />
|
||||
<result property="score" column="score" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="sortNum" column="sort_num" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ExamPaperModuleExamPaperItemResult" type="ExamPaperModule" extends="ExamPaperModuleResult">
|
||||
<collection property="examPaperItemList" columnPrefix="item_" notNullColumn="id" javaType="java.util.List" resultMap="ExamPaperItemResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ExamPaperItem" id="ExamPaperItemResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="paperId" column="paper_id" />
|
||||
<result property="examPaperModuleId" column="exam_paper_module_id" />
|
||||
<result property="questionTypeId" column="question_type_id" />
|
||||
<result property="questionId" column="question_id" />
|
||||
<result property="score" column="score" />
|
||||
<result property="difficulty" column="difficulty" />
|
||||
<result property="sortNum" column="sort_num" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamPaperModuleVo">
|
||||
select id, paper_id, module_name, question_type_id, time_length, img_url, score, create_time, sort_num from exam_paper_module
|
||||
</sql>
|
||||
|
||||
<select id="selectExamPaperModuleList" parameterType="ExamPaperModule" resultMap="ExamPaperModuleResult">
|
||||
<include refid="selectExamPaperModuleVo"/>
|
||||
<where>
|
||||
<if test="paperId != null "> and paper_id = #{paperId}</if>
|
||||
<if test="moduleName != null and moduleName != ''"> and module_name like concat('%', #{moduleName}, '%')</if>
|
||||
<if test="questionTypeId != null "> and question_type_id = #{questionTypeId}</if>
|
||||
<if test="timeLength != null "> and time_length = #{timeLength}</if>
|
||||
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="sortNum != null "> and sort_num = #{sortNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamPaperModuleById" parameterType="Long" resultMap="ExamPaperModuleExamPaperItemResult">
|
||||
select a.id, a.paper_id, a.module_name, a.question_type_id, a.time_length, a.img_url, a.score, a.create_time, a.sort_num,
|
||||
b.id as item_id, b.paper_id as item_paper_id, b.exam_paper_module_id as item_exam_paper_module_id, b.question_type_id as item_question_type_id,
|
||||
b.question_id as item_question_id, b.score as item_score, b.difficulty as item_difficulty, b.sort_num as item_sort_num, b.create_time as item_create_time,
|
||||
b.creator_id as item_creator_id, b.status as item_status
|
||||
from exam_paper_module a
|
||||
left join exam_paper_item b on b.exam_paper_module_id = a.id
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamPaperModule" parameterType="ExamPaperModule" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_paper_module
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id,</if>
|
||||
<if test="moduleName != null">module_name,</if>
|
||||
<if test="questionTypeId != null">question_type_id,</if>
|
||||
<if test="timeLength != null">time_length,</if>
|
||||
<if test="imgUrl != null">img_url,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="sortNum != null">sort_num,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">#{paperId},</if>
|
||||
<if test="moduleName != null">#{moduleName},</if>
|
||||
<if test="questionTypeId != null">#{questionTypeId},</if>
|
||||
<if test="timeLength != null">#{timeLength},</if>
|
||||
<if test="imgUrl != null">#{imgUrl},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="sortNum != null">#{sortNum},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamPaperModule" parameterType="ExamPaperModule">
|
||||
update exam_paper_module
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id = #{paperId},</if>
|
||||
<if test="moduleName != null">module_name = #{moduleName},</if>
|
||||
<if test="questionTypeId != null">question_type_id = #{questionTypeId},</if>
|
||||
<if test="timeLength != null">time_length = #{timeLength},</if>
|
||||
<if test="imgUrl != null">img_url = #{imgUrl},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="sortNum != null">sort_num = #{sortNum},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamPaperModuleById" parameterType="Long">
|
||||
delete from exam_paper_module where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperModuleByIds" parameterType="String">
|
||||
delete from exam_paper_module where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperItemByExamPaperModuleIds" parameterType="String">
|
||||
delete from exam_paper_item where exam_paper_module_id in
|
||||
<foreach item="examPaperModuleId" collection="array" open="(" separator="," close=")">
|
||||
#{examPaperModuleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperItemByExamPaperModuleId" parameterType="Long">
|
||||
delete from exam_paper_item where exam_paper_module_id = #{examPaperModuleId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchExamPaperItem">
|
||||
insert into exam_paper_item( id, paper_id, exam_paper_module_id, question_type_id, question_id, score, difficulty, sort_num, create_time, creator_id, status) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.paperId}, #{item.examPaperModuleId}, #{item.questionTypeId}, #{item.questionId}, #{item.score}, #{item.difficulty}, #{item.sortNum}, #{item.createTime}, #{item.creatorId}, #{item.status})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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.luqj.exam.mapper.ExamPaperStrategyListMapper">
|
||||
|
||||
<resultMap type="ExamPaperStrategyList" id="ExamPaperStrategyListResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="examPaperStrategyId" column="exam_paper_strategy_id" />
|
||||
<result property="questionType" column="question_type" />
|
||||
<result property="difficulty" column="difficulty" />
|
||||
<result property="score" column="score" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="count" column="count" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamPaperStrategyListVo">
|
||||
select id, exam_paper_strategy_id, question_type, difficulty, score, create_time, count, creator_id from exam_paper_strategy_list
|
||||
</sql>
|
||||
|
||||
<select id="selectExamPaperStrategyListList" parameterType="ExamPaperStrategyList" resultMap="ExamPaperStrategyListResult">
|
||||
<include refid="selectExamPaperStrategyListVo"/>
|
||||
<where>
|
||||
<if test="examPaperStrategyId != null "> and exam_paper_strategy_id = #{examPaperStrategyId}</if>
|
||||
<if test="questionType != null "> and question_type = #{questionType}</if>
|
||||
<if test="difficulty != null "> and difficulty = #{difficulty}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="count != null "> and count = #{count}</if>
|
||||
<if test="creatorId != null and creatorId != ''"> and creator_id = #{creatorId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamPaperStrategyListById" parameterType="Long" resultMap="ExamPaperStrategyListResult">
|
||||
<include refid="selectExamPaperStrategyListVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamPaperStrategyList" parameterType="ExamPaperStrategyList" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_paper_strategy_list
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="examPaperStrategyId != null">exam_paper_strategy_id,</if>
|
||||
<if test="questionType != null">question_type,</if>
|
||||
<if test="difficulty != null">difficulty,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="count != null">count,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="examPaperStrategyId != null">#{examPaperStrategyId},</if>
|
||||
<if test="questionType != null">#{questionType},</if>
|
||||
<if test="difficulty != null">#{difficulty},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="count != null">#{count},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamPaperStrategyList" parameterType="ExamPaperStrategyList">
|
||||
update exam_paper_strategy_list
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="examPaperStrategyId != null">exam_paper_strategy_id = #{examPaperStrategyId},</if>
|
||||
<if test="questionType != null">question_type = #{questionType},</if>
|
||||
<if test="difficulty != null">difficulty = #{difficulty},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="count != null">count = #{count},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamPaperStrategyListById" parameterType="Long">
|
||||
delete from exam_paper_strategy_list where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperStrategyListByIds" parameterType="String">
|
||||
delete from exam_paper_strategy_list where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,126 @@
|
||||
<?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.luqj.exam.mapper.ExamPaperStrategyMapper">
|
||||
|
||||
<resultMap type="ExamPaperStrategy" id="ExamPaperStrategyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="code" column="code" />
|
||||
<result property="type" column="type" />
|
||||
<result property="difficulty" column="difficulty" />
|
||||
<result property="score" column="score" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ExamPaperStrategyExamPaperStrategyListResult" type="ExamPaperStrategy" extends="ExamPaperStrategyResult">
|
||||
<collection property="examPaperStrategyListList" notNullColumn="id" javaType="java.util.List" resultMap="ExamPaperStrategyListResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ExamPaperStrategyList" id="ExamPaperStrategyListResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="examPaperStrategyId" column="exam_paper_strategy_id" />
|
||||
<result property="questionType" column="question_type" />
|
||||
<result property="difficulty" column="difficulty" />
|
||||
<result property="score" column="score" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="count" column="count" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamPaperStrategyVo">
|
||||
select id, name, code, type, difficulty, score, create_time, creator_id, category_id from exam_paper_strategy
|
||||
</sql>
|
||||
|
||||
<select id="selectExamPaperStrategyList" parameterType="ExamPaperStrategy" resultMap="ExamPaperStrategyResult">
|
||||
<include refid="selectExamPaperStrategyVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="difficulty != null "> and difficulty = #{difficulty}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="creatorId != null and creatorId != ''"> and creator_id = #{creatorId}</if>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamPaperStrategyById" parameterType="Long" resultMap="ExamPaperStrategyExamPaperStrategyListResult">
|
||||
select a.id, a.name, a.code, a.type, a.difficulty, a.score, a.create_time, a.creator_id, a.category_id,
|
||||
b.id, b.exam_paper_strategy_id, b.question_type, b.difficulty, b.score, b.create_time, b.count, b.creator_id
|
||||
from exam_paper_strategy a
|
||||
left join exam_paper_strategy_list b on b.exam_paper_strategy_id = a.id
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamPaperStrategy" parameterType="ExamPaperStrategy" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_paper_strategy
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="code != null">code,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="difficulty != null">difficulty,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="categoryId != null">category_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="code != null">#{code},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="difficulty != null">#{difficulty},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="categoryId != null">#{categoryId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamPaperStrategy" parameterType="ExamPaperStrategy">
|
||||
update exam_paper_strategy
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="code != null">code = #{code},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="difficulty != null">difficulty = #{difficulty},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="categoryId != null">category_id = #{categoryId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamPaperStrategyById" parameterType="Long">
|
||||
delete from exam_paper_strategy where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperStrategyByIds" parameterType="String">
|
||||
delete from exam_paper_strategy where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperStrategyListByExamPaperStrategyIds" parameterType="String">
|
||||
delete from exam_paper_strategy_list where exam_paper_strategy_id in
|
||||
<foreach item="examPaperStrategyId" collection="array" open="(" separator="," close=")">
|
||||
#{examPaperStrategyId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamPaperStrategyListByExamPaperStrategyId" parameterType="Long">
|
||||
delete from exam_paper_strategy_list where exam_paper_strategy_id = #{examPaperStrategyId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchExamPaperStrategyList">
|
||||
insert into exam_paper_strategy_list( id, exam_paper_strategy_id, question_type, difficulty, score, create_time, count, creator_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.examPaperStrategyId}, #{item.questionType}, #{item.difficulty}, #{item.score}, #{item.createTime}, #{item.count}, #{item.creatorId})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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.luqj.exam.mapper.ExamQuestionCorrectionMapper">
|
||||
|
||||
<resultMap type="ExamQuestionCorrection" id="ExamQuestionCorrectionResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="questionId" column="question_id" />
|
||||
<result property="studentId" column="student_id" />
|
||||
<result property="oldAnswer" column="old_answer" />
|
||||
<result property="adviceAnswer" column="advice_answer" />
|
||||
<result property="adviceAnalysis" column="advice_analysis" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="errorTypeList" column="error_type_list" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamQuestionCorrectionVo">
|
||||
select id, question_id, student_id, old_answer, advice_answer, advice_analysis, create_time, error_type_list from exam_question_correction
|
||||
</sql>
|
||||
|
||||
<select id="selectExamQuestionCorrectionList" parameterType="ExamQuestionCorrection" resultMap="ExamQuestionCorrectionResult">
|
||||
<include refid="selectExamQuestionCorrectionVo"/>
|
||||
<where>
|
||||
<if test="questionId != null "> and question_id = #{questionId}</if>
|
||||
<if test="studentId != null "> and student_id = #{studentId}</if>
|
||||
<if test="oldAnswer != null and oldAnswer != ''"> and old_answer = #{oldAnswer}</if>
|
||||
<if test="adviceAnswer != null and adviceAnswer != ''"> and advice_answer = #{adviceAnswer}</if>
|
||||
<if test="adviceAnalysis != null and adviceAnalysis != ''"> and advice_analysis = #{adviceAnalysis}</if>
|
||||
<if test="errorTypeList != null and errorTypeList != ''"> and error_type_list = #{errorTypeList}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamQuestionCorrectionById" parameterType="Long" resultMap="ExamQuestionCorrectionResult">
|
||||
<include refid="selectExamQuestionCorrectionVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamQuestionCorrection" parameterType="ExamQuestionCorrection" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_question_correction
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">question_id,</if>
|
||||
<if test="studentId != null">student_id,</if>
|
||||
<if test="oldAnswer != null">old_answer,</if>
|
||||
<if test="adviceAnswer != null">advice_answer,</if>
|
||||
<if test="adviceAnalysis != null">advice_analysis,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="errorTypeList != null">error_type_list,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">#{questionId},</if>
|
||||
<if test="studentId != null">#{studentId},</if>
|
||||
<if test="oldAnswer != null">#{oldAnswer},</if>
|
||||
<if test="adviceAnswer != null">#{adviceAnswer},</if>
|
||||
<if test="adviceAnalysis != null">#{adviceAnalysis},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="errorTypeList != null">#{errorTypeList},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamQuestionCorrection" parameterType="ExamQuestionCorrection">
|
||||
update exam_question_correction
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="questionId != null">question_id = #{questionId},</if>
|
||||
<if test="studentId != null">student_id = #{studentId},</if>
|
||||
<if test="oldAnswer != null">old_answer = #{oldAnswer},</if>
|
||||
<if test="adviceAnswer != null">advice_answer = #{adviceAnswer},</if>
|
||||
<if test="adviceAnalysis != null">advice_analysis = #{adviceAnalysis},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="errorTypeList != null">error_type_list = #{errorTypeList},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamQuestionCorrectionById" parameterType="Long">
|
||||
delete from exam_question_correction where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamQuestionCorrectionByIds" parameterType="String">
|
||||
delete from exam_question_correction where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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.luqj.exam.mapper.ExamQuestionFavoriteMapper">
|
||||
|
||||
<resultMap type="ExamQuestionFavorite" id="ExamQuestionFavoriteResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="questionId" column="question_id" />
|
||||
<result property="studentId" column="student_id" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="categoryName" column="category_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="source" column="source" />
|
||||
<result property="schoolId" column="school_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamQuestionFavoriteVo">
|
||||
select id, question_id, student_id, category_id, category_name, create_time, source, school_id from exam_question_favorite
|
||||
</sql>
|
||||
|
||||
<select id="selectExamQuestionFavoriteList" parameterType="ExamQuestionFavorite" resultMap="ExamQuestionFavoriteResult">
|
||||
<include refid="selectExamQuestionFavoriteVo"/>
|
||||
<where>
|
||||
<if test="questionId != null "> and question_id = #{questionId}</if>
|
||||
<if test="studentId != null "> and student_id = #{studentId}</if>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
||||
<if test="source != null "> and source = #{source}</if>
|
||||
<if test="schoolId != null "> and school_id = #{schoolId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamQuestionFavoriteById" parameterType="Long" resultMap="ExamQuestionFavoriteResult">
|
||||
<include refid="selectExamQuestionFavoriteVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamQuestionFavorite" parameterType="ExamQuestionFavorite" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_question_favorite
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">question_id,</if>
|
||||
<if test="studentId != null">student_id,</if>
|
||||
<if test="categoryId != null">category_id,</if>
|
||||
<if test="categoryName != null">category_name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="source != null">source,</if>
|
||||
<if test="schoolId != null">school_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">#{questionId},</if>
|
||||
<if test="studentId != null">#{studentId},</if>
|
||||
<if test="categoryId != null">#{categoryId},</if>
|
||||
<if test="categoryName != null">#{categoryName},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="source != null">#{source},</if>
|
||||
<if test="schoolId != null">#{schoolId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamQuestionFavorite" parameterType="ExamQuestionFavorite">
|
||||
update exam_question_favorite
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="questionId != null">question_id = #{questionId},</if>
|
||||
<if test="studentId != null">student_id = #{studentId},</if>
|
||||
<if test="categoryId != null">category_id = #{categoryId},</if>
|
||||
<if test="categoryName != null">category_name = #{categoryName},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="source != null">source = #{source},</if>
|
||||
<if test="schoolId != null">school_id = #{schoolId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamQuestionFavoriteById" parameterType="Long">
|
||||
delete from exam_question_favorite where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamQuestionFavoriteByIds" parameterType="String">
|
||||
delete from exam_question_favorite where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,200 @@
|
||||
<?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.luqj.exam.mapper.ExamQuestionMapper">
|
||||
|
||||
<resultMap type="ExamQuestion" id="ExamQuestionResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="no" column="no" />
|
||||
<result property="question" column="question" />
|
||||
<result property="optionA" column="option_a" />
|
||||
<result property="optionB" column="option_b" />
|
||||
<result property="optionC" column="option_c" />
|
||||
<result property="optionD" column="option_d" />
|
||||
<result property="optionE" column="option_e" />
|
||||
<result property="optionF" column="option_f" />
|
||||
<result property="optionG" column="option_g" />
|
||||
<result property="score" column="score" />
|
||||
<result property="difficulty" column="difficulty" />
|
||||
<result property="pointId" column="point_id" />
|
||||
<result property="answer" column="answer" />
|
||||
<result property="analysisUrl" column="analysis_url" />
|
||||
<result property="analysis" column="analysis" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="schoolId" column="school_id" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="courseId" column="course_id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="examId" column="exam_id" />
|
||||
<result property="source" column="source" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="creatorId" column="creator_id" />
|
||||
<result property="auditorId" column="auditor_id" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updaterId" column="updater_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamQuestionVo">
|
||||
select id, no, question, option_a, option_b, option_c, option_d, option_e, option_f, option_g, score, difficulty, point_id, answer, analysis_url, analysis, province_id, city_id, school_id, category_id, course_id, type, exam_id, source, create_time, creator_id, auditor_id, update_time, updater_id, status, is_delete from exam_question
|
||||
</sql>
|
||||
|
||||
<select id="selectExamQuestionList" parameterType="ExamQuestion" resultMap="ExamQuestionResult">
|
||||
<include refid="selectExamQuestionVo"/>
|
||||
<where>
|
||||
<if test="no != null and no != ''"> and no = #{no}</if>
|
||||
<if test="question != null and question != ''"> and question LIKE concat(#{question},"%")</if>
|
||||
<if test="optionA != null and optionA != ''"> and option_a = #{optionA}</if>
|
||||
<if test="optionB != null and optionB != ''"> and option_b = #{optionB}</if>
|
||||
<if test="optionC != null and optionC != ''"> and option_c = #{optionC}</if>
|
||||
<if test="optionD != null and optionD != ''"> and option_d = #{optionD}</if>
|
||||
<if test="optionE != null and optionE != ''"> and option_e = #{optionE}</if>
|
||||
<if test="optionF != null and optionF != ''"> and option_f = #{optionF}</if>
|
||||
<if test="optionG != null and optionG != ''"> and option_g = #{optionG}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="difficulty != null "> and difficulty = #{difficulty}</if>
|
||||
<if test="pointId != null "> and point_id = #{pointId}</if>
|
||||
<if test="answer != null and answer != ''"> and answer = #{answer}</if>
|
||||
<if test="analysisUrl != null and analysisUrl != ''"> and analysis_url = #{analysisUrl}</if>
|
||||
<if test="analysis != null and analysis != ''"> and analysis = #{analysis}</if>
|
||||
<if test="provinceId != null "> and province_id = #{provinceId}</if>
|
||||
<if test="cityId != null "> and city_id = #{cityId}</if>
|
||||
<if test="schoolId != null "> and school_id = #{schoolId}</if>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="courseId != null "> and course_id = #{courseId}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="examId != null "> and exam_id = #{examId}</if>
|
||||
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||
<if test="creatorId != null "> and creator_id = #{creatorId}</if>
|
||||
<if test="auditorId != null "> and auditor_id = #{auditorId}</if>
|
||||
<if test="updaterId != null "> and updater_id = #{updaterId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectExamQuestionById" parameterType="Long" resultMap="ExamQuestionResult">
|
||||
<include refid="selectExamQuestionVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamQuestion" parameterType="ExamQuestion" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_question
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="no != null">no,</if>
|
||||
<if test="question != null">question,</if>
|
||||
<if test="optionA != null">option_a,</if>
|
||||
<if test="optionB != null">option_b,</if>
|
||||
<if test="optionC != null">option_c,</if>
|
||||
<if test="optionD != null">option_d,</if>
|
||||
<if test="optionE != null">option_e,</if>
|
||||
<if test="optionF != null">option_f,</if>
|
||||
<if test="optionG != null">option_g,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="difficulty != null">difficulty,</if>
|
||||
<if test="pointId != null">point_id,</if>
|
||||
<if test="answer != null">answer,</if>
|
||||
<if test="analysisUrl != null">analysis_url,</if>
|
||||
<if test="analysis != null">analysis,</if>
|
||||
<if test="provinceId != null">province_id,</if>
|
||||
<if test="cityId != null">city_id,</if>
|
||||
<if test="schoolId != null">school_id,</if>
|
||||
<if test="categoryId != null">category_id,</if>
|
||||
<if test="courseId != null">course_id,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="examId != null">exam_id,</if>
|
||||
<if test="source != null">source,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="auditorId != null">auditor_id,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updaterId != null">updater_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="no != null">#{no},</if>
|
||||
<if test="question != null">#{question},</if>
|
||||
<if test="optionA != null">#{optionA},</if>
|
||||
<if test="optionB != null">#{optionB},</if>
|
||||
<if test="optionC != null">#{optionC},</if>
|
||||
<if test="optionD != null">#{optionD},</if>
|
||||
<if test="optionE != null">#{optionE},</if>
|
||||
<if test="optionF != null">#{optionF},</if>
|
||||
<if test="optionG != null">#{optionG},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="difficulty != null">#{difficulty},</if>
|
||||
<if test="pointId != null">#{pointId},</if>
|
||||
<if test="answer != null">#{answer},</if>
|
||||
<if test="analysisUrl != null">#{analysisUrl},</if>
|
||||
<if test="analysis != null">#{analysis},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="cityId != null">#{cityId},</if>
|
||||
<if test="schoolId != null">#{schoolId},</if>
|
||||
<if test="categoryId != null">#{categoryId},</if>
|
||||
<if test="courseId != null">#{courseId},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="examId != null">#{examId},</if>
|
||||
<if test="source != null">#{source},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="auditorId != null">#{auditorId},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updaterId != null">#{updaterId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamQuestion" parameterType="ExamQuestion">
|
||||
update exam_question
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="no != null">no = #{no},</if>
|
||||
<if test="question != null">question = #{question},</if>
|
||||
<if test="optionA != null">option_a = #{optionA},</if>
|
||||
<if test="optionB != null">option_b = #{optionB},</if>
|
||||
<if test="optionC != null">option_c = #{optionC},</if>
|
||||
<if test="optionD != null">option_d = #{optionD},</if>
|
||||
<if test="optionE != null">option_e = #{optionE},</if>
|
||||
<if test="optionF != null">option_f = #{optionF},</if>
|
||||
<if test="optionG != null">option_g = #{optionG},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="difficulty != null">difficulty = #{difficulty},</if>
|
||||
<if test="pointId != null">point_id = #{pointId},</if>
|
||||
<if test="answer != null">answer = #{answer},</if>
|
||||
<if test="analysisUrl != null">analysis_url = #{analysisUrl},</if>
|
||||
<if test="analysis != null">analysis = #{analysis},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="cityId != null">city_id = #{cityId},</if>
|
||||
<if test="schoolId != null">school_id = #{schoolId},</if>
|
||||
<if test="categoryId != null">category_id = #{categoryId},</if>
|
||||
<if test="courseId != null">course_id = #{courseId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="examId != null">exam_id = #{examId},</if>
|
||||
<if test="source != null">source = #{source},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="auditorId != null">auditor_id = #{auditorId},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updaterId != null">updater_id = #{updaterId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamQuestionById" parameterType="Long">
|
||||
delete from exam_question where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamQuestionByIds" parameterType="String">
|
||||
delete from exam_question where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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.luqj.exam.mapper.ExamSchoolMapper">
|
||||
|
||||
<resultMap type="ExamSchool" id="ExamSchoolResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamSchoolVo">
|
||||
select id, name, province_id, city_id, create_time, update_time, status from exam_school
|
||||
</sql>
|
||||
|
||||
<select id="selectExamSchoolList" parameterType="ExamSchool" resultMap="ExamSchoolResult">
|
||||
<include refid="selectExamSchoolVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="provinceId != null "> and province_id = #{provinceId}</if>
|
||||
<if test="cityId != null "> and city_id = #{cityId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamSchoolById" parameterType="Long" resultMap="ExamSchoolResult">
|
||||
<include refid="selectExamSchoolVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamSchool" parameterType="ExamSchool" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_school
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="provinceId != null">province_id,</if>
|
||||
<if test="cityId != null">city_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="cityId != null">#{cityId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamSchool" parameterType="ExamSchool">
|
||||
update exam_school
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="cityId != null">city_id = #{cityId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamSchoolById" parameterType="Long">
|
||||
delete from exam_school where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamSchoolByIds" parameterType="String">
|
||||
delete from exam_school where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?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.luqj.exam.mapper.ExamStudentMistakesMapper">
|
||||
|
||||
<resultMap type="ExamStudentMistakes" id="ExamStudentMistakesResult">
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="id" column="id" />
|
||||
<result property="studentId" column="student_id" />
|
||||
<result property="errorAnswer" column="error_answer" />
|
||||
<result property="questionId" column="question_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="categoryName" column="category_name" />
|
||||
<result property="schoolId" column="school_id" />
|
||||
<result property="source" column="source" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamStudentMistakesVo">
|
||||
select category_id, id, student_id, error_answer, question_id, create_time, status, category_name, school_id, source from exam_student_mistakes
|
||||
</sql>
|
||||
|
||||
<select id="selectExamStudentMistakesList" parameterType="ExamStudentMistakes" resultMap="ExamStudentMistakesResult">
|
||||
<include refid="selectExamStudentMistakesVo"/>
|
||||
<where>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="studentId != null "> and student_id = #{studentId}</if>
|
||||
<if test="errorAnswer != null and errorAnswer != ''"> and error_answer = #{errorAnswer}</if>
|
||||
<if test="questionId != null "> and question_id = #{questionId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
||||
<if test="schoolId != null "> and school_id = #{schoolId}</if>
|
||||
<if test="source != null "> and source = #{source}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamStudentMistakesById" parameterType="Long" resultMap="ExamStudentMistakesResult">
|
||||
<include refid="selectExamStudentMistakesVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamStudentMistakes" parameterType="ExamStudentMistakes" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_student_mistakes
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="categoryId != null">category_id,</if>
|
||||
<if test="studentId != null">student_id,</if>
|
||||
<if test="errorAnswer != null">error_answer,</if>
|
||||
<if test="questionId != null">question_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="categoryName != null">category_name,</if>
|
||||
<if test="schoolId != null">school_id,</if>
|
||||
<if test="source != null">source,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="categoryId != null">#{categoryId},</if>
|
||||
<if test="studentId != null">#{studentId},</if>
|
||||
<if test="errorAnswer != null">#{errorAnswer},</if>
|
||||
<if test="questionId != null">#{questionId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="categoryName != null">#{categoryName},</if>
|
||||
<if test="schoolId != null">#{schoolId},</if>
|
||||
<if test="source != null">#{source},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamStudentMistakes" parameterType="ExamStudentMistakes">
|
||||
update exam_student_mistakes
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="categoryId != null">category_id = #{categoryId},</if>
|
||||
<if test="studentId != null">student_id = #{studentId},</if>
|
||||
<if test="errorAnswer != null">error_answer = #{errorAnswer},</if>
|
||||
<if test="questionId != null">question_id = #{questionId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="categoryName != null">category_name = #{categoryName},</if>
|
||||
<if test="schoolId != null">school_id = #{schoolId},</if>
|
||||
<if test="source != null">source = #{source},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamStudentMistakesById" parameterType="Long">
|
||||
delete from exam_student_mistakes where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamStudentMistakesByIds" parameterType="String">
|
||||
delete from exam_student_mistakes where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,164 @@
|
||||
<?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.luqj.exam.mapper.ExamStudentPaperAnswerMapper">
|
||||
|
||||
<resultMap type="ExamStudentPaperAnswer" id="ExamStudentPaperAnswerResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="paperId" column="paper_id" />
|
||||
<result property="stuPaperId" column="stu_paper_id" />
|
||||
<result property="examPaperItemId" column="exam_paper_item_id" />
|
||||
<result property="questionId" column="question_id" />
|
||||
<result property="studentAnswer" column="student_answer" />
|
||||
<result property="realAnswer" column="real_answer" />
|
||||
<result property="result" column="result" />
|
||||
<result property="scoreType" column="score_type" />
|
||||
<result property="score" column="score" />
|
||||
<result property="takeTimes" column="take_times" />
|
||||
<result property="answerTime" column="answer_time" />
|
||||
<result property="difficulty" column="difficulty" />
|
||||
<result property="stuProvinceId" column="stu_province_id" />
|
||||
<result property="stuCityId" column="stu_city_id" />
|
||||
<result property="stuSchoolId" column="stu_school_id" />
|
||||
<result property="provinceId" column="province_id" />
|
||||
<result property="cityId" column="city_id" />
|
||||
<result property="schoolId" column="school_id" />
|
||||
<result property="courseId" column="course_id" />
|
||||
<result property="type" column="type" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamStudentPaperAnswerVo">
|
||||
select id, paper_id, stu_paper_id, exam_paper_item_id, question_id, student_answer, real_answer, result, score_type, score, take_times, answer_time, difficulty, stu_province_id, stu_city_id, stu_school_id, province_id, city_id, school_id, course_id, type, create_time, update_time, status from exam_student_paper_answer
|
||||
</sql>
|
||||
|
||||
<select id="selectExamStudentPaperAnswerList" parameterType="ExamStudentPaperAnswer" resultMap="ExamStudentPaperAnswerResult">
|
||||
<include refid="selectExamStudentPaperAnswerVo"/>
|
||||
<where>
|
||||
<if test="paperId != null "> and paper_id = #{paperId}</if>
|
||||
<if test="stuPaperId != null "> and stu_paper_id = #{stuPaperId}</if>
|
||||
<if test="examPaperItemId != null "> and exam_paper_item_id = #{examPaperItemId}</if>
|
||||
<if test="questionId != null "> and question_id = #{questionId}</if>
|
||||
<if test="studentAnswer != null and studentAnswer != ''"> and student_answer = #{studentAnswer}</if>
|
||||
<if test="realAnswer != null and realAnswer != ''"> and real_answer = #{realAnswer}</if>
|
||||
<if test="result != null "> and result = #{result}</if>
|
||||
<if test="scoreType != null "> and score_type = #{scoreType}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="takeTimes != null "> and take_times = #{takeTimes}</if>
|
||||
<if test="answerTime != null "> and answer_time = #{answerTime}</if>
|
||||
<if test="difficulty != null "> and difficulty = #{difficulty}</if>
|
||||
<if test="stuProvinceId != null "> and stu_province_id = #{stuProvinceId}</if>
|
||||
<if test="stuCityId != null "> and stu_city_id = #{stuCityId}</if>
|
||||
<if test="stuSchoolId != null "> and stu_school_id = #{stuSchoolId}</if>
|
||||
<if test="provinceId != null "> and province_id = #{provinceId}</if>
|
||||
<if test="cityId != null "> and city_id = #{cityId}</if>
|
||||
<if test="schoolId != null "> and school_id = #{schoolId}</if>
|
||||
<if test="courseId != null "> and course_id = #{courseId}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamStudentPaperAnswerById" parameterType="Long" resultMap="ExamStudentPaperAnswerResult">
|
||||
<include refid="selectExamStudentPaperAnswerVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamStudentPaperAnswer" parameterType="ExamStudentPaperAnswer" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_student_paper_answer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id,</if>
|
||||
<if test="stuPaperId != null">stu_paper_id,</if>
|
||||
<if test="examPaperItemId != null">exam_paper_item_id,</if>
|
||||
<if test="questionId != null">question_id,</if>
|
||||
<if test="studentAnswer != null">student_answer,</if>
|
||||
<if test="realAnswer != null">real_answer,</if>
|
||||
<if test="result != null">result,</if>
|
||||
<if test="scoreType != null">score_type,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="takeTimes != null">take_times,</if>
|
||||
<if test="answerTime != null">answer_time,</if>
|
||||
<if test="difficulty != null">difficulty,</if>
|
||||
<if test="stuProvinceId != null">stu_province_id,</if>
|
||||
<if test="stuCityId != null">stu_city_id,</if>
|
||||
<if test="stuSchoolId != null">stu_school_id,</if>
|
||||
<if test="provinceId != null">province_id,</if>
|
||||
<if test="cityId != null">city_id,</if>
|
||||
<if test="schoolId != null">school_id,</if>
|
||||
<if test="courseId != null">course_id,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">#{paperId},</if>
|
||||
<if test="stuPaperId != null">#{stuPaperId},</if>
|
||||
<if test="examPaperItemId != null">#{examPaperItemId},</if>
|
||||
<if test="questionId != null">#{questionId},</if>
|
||||
<if test="studentAnswer != null">#{studentAnswer},</if>
|
||||
<if test="realAnswer != null">#{realAnswer},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
<if test="scoreType != null">#{scoreType},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="takeTimes != null">#{takeTimes},</if>
|
||||
<if test="answerTime != null">#{answerTime},</if>
|
||||
<if test="difficulty != null">#{difficulty},</if>
|
||||
<if test="stuProvinceId != null">#{stuProvinceId},</if>
|
||||
<if test="stuCityId != null">#{stuCityId},</if>
|
||||
<if test="stuSchoolId != null">#{stuSchoolId},</if>
|
||||
<if test="provinceId != null">#{provinceId},</if>
|
||||
<if test="cityId != null">#{cityId},</if>
|
||||
<if test="schoolId != null">#{schoolId},</if>
|
||||
<if test="courseId != null">#{courseId},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamStudentPaperAnswer" parameterType="ExamStudentPaperAnswer">
|
||||
update exam_student_paper_answer
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id = #{paperId},</if>
|
||||
<if test="stuPaperId != null">stu_paper_id = #{stuPaperId},</if>
|
||||
<if test="examPaperItemId != null">exam_paper_item_id = #{examPaperItemId},</if>
|
||||
<if test="questionId != null">question_id = #{questionId},</if>
|
||||
<if test="studentAnswer != null">student_answer = #{studentAnswer},</if>
|
||||
<if test="realAnswer != null">real_answer = #{realAnswer},</if>
|
||||
<if test="result != null">result = #{result},</if>
|
||||
<if test="scoreType != null">score_type = #{scoreType},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="takeTimes != null">take_times = #{takeTimes},</if>
|
||||
<if test="answerTime != null">answer_time = #{answerTime},</if>
|
||||
<if test="difficulty != null">difficulty = #{difficulty},</if>
|
||||
<if test="stuProvinceId != null">stu_province_id = #{stuProvinceId},</if>
|
||||
<if test="stuCityId != null">stu_city_id = #{stuCityId},</if>
|
||||
<if test="stuSchoolId != null">stu_school_id = #{stuSchoolId},</if>
|
||||
<if test="provinceId != null">province_id = #{provinceId},</if>
|
||||
<if test="cityId != null">city_id = #{cityId},</if>
|
||||
<if test="schoolId != null">school_id = #{schoolId},</if>
|
||||
<if test="courseId != null">course_id = #{courseId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamStudentPaperAnswerById" parameterType="Long">
|
||||
delete from exam_student_paper_answer where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamStudentPaperAnswerByIds" parameterType="String">
|
||||
delete from exam_student_paper_answer where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?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.luqj.exam.mapper.ExamStudentPaperMapper">
|
||||
|
||||
<resultMap type="ExamStudentPaper" id="ExamStudentPaperResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="paperId" column="paper_id" />
|
||||
<result property="studentId" column="student_id" />
|
||||
<result property="examTime" column="exam_time" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="takeTimes" column="take_times" />
|
||||
<result property="score" column="score" />
|
||||
<result property="status" column="status" />
|
||||
<result property="examType" column="exam_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamStudentPaperVo">
|
||||
select id, paper_id, student_id, exam_time, start_time, end_time, take_times, score, status, exam_type from exam_student_paper
|
||||
</sql>
|
||||
|
||||
<select id="selectExamStudentPaperList" parameterType="ExamStudentPaper" resultMap="ExamStudentPaperResult">
|
||||
<include refid="selectExamStudentPaperVo"/>
|
||||
<where>
|
||||
<if test="paperId != null "> and paper_id = #{paperId}</if>
|
||||
<if test="studentId != null "> and student_id = #{studentId}</if>
|
||||
<if test="examTime != null "> and exam_time = #{examTime}</if>
|
||||
<if test="startTime != null "> and start_time = #{startTime}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
<if test="takeTimes != null "> and take_times = #{takeTimes}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="examType != null "> and exam_type = #{examType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamStudentPaperById" parameterType="Long" resultMap="ExamStudentPaperResult">
|
||||
<include refid="selectExamStudentPaperVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamStudentPaper" parameterType="ExamStudentPaper" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_student_paper
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id,</if>
|
||||
<if test="studentId != null">student_id,</if>
|
||||
<if test="examTime != null">exam_time,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="takeTimes != null">take_times,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="examType != null">exam_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">#{paperId},</if>
|
||||
<if test="studentId != null">#{studentId},</if>
|
||||
<if test="examTime != null">#{examTime},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="takeTimes != null">#{takeTimes},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="examType != null">#{examType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamStudentPaper" parameterType="ExamStudentPaper">
|
||||
update exam_student_paper
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id = #{paperId},</if>
|
||||
<if test="studentId != null">student_id = #{studentId},</if>
|
||||
<if test="examTime != null">exam_time = #{examTime},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="takeTimes != null">take_times = #{takeTimes},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="examType != null">exam_type = #{examType},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamStudentPaperById" parameterType="Long">
|
||||
delete from exam_student_paper where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamStudentPaperByIds" parameterType="String">
|
||||
delete from exam_student_paper where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,91 @@
|
||||
<?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.luqj.exam.mapper.ExamStudentScoreMapper">
|
||||
|
||||
<resultMap type="ExamStudentScore" id="ExamStudentScoreResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="paperId" column="paper_id" />
|
||||
<result property="studentId" column="student_id" />
|
||||
<result property="courseId" column="course_id" />
|
||||
<result property="year" column="year" />
|
||||
<result property="semester" column="semester" />
|
||||
<result property="score" column="score" />
|
||||
<result property="examTime" column="exam_time" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamStudentScoreVo">
|
||||
select id, paper_id, student_id, course_id, year, semester, score, exam_time, status from exam_student_score
|
||||
</sql>
|
||||
|
||||
<select id="selectExamStudentScoreList" parameterType="ExamStudentScore" resultMap="ExamStudentScoreResult">
|
||||
<include refid="selectExamStudentScoreVo"/>
|
||||
<where>
|
||||
<if test="paperId != null "> and paper_id = #{paperId}</if>
|
||||
<if test="studentId != null "> and student_id = #{studentId}</if>
|
||||
<if test="courseId != null "> and course_id = #{courseId}</if>
|
||||
<if test="year != null "> and year = #{year}</if>
|
||||
<if test="semester != null "> and semester = #{semester}</if>
|
||||
<if test="score != null "> and score = #{score}</if>
|
||||
<if test="examTime != null "> and exam_time = #{examTime}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectExamStudentScoreById" parameterType="Long" resultMap="ExamStudentScoreResult">
|
||||
<include refid="selectExamStudentScoreVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamStudentScore" parameterType="ExamStudentScore" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into exam_student_score
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id,</if>
|
||||
<if test="studentId != null">student_id,</if>
|
||||
<if test="courseId != null">course_id,</if>
|
||||
<if test="year != null">year,</if>
|
||||
<if test="semester != null">semester,</if>
|
||||
<if test="score != null">score,</if>
|
||||
<if test="examTime != null">exam_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="paperId != null">#{paperId},</if>
|
||||
<if test="studentId != null">#{studentId},</if>
|
||||
<if test="courseId != null">#{courseId},</if>
|
||||
<if test="year != null">#{year},</if>
|
||||
<if test="semester != null">#{semester},</if>
|
||||
<if test="score != null">#{score},</if>
|
||||
<if test="examTime != null">#{examTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamStudentScore" parameterType="ExamStudentScore">
|
||||
update exam_student_score
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="paperId != null">paper_id = #{paperId},</if>
|
||||
<if test="studentId != null">student_id = #{studentId},</if>
|
||||
<if test="courseId != null">course_id = #{courseId},</if>
|
||||
<if test="year != null">year = #{year},</if>
|
||||
<if test="semester != null">semester = #{semester},</if>
|
||||
<if test="score != null">score = #{score},</if>
|
||||
<if test="examTime != null">exam_time = #{examTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamStudentScoreById" parameterType="Long">
|
||||
delete from exam_student_score where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamStudentScoreByIds" parameterType="String">
|
||||
delete from exam_student_score where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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.luqj.exam.mapper.StatsExamAccuracyMapper">
|
||||
|
||||
<resultMap type="StatsExamAccuracy" id="StatsExamAccuracyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="rightCount" column="right_count" />
|
||||
<result property="doCount" column="do_count" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectStatsExamAccuracyVo">
|
||||
select id, user_id, right_count, do_count, create_time, update_time, status from stats_exam_accuracy
|
||||
</sql>
|
||||
|
||||
<select id="selectStatsExamAccuracyList" parameterType="StatsExamAccuracy" resultMap="StatsExamAccuracyResult">
|
||||
<include refid="selectStatsExamAccuracyVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="rightCount != null "> and right_count = #{rightCount}</if>
|
||||
<if test="doCount != null "> and do_count = #{doCount}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStatsExamAccuracyById" parameterType="Long" resultMap="StatsExamAccuracyResult">
|
||||
<include refid="selectStatsExamAccuracyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertStatsExamAccuracy" parameterType="StatsExamAccuracy" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into stats_exam_accuracy
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="rightCount != null">right_count,</if>
|
||||
<if test="doCount != null">do_count,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="rightCount != null">#{rightCount},</if>
|
||||
<if test="doCount != null">#{doCount},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateStatsExamAccuracy" parameterType="StatsExamAccuracy">
|
||||
update stats_exam_accuracy
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="rightCount != null">right_count = #{rightCount},</if>
|
||||
<if test="doCount != null">do_count = #{doCount},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStatsExamAccuracyById" parameterType="Long">
|
||||
delete from stats_exam_accuracy where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStatsExamAccuracyByIds" parameterType="String">
|
||||
delete from stats_exam_accuracy where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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.luqj.exam.mapper.StatsExamQuestionAccuracyMapper">
|
||||
|
||||
<resultMap type="StatsExamQuestionAccuracy" id="StatsExamQuestionAccuracyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="questionId" column="question_id" />
|
||||
<result property="rightCount" column="right_count" />
|
||||
<result property="doCount" column="do_count" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectStatsExamQuestionAccuracyVo">
|
||||
select id, question_id, right_count, do_count, create_time, update_time, status from stats_exam_question_accuracy
|
||||
</sql>
|
||||
|
||||
<select id="selectStatsExamQuestionAccuracyList" parameterType="StatsExamQuestionAccuracy" resultMap="StatsExamQuestionAccuracyResult">
|
||||
<include refid="selectStatsExamQuestionAccuracyVo"/>
|
||||
<where>
|
||||
<if test="questionId != null "> and question_id = #{questionId}</if>
|
||||
<if test="rightCount != null "> and right_count = #{rightCount}</if>
|
||||
<if test="doCount != null "> and do_count = #{doCount}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStatsExamQuestionAccuracyById" parameterType="Long" resultMap="StatsExamQuestionAccuracyResult">
|
||||
<include refid="selectStatsExamQuestionAccuracyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertStatsExamQuestionAccuracy" parameterType="StatsExamQuestionAccuracy" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into stats_exam_question_accuracy
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">question_id,</if>
|
||||
<if test="rightCount != null">right_count,</if>
|
||||
<if test="doCount != null">do_count,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">#{questionId},</if>
|
||||
<if test="rightCount != null">#{rightCount},</if>
|
||||
<if test="doCount != null">#{doCount},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateStatsExamQuestionAccuracy" parameterType="StatsExamQuestionAccuracy">
|
||||
update stats_exam_question_accuracy
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="questionId != null">question_id = #{questionId},</if>
|
||||
<if test="rightCount != null">right_count = #{rightCount},</if>
|
||||
<if test="doCount != null">do_count = #{doCount},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStatsExamQuestionAccuracyById" parameterType="Long">
|
||||
delete from stats_exam_question_accuracy where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStatsExamQuestionAccuracyByIds" parameterType="String">
|
||||
delete from stats_exam_question_accuracy where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?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.luqj.exam.mapper.StatsExamWeekAccuracyMapper">
|
||||
|
||||
<resultMap type="StatsExamWeekAccuracy" id="StatsExamWeekAccuracyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="rightCount" column="right_count" />
|
||||
<result property="doCount" column="do_count" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectStatsExamWeekAccuracyVo">
|
||||
select id, user_id, start_time, end_time, right_count, do_count, create_time, update_time, status from stats_exam_week_accuracy
|
||||
</sql>
|
||||
|
||||
<select id="selectStatsExamWeekAccuracyList" parameterType="StatsExamWeekAccuracy" resultMap="StatsExamWeekAccuracyResult">
|
||||
<include refid="selectStatsExamWeekAccuracyVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="startTime != null "> and start_time = #{startTime}</if>
|
||||
<if test="endTime != null "> and end_time = #{endTime}</if>
|
||||
<if test="rightCount != null "> and right_count = #{rightCount}</if>
|
||||
<if test="doCount != null "> and do_count = #{doCount}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectStatsExamWeekAccuracyById" parameterType="Long" resultMap="StatsExamWeekAccuracyResult">
|
||||
<include refid="selectStatsExamWeekAccuracyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertStatsExamWeekAccuracy" parameterType="StatsExamWeekAccuracy" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into stats_exam_week_accuracy
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="rightCount != null">right_count,</if>
|
||||
<if test="doCount != null">do_count,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="rightCount != null">#{rightCount},</if>
|
||||
<if test="doCount != null">#{doCount},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateStatsExamWeekAccuracy" parameterType="StatsExamWeekAccuracy">
|
||||
update stats_exam_week_accuracy
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="rightCount != null">right_count = #{rightCount},</if>
|
||||
<if test="doCount != null">do_count = #{doCount},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteStatsExamWeekAccuracyById" parameterType="Long">
|
||||
delete from stats_exam_week_accuracy where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteStatsExamWeekAccuracyByIds" parameterType="String">
|
||||
delete from stats_exam_week_accuracy where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user