add
This commit is contained in:
@ -73,7 +73,8 @@
|
||||
</select>
|
||||
|
||||
<select id="selectExportData" resultMap="ExportData">
|
||||
select t1.user_id, t1.username, t1.nickname, t1.email, t1.phone, t1.gender, t1.status,t1.create_time, t2.dept_name,t4.role_name,t6.post_name
|
||||
select t1.user_id, t1.username, t1.nickname, t1.email, t1.phone, t1.gender, t1.status,t1.create_time,
|
||||
t2.dept_name,t4.role_name,t6.post_name
|
||||
from sys_user t1
|
||||
left join sys_dept t2 on t1.dept_id = t2.dept_id
|
||||
left join sys_user_role t3 on t1.user_id = t3.user_id
|
||||
@ -124,14 +125,16 @@
|
||||
</select>
|
||||
|
||||
<select id="selectUnAllocatedList" resultMap="SysUserVoResult">
|
||||
select distinct t1.user_id, t2.dept_name, t1.username, t1.nickname, t1.email, t1.phone, t1.status, t1.create_time
|
||||
select distinct t1.user_id, t2.dept_name, t1.username, t1.nickname, t1.email, t1.phone, t1.status,
|
||||
t1.create_time
|
||||
from sys_user t1
|
||||
left join sys_dept t2 on t1.dept_id = t2.dept_id
|
||||
left join sys_user_role t3 on t1.user_id = t3.user_id
|
||||
left join sys_role t4 on t4.role_id = t3.role_id
|
||||
where (t4.role_id != #{param.roleId} or t4.role_id IS NULL)
|
||||
and t1.user_id not in (select t1.user_id from sys_user t1 inner join sys_user_role t3 on t1.user_id = t3.user_id and
|
||||
t3.role_id = #{param.roleId})
|
||||
where (t4.role_id != #{param.roleId} or t4.role_id IS NULL)
|
||||
and t1.user_id not in (select t1.user_id from sys_user t1 inner join sys_user_role t3 on t1.user_id = t3.user_id
|
||||
and
|
||||
t3.role_id = #{param.roleId})
|
||||
<if test="param.username != null and param.username != ''">
|
||||
AND t1.username like concat('%', #{param.username}, '%')
|
||||
</if>
|
||||
@ -155,7 +158,7 @@
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkEmailUnique" resultType="int">
|
||||
<select id="checkEmailUnique" resultType="int">
|
||||
select count(*) from sys_user where email = #{email}
|
||||
<if test="userId != null and userId != ''">and user_id != #{userId}</if>
|
||||
limit 1
|
||||
|
||||
@ -13,6 +13,15 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectRoleKeysByUserId" resultType="string">
|
||||
select t2.role_key from sys_user_role t1
|
||||
left join sys_role t2 on t2.role_id = t1.role_id
|
||||
where t1.user_id = #{userId}
|
||||
<if test="status != null and status != ''">
|
||||
and t2.status = #{status}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByRoleIdAndUserIds">
|
||||
delete from sys_user_role where role_id = #{roleId} and user_id in
|
||||
<foreach collection="list" item="userId" open="(" separator="," close=")">
|
||||
|
||||
Reference in New Issue
Block a user