package com.huiju.estateagents.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huiju.estateagents.entity.SysMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 菜单表 不同系统,菜单不一致 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-09-11
 */
@Mapper
public interface SysMenuMapper extends BaseMapper<SysMenu> {
    List<SysMenu> getUserModules(@Param("userId") Integer userId);

    Integer deleteAdminBtns(@Param("menus") List<Integer> menus, @Param("orgId") Integer orgId, @Param("roleId") Integer roleId);
    Integer deleteAdminMenus(@Param("menus") List<Integer> menus, @Param("orgId") Integer orgId, @Param("roleId") Integer roleId);

    Integer insertAdminMenus(@Param("menus") List<Integer> menus, @Param("roleId") Integer roleId);
    Integer insertAdminBtns(@Param("menus") List<Integer> menus, @Param("roleId") Integer roleId);
}
