123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?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.sy.mapper.SyTestExamineeMapper">
-
- <resultMap type="SyTestExaminee" id="SyTestExamineeResult">
- <result property="examineeId" column="examinee_id" />
- <result property="paperId" column="paper_id" />
- <result property="round" column="round" />
- <result property="customerCode" column="customer_code" />
- <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="stats" column="stats" />
- </resultMap>
- <sql id="selectSyTestExamineeVo">
- select examinee_id, paper_id, round, customer_code, begin_time, end_time, state, score_level, score, score_rate, ranking, stats from sy_test_examinee
- </sql>
- <select id="selectSyTestExamineeLatest" parameterType="map" resultMap="SyTestExamineeResult">
- <include refid="selectSyTestExamineeVo"/>
- <where>
- <if test="paperId != null "> and paper_id = #{paperId}</if>
- <if test="customerCode != null and customerCode != ''"> and customer_code = #{customerCode}</if>
- <if test="state != null "> and state = #{state}</if>
- <if test="states != null "> and state in <foreach item="o" collection="states" open="(" separator="," close=")">#{o}</foreach></if>
- </where>
- order by examinee_id desc
- <if test="cnt != null "> limit #{cnt}</if>
- </select>
- <select id="selectSyTestExamineeList" parameterType="SyTestExaminee" resultMap="SyTestExamineeResult">
- <include refid="selectSyTestExamineeVo"/>
- <where>
- <if test="paperId != null "> and paper_id = #{paperId}</if>
- <if test="round != null "> and round = #{round}</if>
- <if test="customerCode != null and customerCode != ''"> and customer_code = #{customerCode}</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="stats != null and stats != ''"> and stats = #{stats}</if>
- </where>
- ORDER BY examinee_id DESC
- </select>
-
- <select id="selectSyTestExamineeById" parameterType="Long" resultMap="SyTestExamineeResult">
- <include refid="selectSyTestExamineeVo"/>
- where examinee_id = #{examineeId}
- </select>
-
- <insert id="insertSyTestExaminee" parameterType="SyTestExaminee" useGeneratedKeys="true" keyProperty="examineeId">
- insert into sy_test_examinee
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="paperId != null">paper_id,</if>
- <if test="round != null">round,</if>
- <if test="customerCode != null">customer_code,</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="stats != null">stats,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="paperId != null">#{paperId},</if>
- <if test="round != null">#{round},</if>
- <if test="customerCode != null">#{customerCode},</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="stats != null">#{stats},</if>
- </trim>
- </insert>
- <update id="updateSyTestExaminee" parameterType="SyTestExaminee">
- update sy_test_examinee
- <trim prefix="SET" suffixOverrides=",">
- <if test="paperId != null">paper_id = #{paperId},</if>
- <if test="round != null">round = #{round},</if>
- <if test="customerCode != null">customer_code = #{customerCode},</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="stats != null">stats = #{stats},</if>
- </trim>
- where examinee_id = #{examineeId}
- </update>
- <delete id="deleteSyTestExamineeById" parameterType="Long">
- delete from sy_test_examinee where examinee_id = #{examineeId}
- </delete>
- <delete id="deleteSyTestExamineeByIds" parameterType="String">
- delete from sy_test_examinee where examinee_id in
- <foreach item="examineeId" collection="array" open="(" separator="," close=")">
- #{examineeId}
- </foreach>
- </delete>
- </mapper>
|