龚焕茏
2024-07-03 3ec909b27b3eba956aa9d00cc7a94c179bd04bbf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?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>