package com.itbaizhan.trave.mapper;

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

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    //查询用户拥有的角色的ID
    List<Integer> findRoleByAdmin(Integer aid);
    //删除用户所有权限
    void deleteRoleAllPermissions(Integer rid);
    //给用户添加权限
    void addRolePermissions(@Param("rid") Integer rid,
                        @Param("pid") Integer pid);

}
