|
@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
select u.id,u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phone_num, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time,u.update_by,u.update_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'
|
|
|
+ where u.del_flag = '1'
|
|
|
<if test="id != null and id != 0">
|
|
|
AND u.id = #{id}
|
|
|
</if>
|
|
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
|
left join sys_role r on r.role_id = ur.role_id
|
|
|
- where u.del_flag = '0' and r.role_id = #{roleId}
|
|
|
+ where u.del_flag = '1' and r.role_id = #{roleId}
|
|
|
<if test="userName != null and userName != ''">
|
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
|
</if>
|
|
@@ -115,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
left join sys_user_role ur on u.id = ur.user_id
|
|
|
left join sys_role r on r.role_id = ur.role_id
|
|
|
- where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
|
|
+ where u.del_flag = '1' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
|
|
and u.id not in (select u.id from sys_user u inner join sys_user_role ur on u.id = ur.user_id and ur.role_id = #{roleId})
|
|
|
<if test="userName != null and userName != ''">
|
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
@@ -129,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
|
|
|
<include refid="selectUserVo"/>
|
|
|
- where u.user_name = #{userName} and u.del_flag = '0'
|
|
|
+ where u.user_name = #{userName} and u.del_flag = '1'
|
|
|
</select>
|
|
|
|
|
|
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
|
|
@@ -138,15 +138,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
|
|
|
- select id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
|
|
|
+ select id, user_name from sys_user where user_name = #{userName} and del_flag = '1' limit 1
|
|
|
</select>
|
|
|
|
|
|
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
|
|
- select id, phone_num from sys_user where phone_num = #{phoneNum} and del_flag = '0' limit 1
|
|
|
+ select id, phone_num from sys_user where phone_num = #{phoneNum} and del_flag = '1' limit 1
|
|
|
</select>
|
|
|
|
|
|
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
|
|
- select id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
|
|
+ select id, email from sys_user where email = #{email} and del_flag = '1' limit 1
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="id">
|
|
@@ -267,7 +267,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectUserByUserId" parameterType="string" resultType="SysUser">
|
|
|
select *
|
|
|
- from system_user
|
|
|
+ from sys_user
|
|
|
where user_id = #{userId}
|
|
|
AND del_flag = 1
|
|
|
AND status = 1
|