You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.5 KiB

3 years ago
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.iteaj.iboot.msn.core.mapper.IMenuDao">
  6. <resultMap type="com.iteaj.iboot.msn.core.entity.Menu" id="OriMap">
  7. <id property="id" column="id" />
  8. <result property="name" column="name" />
  9. <result property="pid" column="pid" />
  10. <result property="sort" column="sort" />
  11. <result property="url" column="url" />
  12. <result property="log" column="log" />
  13. <result property="type" column="type" />
  14. <result property="icon" column="icon" />
  15. <result property="perms" column="perms" />
  16. <result property="remark" column="remark" />
  17. <result property="createTime" column="create_time" />
  18. <result property="updateTime" column="update_time" />
  19. </resultMap>
  20. <select id="selectAdminMenus" resultType="String">
  21. select a.id from sys_menu a
  22. left join sys_role_menu rm on a.id = rm.mid
  23. left join sys_admin_role ar on rm.rid=ar.rid
  24. where a.status != 'disabled' and ar.aid=#{aid}
  25. </select>
  26. <select id="selectPermissions" resultType="java.lang.String">
  27. select a.perms from sys_menu a
  28. left join sys_role_menu rm on a.id = rm.mid
  29. left join sys_admin_role ar on rm.rid=ar.rid
  30. where a.status != 'disabled' and a.type != 'M' and ar.aid=#{adminId}
  31. </select>
  32. </mapper>