|
|
|
@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<resultMap type="SysUser" id="SysUserResult"> |
|
|
|
|
<id property="userId" column="user_id" /> |
|
|
|
|
<result property="userType" column="user_type"/> |
|
|
|
|
<result property="deptId" column="dept_id" /> |
|
|
|
|
<result property="userName" column="user_name" /> |
|
|
|
|
<result property="nickName" column="nick_name" /> |
|
|
|
@ -23,7 +24,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="updateBy" column="update_by" /> |
|
|
|
|
<result property="updateTime" column="update_time" /> |
|
|
|
|
<result property="remark" column="remark" /> |
|
|
|
|
|
|
|
|
|
<association property="dept" javaType="SysDept" resultMap="deptResult" /> |
|
|
|
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" /> |
|
|
|
|
</resultMap> |
|
|
|
@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="orderNum" column="order_num" /> |
|
|
|
|
<result property="leader" column="leader" /> |
|
|
|
|
<result property="status" column="dept_status" /> |
|
|
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<resultMap id="RoleResult" type="SysRole"> |
|
|
|
@ -48,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
<sql id="selectUserVo"> |
|
|
|
|
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, |
|
|
|
|
select u.user_id,u.user_type, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, |
|
|
|
|
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, |
|
|
|
|
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status |
|
|
|
|
from sys_user u |
|
|
|
@ -153,6 +154,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="userName != null and userName != ''">user_name,</if> |
|
|
|
|
<if test="nickName != null and nickName != ''">nick_name,</if> |
|
|
|
|
<if test="email != null and email != ''">email,</if> |
|
|
|
|
<if test="userType != null and userType != ''">user_type,</if> |
|
|
|
|
<if test="avatar != null and avatar != ''">avatar,</if> |
|
|
|
|
<if test="wxOpenid != null and wxOpenid != ''">wx_openid,</if> |
|
|
|
|
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if> |
|
|
|
@ -168,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="userName != null and userName != ''">#{userName},</if> |
|
|
|
|
<if test="nickName != null and nickName != ''">#{nickName},</if> |
|
|
|
|
<if test="email != null and email != ''">#{email},</if> |
|
|
|
|
<if test="userType != null and userType != ''">#{userType},</if> |
|
|
|
|
<if test="avatar != null and avatar != ''">#{avatar},</if> |
|
|
|
|
<if test="wxOpenid != null and wxOpenid != ''">#{wxOpenid},</if> |
|
|
|
|
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if> |
|
|
|
@ -187,6 +190,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="userName != null and userName != ''">user_name = #{userName},</if> |
|
|
|
|
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if> |
|
|
|
|
<if test="email != null ">email = #{email},</if> |
|
|
|
|
<if test="userType != null ">user_type = #{userType},</if> |
|
|
|
|
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if> |
|
|
|
|
<if test="sex != null and sex != ''">sex = #{sex},</if> |
|
|
|
|
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if> |
|
|
|
|