mirror of
https://github.com/RemainderTime/spring-boot-base-demo.git
synced 2026-02-26 16:10:46 +08:00
31 lines
1.3 KiB
XML
31 lines
1.3 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.SysRoleMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="cn.xf.basedemo.model.domain.SysRole">
|
|
<id property="id" column="id" jdbcType="BIGINT"/>
|
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
<result property="code" column="code" jdbcType="VARCHAR"/>
|
|
<result property="status" column="status" jdbcType="TINYINT"/>
|
|
<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,name,code,
|
|
status,create_time,create_by,
|
|
update_time,update_by
|
|
</sql>
|
|
|
|
<select id="getRoleListByUserId" resultType="java.lang.String">
|
|
select r.code
|
|
from sys_user_role ur
|
|
left join sys_role r on ur.role_id = r.id
|
|
where ur.user_id = #{userId}
|
|
</select>
|
|
</mapper>
|