| | |
| | | left join sys_role t2 on t1.role_id = t2.role_id |
| | | where t1.user_id = #{userId} |
| | | </select> |
| | | <select id="selectRoleByUserIds" resultType="com.ruoyi.common.core.domain.entity.SysRole"> |
| | | select |
| | | a.user_id as role_id, |
| | | b.nick_name as role_name |
| | | from sys_user_role a |
| | | left join sys_user b on a.user_id = b.user_id |
| | | where a.role_id in |
| | | <foreach item="item" index="index" collection="roleIds" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId"> |
| | | insert into sys_role( |