|
123456789101112 |
- <?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.tuoheng.system.mapper.RoleMapper">
-
- <!-- 获取用户角色 -->
- <select id="getRolesByUserId" resultType="com.tuoheng.system.entity.Role">
- SELECT r.* FROM sys_role AS r
- INNER JOIN sys_user_role AS ur ON r.id=ur.role_id
- WHERE ur.user_id=#{userId} AND r.mark=1;
- </select>
-
- </mapper>
|