fuliqi
2024-10-17 8546b3d285af4235a0ef615a0c6e89486ae2c806
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
45
46
47
48
49
<?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.ycl.jxkg.mapper.CheatRecordMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ycl.jxkg.domain.vo.CheatRecordVO">
        <result column="user_id" property="userId" />
        <result column="exam_id" property="examId" />
        <result column="cheat_content" property="cheatContent" />
        <result column="cheat_time" property="cheatTime" />
        <result column="add_user_id" property="addUserId" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
    </resultMap>
 
    <select id="getById" resultMap="BaseResultMap">
        SELECT
            TCR.user_id,
            TCR.exam_id,
            TCR.cheat_content,
            TCR.cheat_time,
            TCR.add_user_id,
            TCR.create_time,
            TCR.update_time,
            TCR.id
        FROM
            t_cheat_record TCR
        WHERE
            TCR.id = #{id} AND TCR.deleted = 0
    </select>
 
 
    <select id="getPage" resultMap="BaseResultMap">
        SELECT
            TCR.user_id,
            TCR.exam_id,
            TCR.cheat_content,
            TCR.cheat_time,
            TCR.add_user_id,
            TCR.create_time,
            TCR.update_time,
            TCR.id
        FROM
            t_cheat_record TCR
        WHERE
            TCR.deleted = 0
    </select>
 
</mapper>