xm
2024-06-14 722af26bc6fec32bb289b1df51a9016a4935610f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?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.dl.system.mapper.SysUserRoleMapper">
 
    <resultMap type="SysUserRole" id="SysUserRoleResult">
        <result property="userId" column="user_id"/>
        <result property="roleId" column="role_id"/>
    </resultMap>
    <select id="selectUserIdsByRoleId" resultType="string">
        select u.user_id from sys_user u
        inner join sys_user_role sur
            on u.user_id = sur.user_id and sur.role_id = #{roleId}
    </select>
 
</mapper>