|
|
|
|
@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="sex" column="sex" />
|
|
|
|
|
<result property="avatar" column="avatar" />
|
|
|
|
|
<result property="password" column="password" />
|
|
|
|
|
<result property="pcId" column="pc_id" />
|
|
|
|
|
<result property="status" column="status" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="loginIp" column="login_ip" />
|
|
|
|
|
@ -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.pwd_update_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.pc_id, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_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
|
|
|
|
|
@ -58,7 +59,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 from sys_user u
|
|
|
|
|
select u.user_id, u.dept_id, u.nick_name, u.user_name,u.pc_id, u.sex, u.email, u.avatar, u.phonenumber, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader 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">
|
|
|
|
|
@ -67,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="userName != null and userName != ''">
|
|
|
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pcId != null "> AND u.pc_id = #{pcId}</if>
|
|
|
|
|
<if test="status != null and status != ''">
|
|
|
|
|
AND u.status = #{status}
|
|
|
|
|
</if>
|
|
|
|
|
@ -87,7 +89,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
|
|
|
|
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name,u.pc_id, u.email, u.phonenumber, u.status, u.create_time
|
|
|
|
|
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
|
|
|
|
|
@ -104,7 +106,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
|
|
|
|
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.pc_id,u.email, u.phonenumber, u.status, u.create_time
|
|
|
|
|
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
|
|
|
|
|
@ -154,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
|
|
|
|
<if test="sex != null and sex != ''">sex,</if>
|
|
|
|
|
<if test="password != null and password != ''">password,</if>
|
|
|
|
|
<if test="pcId != null">pc_id,</if>
|
|
|
|
|
<if test="status != null and status != ''">status,</if>
|
|
|
|
|
<if test="pwdUpdateDate != null">pwd_update_date,</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
|
@ -169,6 +172,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
|
|
|
|
<if test="sex != null and sex != ''">#{sex},</if>
|
|
|
|
|
<if test="password != null and password != ''">#{password},</if>
|
|
|
|
|
<if test="pcId != null">#{pcId},</if>
|
|
|
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
|
|
|
<if test="pwdUpdateDate != null">#{pwdUpdateDate},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
|
@ -187,6 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
|
|
|
|
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
|
|
|
|
<if test="password != null and password != ''">password = #{password},</if>
|
|
|
|
|
<if test="pcId != null">pc_id = #{pcId},</if>
|
|
|
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
|
|
|
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
|
|
|
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
|
|
|
|
|