多租户模式下系统系统会给租户默认增加上测试的角色菜单,但是后台获取菜单时异常,无法打开相关页面 #8667

pull/8722/head
JEECG 2025-08-12 19:08:43 +08:00
parent c868496b78
commit d97e56b2f0
1 changed files with 11 additions and 10 deletions

View File

@ -28,15 +28,16 @@
,icon
,is_leaf
FROM sys_permission
WHERE 1=1
<choose>
<when test="parentId != null and parentId != ''">
AND parent_id = #{parentId,jdbcType=VARCHAR}
</when>
<otherwise>
AND parent_id is null
</otherwise>
</choose>
<where>
<choose>
<when test="parentId != null and parentId != ''">
parent_id = #{parentId,jdbcType=VARCHAR}
</when>
<otherwise>
parent_id is null
</otherwise>
</choose>
</where>
</select>
<!-- 获取登录用户拥有的权限 -->
@ -212,7 +213,7 @@
</select>
<!--根据用户名称和test角色id查询权限-->
<select id="queryPermissionByTestRoleId" resultType="org.jeecg.modules.system.entity.SysPermission">
<select id="queryPermissionByTestRoleId" resultMap="SysPermission">
SELECT p.*
FROM sys_permission p
WHERE exists(