package com.zhentao.mapper;

import com.zhentao.entity.AdminUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 联想
* @description 针对表【admin_user_role(用户角色关联表)】的数据库操作Mapper
* @createDate 2025-12-11 16:08:57
* @Entity com.zhentao.entity.AdminUserRole
*/
public interface AdminUserRoleMapper extends BaseMapper<AdminUserRole> {
    
    /**
     * 根据用户ID查询角色ID列表
     */
    List<Integer> selectRoleIdsByUserId(@Param("userId") Integer userId);
    
    /**
     * 根据用户ID删除所有角色关联
     */
    int deleteByUserId(@Param("userId") Integer userId);
}




