<?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.mindskip.xzs.repository.VideoMapper">
|
<resultMap id="BaseResultMap" type="com.mindskip.xzs.domain.VideoStudent">
|
<id column="id" jdbcType="INTEGER" property="id" />
|
<result column="room_name" jdbcType="VARCHAR" property="roomName" />
|
<result column="stu_id" jdbcType="VARCHAR" property="stuId" />
|
<result column="start" jdbcType="TIMESTAMP" property="start" />
|
<result column="end" jdbcType="TIMESTAMP" property="end" />
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
id, room_name, stu_id, start, end
|
</sql>
|
|
<select id="getAll" resultType="com.mindskip.xzs.domain.VideoStudent">
|
select
|
<include refid="Base_Column_List" />
|
from t_video_student
|
</select>
|
<select id="getStudentList" resultType="java.lang.String">
|
select room_name as roomName
|
from t_video_student
|
group by room_name
|
</select>
|
|
<delete id="clear">
|
DELETE FROM t_video_student;
|
</delete>
|
|
<insert id="insert" parameterType="com.mindskip.xzs.domain.VideoStudent" useGeneratedKeys="true" keyProperty="id">
|
insert into t_video_student (id, room_name, stu_id, start, end)
|
values (#{id,jdbcType=INTEGER},
|
#{roomName,jdbcType=VARCHAR},
|
#{stuId,jdbcType=VARCHAR},
|
#{start,jdbcType=TIMESTAMP},
|
#{end,jdbcType=TIMESTAMP}
|
)
|
</insert>
|
|
|
|
|
</mapper>
|