This commit is contained in:
2023-05-22 17:32:08 +08:00
parent 3dc6fb7828
commit 3baba77120
25 changed files with 457 additions and 10 deletions

View File

@ -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

View File

@ -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=")">