mirror of
https://github.com/RemainderTime/spring-boot-base-demo.git
synced 2026-02-06 15:10:56 +08:00
32 lines
1.4 KiB
XML
32 lines
1.4 KiB
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="cn.xf.basedemo.mappers.SysPermissionMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="cn.xf.basedemo.model.domain.SysPermission">
|
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
|
<result property="code" column="code" jdbcType="VARCHAR"/>
|
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
<result property="menu_id" column="menu_id" jdbcType="BIGINT"/>
|
|
<result property="create_time" column="create_time" jdbcType="TIMESTAMP"/>
|
|
<result property="create_by" column="create_by" jdbcType="VARCHAR"/>
|
|
<result property="update_time" column="update_time" jdbcType="TIMESTAMP"/>
|
|
<result property="update_by" column="update_by" jdbcType="VARCHAR"/>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id,code,name,
|
|
menu_id,create_time,create_by,
|
|
update_time,update_by
|
|
</sql>
|
|
|
|
<select id="getPermissionListByRoleId" resultType="java.lang.String">
|
|
select code
|
|
from sys_permission p
|
|
left join sys_role_permission rp on p.id = rp.permission_id
|
|
left join sys_user_role ur on rp.role_id = ur.role_id
|
|
where ur.user_id = #{userId}
|
|
</select>
|
|
</mapper>
|