/** * Copyright (c) 2016-2019 人人开源 All rights reserved. * * https://www.machine.io * * 版权所有,侵权必究! */ package api.dao; import api.bean.SysUserRoleEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; /** * 用户与角色对应关系 * * @author Mark sunlightcs@gmail.com */ @Mapper public interface SysUserRoleDao extends BaseMapper { // /** // * 根据用户ID,获取角色ID列表 // */ // List queryRoleIdList(Long userId); /** * 根据用户ID,获取角色ID列表 */ @Select("select role_id from sys_user_role where user_id = #{userId}") Long queryRoleId(@Param("userId")Long userId); /** * 根据角色ID数组,批量删除 */ int deleteBatch(Long[] roleIds); }