package com.ycwl.basic.mapper;

import com.ycwl.basic.model.pc.menu.MenuNode;
import com.ycwl.basic.model.pc.menu.entity.MenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MenuMapper {
    /**
     * 根据角色id删除角色菜单
     * @param roleId 角色id
     * @return
     */
    int deleteRoleMenuByRoleId(@Param("id")String roleId);
    int addRoleMenu(@Param("id")String roleId,@Param("list") List<Integer> list);
    int add(MenuEntity menuEntity);

    List<MenuNode>getListByType(@Param("type")Integer type);

    int update(MenuEntity menuEntity);
    int deleteById(@Param("id")Long id);

    /**
     * 根据菜单id删除角色菜单
     * @param menuId
     * @return
     */
    int deleteRoleMenuByMenuId(@Param("id")String menuId);
}
