package com.diagbot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.diagbot.entity.Menu;
import com.diagbot.entity.wrapper.MenuWrapper;

import java.util.List;

/**
 * @Description: 菜单mapper
 * @Author: ztg
 * @Date: 2018/9/14 13:42
 */
public interface MenuMapper extends BaseMapper<Menu> {

    /**
     * @Description: 根据用户id获取菜单
     * @Author: ztg
     * @Date: 2018/9/14 13:57
     */
    public List<MenuWrapper> getByRole(Long userId);


    /**
     * @Description: 根据id获取子级菜单
     * @Author: ztg
     * @Date: 2018/9/14 13:59
     */
    public List<MenuWrapper> getSubMenuById(Long id);
}
