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
| <?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="real_name" property="realName"/>
| <result column="sex" property="sex"/>
| <result column="phone" property="phone"/>
| <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,
| TU.real_name,
| TU.sex,
| TU.phone
| FROM t_classes_user TCU
| LEFT JOIN t_user TU ON TU.id = TCU.user_id
| WHERE TCU.deleted = 0
| </select>
|
| </mapper>
|
|