25 lines
975 B
XML
25 lines
975 B
XML
<?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.njzscloud.dispose.sys.resource.mapper.ResourceMapper">
|
|
<select id="occupied" resultType="java.lang.String">
|
|
SELECT DISTINCT c.role_name
|
|
FROM sys_resource a
|
|
INNER JOIN sys_role_resource b ON b.res_id = a.id
|
|
INNER JOIN sys_role c ON c.id = b.role_id
|
|
<if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
|
|
${ew.customSqlSegment}
|
|
</if>
|
|
</select>
|
|
<select id="listRoleRes" resultType="com.njzscloud.dispose.sys.resource.pojo.entity.ResourceEntity">
|
|
SELECT a.id,
|
|
a.sn,
|
|
a.table_name,
|
|
a.data_id,
|
|
a.memo
|
|
FROM sys_resource a
|
|
INNER JOIN sys_role_resource b ON b.res_id = a.id
|
|
WHERE b.role_id = ${roleId}
|
|
</select>
|
|
</mapper>
|