12345678910111213141516171819202122232425262728293031323334353637 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="cn.ubitech.ttc.dao.SysRolePageLkMapper">
- <!-- 开启二级缓存 -->
- <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
- <select id="getRolePageList" resultType="cn.ubitech.ttc.model.user.RolePageModel">
- SELECT
- DISTINCT sp.*,rp.pagecode
- FROM sys_role_page_lk rp
- INNER JOIN sys_page sp
- ON rp.lkid = sp.id
- AND sp.isenabled = 1
- INNER JOIN sys_page_section_lk ps
- ON ps.pageid = sp.id
- AND ps.isenabled = 1
- WHERE rp.isenabled = 1
- AND sp.funid = #{funid}
- AND rp.comefrom = #{comefrom}
- AND rp.roleid IN
- <foreach collection="roleidList" item="id" index="index"
- open="(" close=")" separator=",">
- #{id}
- </foreach>;
- </select>
- <select id="getRolePageSectionList" resultType="cn.ubitech.ttc.entity.SysSection">
- SELECT
- DISTINCT ss.*
- FROM sys_page_section_lk ps
- INNER JOIN sys_section ss
- ON ss.id = ps.secid
- AND ss.isenabled = 1
- WHERE ps.pageid = #{id}
- AND ps.isenabled = 1;
- </select>
- </mapper>
|