feat;增加角色模块

This commit is contained in:
曾文豪
2024-06-25 18:32:08 +08:00
parent 80cd48b97c
commit d2229e0028
24 changed files with 350 additions and 111 deletions

View File

@@ -32,4 +32,31 @@
${ew.customSqlSegment}
</select>
<select id="getAllAuthorityByUserId" resultType="com.tiesheng.role.pojos.dao.CoreRoleAuthority">
select *
from core_role_authority
where id in (select type_id
from core_role_user
where type = 'menu'
and user_id = #{userId}
union
select crgr.menu_id
from core_role_user cru
left join core_role_group_rx crgr on crgr.group_id = cru.type_id
where type = 'job'
and user_id = #{userId}
<if test="roleId != null and roleId != ''">
union
select menu_id
from core_role_group_rx
where group_id = #{roleId}
</if>
)
</select>
</mapper>