package com.gci.boot.modules.system.mapper;

import com.gci.boot.modules.system.entity.SysPermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 菜单权限表 Mapper 接口
 * </p>
 *
 * @author chenzhiwei
 * @since 2023-08-18
 */
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    /**
     *   根据用户查询用户权限
     */
    List<SysPermission> queryByUser(@Param("username") String username);

    /**
     * 根据角色id查询权限编码
     * @param roleIds
     * @return
     */
    Set<String> getPermCodeSetByroleIds(@Param("roleIds") Collection<String> roleIds);
}
