package com.huiju.estateagents.center.taUser.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.huiju.estateagents.entity.SysMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @author weicc
 * @Title: TaUserAuthMenuMapper
 * @Description: TODO
 * @date 2019/9/21
 */
@Mapper
public interface TaUserAuthMenuMapper extends BaseMapper<SysMenu> {
    /**
     * 根据用户Id查询菜单列表
     * @param userId
     * @return
     */
    List<SysMenu> sysMenuListByUserId(@Param("userId")String userId);


    /**
     * 查询菜单列表
     * @return
     */
    List<SysMenu> sysMenuListByRoleId();

    /**
     * 删除授权的菜单
     * @param userId
     */
    void deleteUserAuthMenu(@Param("userId") Integer userId);

    /**
     * 新增授权的菜单
     * @param userId
     */
    void addUserAuthMenu(@Param("userId") Integer userId, @Param("sysMenus") List<SysMenu> sysMenuList);
}
