package com.inspect.system.mapper;

import com.inspect.system.domain.SysMenu;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface SysMenuMapper {
    List<SysMenu> selectMenuList(SysMenu sysMenu);

    List<SysMenu> selectMenuListAndFilter(SysMenu sysMenu);

    List<String> selectMenuPerms();

    List<SysMenu> selectMenuListByUserId(SysMenu sysMenu);

    List<String> selectMenuPermsByUserId(Long userId);

    List<SysMenu> selectMenuTreeAll();

    List<SysMenu> selectMenuTreeByUserId(Long userId);

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

    SysMenu selectMenuById(Long id);

    int hasChildByMenuId(Long menuId);

    int insertMenu(SysMenu sysMenu);

    int updateMenu(SysMenu sysMenu);

    int deleteMenuById(Long id);

    SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId);
}
