package com.itbaizhan.trave.mapper;

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

import java.util.List;

public interface AdminMapper extends BaseMapper<Admin> {
    //查询用户详情
    Admin findDesc(Integer aid);
    //删除用户所有角色
    void deleteAdminAllRole(Integer aid);
    //给用户添加角色
    void addAdminRole(@Param("aid") Integer aid,
                      @Param("rid") Integer rid);

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

}
