|
@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="emergencyPhone" column="emergency_phone" />
|
|
|
<result property="position" column="position" />
|
|
|
<result property="weChat" column="we_chat" />
|
|
|
+ <result property="type" column="type" />
|
|
|
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
|
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
|
|
</resultMap>
|
|
@@ -50,7 +51,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.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, u.type type,
|
|
|
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, u.emergency_phone emergency_phone, u.position position, u.we_chat we_chat
|
|
|
from sys_user u
|
|
@@ -60,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
- select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader, u.emergency_phone emergency_phone, u.position position, u.we_chat we_chat from sys_user u
|
|
|
+ select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader, u.emergency_phone emergency_phone, u.position position, u.we_chat we_chat, u.type type from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
where u.del_flag = '0'
|
|
|
<if test="userId != null and userId != 0">
|
|
@@ -89,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
- select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time, u.emergency_phone emergency_phone, u.position position, u.we_chat we_chat
|
|
|
+ select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time, u.emergency_phone emergency_phone, u.position position, u.we_chat we_chat, u.type type
|
|
|
from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
left join sys_user_role ur on u.user_id = ur.user_id
|
|
@@ -106,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
- select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time, u.emergency_phone emergency_phone, u.position position, u.we_chat we_chat
|
|
|
+ select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time, u.emergency_phone emergency_phone, u.position position, u.we_chat we_chat, u.type type
|
|
|
from sys_user u
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
left join sys_user_role ur on u.user_id = ur.user_id
|
|
@@ -169,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="emergencyPhone != null and emergencyPhone != ''">emergency_phone,</if>
|
|
|
<if test="position != null and position != ''">position,</if>
|
|
|
<if test="weChat != null and weChat != ''">we_chat,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
create_time
|
|
|
)values(
|
|
|
<if test="userId != null and userId != ''">#{userId},</if>
|
|
@@ -186,6 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="emergencyPhone != null and emergencyPhone != ''">#{emergencyPhone},</if>
|
|
|
<if test="position != null and position != ''">#{position},</if>
|
|
|
<if test="weChat != null and weChat != ''">#{weChat},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
sysdate()
|
|
|
)
|
|
|
</insert>
|
|
@@ -209,6 +212,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="emergencyPhone != null and emergencyPhone != ''">emergency_phone = #{emergencyPhone},</if>
|
|
|
<if test="position != null and position != ''">position = #{position},</if>
|
|
|
<if test="weChat != null and weChat != ''">we_chat = #{weChat},</if>
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
update_time = sysdate()
|
|
|
</set>
|
|
|
where user_id = #{userId}
|