package com.storlead.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.storlead.system.pojo.entity.MenuEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 菜单 Mapper 接口
 * <p>
 *
 * @Author: Steve
 * @Since：   2019-01-22
 */
public interface MenuMapper extends BaseMapper<MenuEntity> {

    List<MenuEntity> queryByUsername(String userName);

    MenuEntity selectRootLastNodeInfo(@Param("pid") Long pid, @Param("appId") Long appId);

    List<MenuEntity> selectUserMenuList(@Param("userId") Long userId,@Param("appId") Long appId,@Param("modeTypes") List modeTypes,@Param("menuTypes") List menuTypes);

    Integer selectUserMenuCount(@Param("userId") Long userId);

    List<MenuEntity> selectMenuCreateTree();
}
