<?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="com.xzx.gc.role.mapper.CoreRoleFunctionMapper">
|
<select id="getRoleFunction" resultType="com.xzx.gc.entity.CoreRoleFunction">
|
select * from core_role_function where role_id in (
|
select role_id from core_user_role where user_id =#{userId} and org_id=#{orgId}
|
) and FUNCTION_ID = (select id from core_function where code=#{code})
|
</select>
|
<select id="getRoleChildrenFunction" resultType="java.util.List">
|
select sf.code from core_role_function rf left join core_function sf on rf.function_id=sf.id where rf.role_id in (
|
select role_id from core_user_role where user_id =#{userId} and org_id=#{orgId}
|
) and rf.FUNCTION_ID in (select id from core_function where parent_id= #{parentId} )
|
</select>
|
</mapper>
|
|
|