add
This commit is contained in:
@ -8,6 +8,14 @@
|
||||
select post_id from sys_user_post where user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectPostNamesByUserId" resultType="string">
|
||||
select t2.post_name
|
||||
from sys_user_post t1
|
||||
left join sys_post t2 on t1.post_id = t2.post_id
|
||||
where t1.user_id = #{userId}
|
||||
order by t2.post_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectUsedPostNameByIds" resultType="string">
|
||||
select DISTINCT t1.post_name
|
||||
from sys_post t1
|
||||
|
||||
@ -22,6 +22,15 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectRoleNamesByUserId" resultType="string">
|
||||
select t2.role_name 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