| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <?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.ruoyi.learn.mapper.LearnExamineeMapper">
-
- <resultMap type="LearnExaminee" id="LearnExamineeResult">
- <result property="examineeId" column="examinee_id" />
- <result property="studentId" column="student_id" />
- <result property="paperType" column="paper_type" />
- <result property="paperId" column="paper_id" />
- <result property="beginTime" column="begin_time" />
- <result property="endTime" column="end_time" />
- <result property="state" column="state" />
- <result property="scoreLevel" column="score_level" />
- <result property="score" column="score" />
- <result property="scoreRate" column="score_rate" />
- <result property="ranking" column="ranking" />
- <result property="gradeRanking" column="grade_ranking" />
- <result property="chooseCount" column="choose_count" />
- <result property="chooseTotal" column="choose_total" />
- <result property="subjectiveCount" column="subjective_count" />
- <result property="subjectiveTotal" column="subjective_total" />
- <result property="createTime" column="create_time" />
- <result property="updateTime" column="update_time" />
- </resultMap>
- <sql id="selectLearnExamineeVo">
- select examinee_id, student_id, paper_type, paper_id, begin_time, end_time, state, score_level, score, score_rate, ranking, grade_ranking, choose_count, choose_total, subjective_count, subjective_total, create_time, update_time from learn_examinee
- </sql>
- <select id="selectLearnExamineeList" parameterType="LearnExaminee" resultMap="LearnExamineeResult">
- <include refid="selectLearnExamineeVo"/>
- <where>
- <if test="studentId != null "> and student_id = #{studentId}</if>
- <if test="paperType != null "> and paper_type = #{paperType}</if>
- <if test="paperId != null "> and paper_id = #{paperId}</if>
- <if test="beginTime != null "> and begin_time = #{beginTime}</if>
- <if test="endTime != null "> and end_time = #{endTime}</if>
- <if test="state != null "> and state = #{state}</if>
- <if test="scoreLevel != null and scoreLevel != ''"> and score_level = #{scoreLevel}</if>
- <if test="score != null "> and score = #{score}</if>
- <if test="scoreRate != null "> and score_rate = #{scoreRate}</if>
- <if test="ranking != null "> and ranking = #{ranking}</if>
- <if test="gradeRanking != null "> and grade_ranking = #{gradeRanking}</if>
- <if test="chooseCount != null "> and choose_count = #{chooseCount}</if>
- <if test="chooseTotal != null "> and choose_total = #{chooseTotal}</if>
- <if test="subjectiveCount != null "> and subjective_count = #{subjectiveCount}</if>
- <if test="subjectiveTotal != null "> and subjective_total = #{subjectiveTotal}</if>
- </where>
- </select>
-
- <select id="selectLearnExamineeByExamineeId" parameterType="Long" resultMap="LearnExamineeResult">
- <include refid="selectLearnExamineeVo"/>
- where examinee_id = #{examineeId}
- </select>
- <insert id="insertLearnExaminee" parameterType="LearnExaminee" useGeneratedKeys="true" keyProperty="examineeId">
- insert into learn_examinee
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="studentId != null">student_id,</if>
- <if test="paperType != null">paper_type,</if>
- <if test="paperId != null">paper_id,</if>
- <if test="beginTime != null">begin_time,</if>
- <if test="endTime != null">end_time,</if>
- <if test="state != null">state,</if>
- <if test="scoreLevel != null">score_level,</if>
- <if test="score != null">score,</if>
- <if test="scoreRate != null">score_rate,</if>
- <if test="ranking != null">ranking,</if>
- <if test="gradeRanking != null">grade_ranking,</if>
- <if test="chooseCount != null">choose_count,</if>
- <if test="chooseTotal != null">choose_total,</if>
- <if test="subjectiveCount != null">subjective_count,</if>
- <if test="subjectiveTotal != null">subjective_total,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateTime != null">update_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="studentId != null">#{studentId},</if>
- <if test="paperType != null">#{paperType},</if>
- <if test="paperId != null">#{paperId},</if>
- <if test="beginTime != null">#{beginTime},</if>
- <if test="endTime != null">#{endTime},</if>
- <if test="state != null">#{state},</if>
- <if test="scoreLevel != null">#{scoreLevel},</if>
- <if test="score != null">#{score},</if>
- <if test="scoreRate != null">#{scoreRate},</if>
- <if test="ranking != null">#{ranking},</if>
- <if test="gradeRanking != null">#{gradeRanking},</if>
- <if test="chooseCount != null">#{chooseCount},</if>
- <if test="chooseTotal != null">#{chooseTotal},</if>
- <if test="subjectiveCount != null">#{subjectiveCount},</if>
- <if test="subjectiveTotal != null">#{subjectiveTotal},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateTime != null">#{updateTime},</if>
- </trim>
- </insert>
- <update id="updateLearnExaminee" parameterType="LearnExaminee">
- update learn_examinee
- <trim prefix="SET" suffixOverrides=",">
- <if test="studentId != null">student_id = #{studentId},</if>
- <if test="paperType != null">paper_type = #{paperType},</if>
- <if test="paperId != null">paper_id = #{paperId},</if>
- <if test="beginTime != null">begin_time = #{beginTime},</if>
- <if test="endTime != null">end_time = #{endTime},</if>
- <if test="state != null">state = #{state},</if>
- <if test="scoreLevel != null">score_level = #{scoreLevel},</if>
- <if test="score != null">score = #{score},</if>
- <if test="scoreRate != null">score_rate = #{scoreRate},</if>
- <if test="ranking != null">ranking = #{ranking},</if>
- <if test="gradeRanking != null">grade_ranking = #{gradeRanking},</if>
- <if test="chooseCount != null">choose_count = #{chooseCount},</if>
- <if test="chooseTotal != null">choose_total = #{chooseTotal},</if>
- <if test="subjectiveCount != null">subjective_count = #{subjectiveCount},</if>
- <if test="subjectiveTotal != null">subjective_total = #{subjectiveTotal},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- </trim>
- where examinee_id = #{examineeId}
- </update>
- <delete id="deleteLearnExamineeByExamineeId" parameterType="Long">
- delete from learn_examinee where examinee_id = #{examineeId}
- </delete>
- <delete id="deleteLearnExamineeByExamineeIds" parameterType="String">
- delete from learn_examinee where examinee_id in
- <foreach item="examineeId" collection="array" open="(" separator="," close=")">
- #{examineeId}
- </foreach>
- </delete>
- </mapper>
|