package com.wsk.travelf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wsk.travelf.pojo.Admin;
import com.wsk.travelf.pojo.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper extends BaseMapper<Admin> {

    //根据用户id查询用户详情
    Admin findDesc(Integer aid);

    //删除用户的所有角色
    void deleteAdminAllRoles(Integer aid);

    //给用户添加角色
    void addAdminRole(Integer aid,Integer rid);

    //根据用户名查询权限
    List<Permission> findAllPermission(String username);
}
