inleft
2022-02-15 d734432a8bbbf863dc3de305f56e831c56ac767a
commit | author | age
9bcb19 1 <?xml version="1.0" encoding="UTF-8"?>
I 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="vip.xiaonuo.sys.modular.user.mapper.SysUserMapper">
4
5     <resultMap id="sysUserResult" type="vip.xiaonuo.sys.modular.user.result.SysUserResult">
6         <id column="id" property="id" />
7         <result column="account" property="account" />
8         <result column="nick_name" property="nickName" />
9         <result column="name" property="name" />
10         <result column="avatar" property="avatar" />
11         <result column="birthday" property="birthday" />
12         <result column="sex" property="sex" />
13         <result column="email" property="email" />
14         <result column="phone" property="phone" />
15         <result column="tel" property="tel" />
16         <result column="status" property="status" />
17         <association property="sysEmpInfo" javaType="vip.xiaonuo.sys.modular.emp.result.SysEmpInfo">
18             <result column="job_num" property="jobNum" />
19             <result column="org_id" property="orgId" />
20             <result column="org_name" property="orgName" />
21         </association>
22     </resultMap>
23
24     <!--获取用户分页列表-->
25     <select id="page" resultMap="sysUserResult">
26         select sys_user.*,
27                sys_emp.job_num,
28                sys_emp.org_id,
29                sys_emp.org_name
30         from sys_user left join sys_emp on sys_user.id = sys_emp.id left join sys_org on sys_emp.org_id = sys_org.id
31         ${ew.customSqlSegment}
32     </select>
33 </mapper>