SysRolePageLkMapper.xml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.ubitech.ttc.dao.SysRolePageLkMapper">
  4. <!-- 开启二级缓存 -->
  5. <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
  6. <select id="getRolePageList" resultType="cn.ubitech.ttc.model.user.RolePageModel">
  7. SELECT
  8. DISTINCT sp.*,rp.pagecode
  9. FROM sys_role_page_lk rp
  10. INNER JOIN sys_page sp
  11. ON rp.lkid = sp.id
  12. AND sp.isenabled = 1
  13. INNER JOIN sys_page_section_lk ps
  14. ON ps.pageid = sp.id
  15. AND ps.isenabled = 1
  16. WHERE rp.isenabled = 1
  17. AND sp.funid = #{funid}
  18. AND rp.comefrom = #{comefrom}
  19. AND rp.roleid IN
  20. <foreach collection="roleidList" item="id" index="index"
  21. open="(" close=")" separator=",">
  22. #{id}
  23. </foreach>;
  24. </select>
  25. <select id="getRolePageSectionList" resultType="cn.ubitech.ttc.entity.SysSection">
  26. SELECT
  27. DISTINCT ss.*
  28. FROM sys_page_section_lk ps
  29. INNER JOIN sys_section ss
  30. ON ss.id = ps.secid
  31. AND ss.isenabled = 1
  32. WHERE ps.pageid = #{id}
  33. AND ps.isenabled = 1;
  34. </select>
  35. </mapper>