xiangpei
2024-06-04 81b6f1cc38a941b65f989ecdd40529f2648bdd8c
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
<?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.ClassesUserMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ycl.jxkg.domain.vo.ClassesUserVO">
        <result column="classes_id" property="classesId" />
        <result column="user_id" property="userId" />
        <result column="create_time" property="createTime" />
    </resultMap>
 
 
 
 
 
 
 
    <select id="getById" resultMap="BaseResultMap">
        SELECT
            TCU.classes_id,
            TCU.user_id,
            TCU.create_time,
            TCU.id
        FROM
            t_classes_user TCU
        WHERE
            TCU.id = #{id} AND TCU.deleted = 0
    </select>
 
 
    <select id="getPage" resultMap="BaseResultMap">
        SELECT
            TCU.classes_id,
            TCU.user_id,
            TCU.create_time,
            TCU.id
        FROM
            t_classes_user TCU
        WHERE
            TCU.deleted = 0
    </select>
 
</mapper>