| | |
| | | |
| | | <select id="getUserMenuList" resultType="com.zt.modules.sys.model.SysMenu"> |
| | | select t1.* |
| | | from SYS_MENU t1 |
| | | from sys_menu t1 |
| | | where t1.is_delete =0 |
| | | <if test="userId != null and userId != 0"> |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU t2, SYS_ROLE_USER t3 |
| | | from sys_role_menu t2, sys_role_user t3 |
| | | where t3.user_id=#{userId} |
| | | and t2.is_delete=0 |
| | | and t3.is_delete=0 |
| | |
| | | union all |
| | | select menu_id |
| | | from sys_role_menu s1,sys_role s2 |
| | | where s1.role_id = s2.id and s2.code='base' |
| | | where s1.role_id = s2.id and s2.code='base' and s1.is_delete=0 and s2.is_delete=0 |
| | | ) |
| | | </if> |
| | | <if test="tenantId != null and tenantId != 0"> |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU t4 |
| | | from sys_role_menu t4 |
| | | where t4.role_id = #{tenantId} |
| | | and t4.is_delete=0 |
| | | ) |
| | |
| | | |
| | | <select id="getUserMenuListExcept" resultType="com.zt.modules.sys.model.SysMenu"> |
| | | select t1.* |
| | | from SYS_MENU t1 |
| | | from sys_menu t1 |
| | | where t1.is_delete =0 |
| | | <if test="userId != null and userId != 0"> |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU_EXCEPT t2, SYS_ROLE_USER t3 |
| | | from sys_role_menu_except t2, sys_role_user t3 |
| | | where t3.user_id=#{userId} |
| | | and t2.is_delete=0 |
| | | and t3.is_delete=0 |
| | |
| | | </if> |
| | | <if test="tenantId != null and tenantId != 0"> |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU t4 |
| | | from sys_role_menu t4 |
| | | where t4.role_id = #{tenantId} |
| | | and t4.is_delete=0 |
| | | ) |
| | |
| | | |
| | | <select id="getUserMenuListComm" resultType="com.zt.modules.sys.model.SysMenu"> |
| | | select t1.* |
| | | from SYS_MENU t1 |
| | | from sys_menu t1 |
| | | where t1.is_delete =0 |
| | | and t1.id in (select menu_id |
| | | from SYS_ROLE_MENU t2, SYS_ROLE t3 |
| | | from sys_role_menu t2, sys_role t3 |
| | | where t2.is_delete=0 |
| | | and t3.is_delete=0 |
| | | and t2.role_id = t3.id |
| | |
| | | </select> |
| | | |
| | | <select id="getPermissionsList" resultType="java.lang.String"> |
| | | select permissions from SYS_MENU |
| | | select permissions from sys_menu |
| | | </select> |
| | | |
| | | <select id="getSystems" resultType="com.zt.modules.sys.model.SysMenu"> |
| | | select menu_id as id, sys_id as pid, sys_name as name, menu_name as remark ,url,ICON,type,ICON_NO |
| | | from SYS_MENU_HOME where is_delete=0 |
| | | select menu_id as id, sys_id as pid, sys_name as name, menu_name as remark ,url,icon,type,icon_no |
| | | from sys_menu_home where is_delete=0 |
| | | <if test="type != null and type != 0"> |
| | | and TYPE = #{type} |
| | | and type = #{type} |
| | | </if> |
| | | order by SORT |
| | | order by sort |
| | | </select> |
| | | </mapper> |