package com.chushang.system.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chushang.system.entity.dto.ListMenuDTO;
import com.chushang.system.entity.po.SysMenu;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2022-08-18
 */
public interface SysMenuMapper extends BaseMapper<SysMenu> {
    Set<String> selectMenuPermsByUserId(Long userId);

    List<SysMenu> selectMenuList(ListMenuDTO menu);

    List<SysMenu> selectMenuListByUserId(ListMenuDTO menu);

    List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId,
                                         @Param("menuCheckStrictly") boolean menuCheckStrictly);

    List<SysMenu> selectMenuTreeAll();


    List<SysMenu> selectMenuTreeByUserId(Long userId);

    Set<String> selectMenuPermsByRoleId(@Param("roleId") Long roleId);
}
