Sfoglia il codice sorgente

普通用户或者租户管理员只能看租户菜单

wangyangyang 4 anni fa
parent
commit
f2fc4c4a58
1 ha cambiato i file con 6 aggiunte e 6 eliminazioni
  1. 6 6
      user_center/src/main/resources/mapper/MenuMapper.xml

+ 6 - 6
user_center/src/main/resources/mapper/MenuMapper.xml

@@ -122,7 +122,7 @@
         from uims_tenant_menu  a
         inner join uims_menu b on a.MENU_ID=b.id and b.STATUS=1
         <where>
-            a.status=1
+            a.status=1   and b.is_tenant=1
             <if test="name != null  and name != ''">
                 and a.MENU_NAME LIKE concat('%',#{name},'%')
             </if>
@@ -193,7 +193,7 @@
             and a.tenant_id = #{tenantId}
         </if>
         <where>
-            a.status=1  and  userrole.status=1
+            a.status=1  and  userrole.status=1  and b.is_tenant=1
             <if test="name != null  and name != ''">
                 and a.MENU_NAME LIKE concat('%',#{name},'%')
             </if>
@@ -243,7 +243,7 @@
         from uims_tenant_menu b
         inner join uims_menu a on a.id= b.MENU_ID and a.status=1
         <where>
-            b.status=1 and a.PARENT_MENU_ID=0 and a.show_state=1
+            b.status=1 and a.PARENT_MENU_ID=0 and a.show_state=1 and a.is_tenant=1
             <if test="tenantId != null  and tenantId != ''">
                 and b.tenant_id = #{tenantId}
             </if>
@@ -275,7 +275,7 @@
             and b.tenant_id = #{tenantId}
         </if>
         <where>
-            userrole.status=1 and a.PARENT_MENU_ID=0 and a.SHOW_STATE=1
+            userrole.status=1 and a.PARENT_MENU_ID=0 and a.SHOW_STATE=1 and a.is_tenant=1
             <if test="userId != null  and userId != ''">
                 and userrole.user_id = #{userId}
             </if>
@@ -316,7 +316,7 @@
         from uims_tenant_menu b
         inner join uims_menu a on a.id= b.MENU_ID and a.status=1
         <where>
-            b.status=1  and a.SHOW_STATE=1
+            b.status=1  and a.SHOW_STATE=1  and a.is_tenant=1
             <if test="appId != null  and appId != ''">
                 and a.app_id = #{appId}
             </if>
@@ -351,7 +351,7 @@
             and b.tenant_id = #{tenantId}
         </if>
         <where>
-            userrole.status=1  and a.SHOW_STATE=1
+            userrole.status=1  and a.SHOW_STATE=1 and a.is_tenant=1
             <if test="userId != null  and userId != ''">
                 and userrole.user_id = #{userId}
             </if>