package com.hs.admin.service;

import com.hs.admin.model.SysMenu;
import com.hs.admin.model.reqmodel.MenuReq;
import com.hs.admin.model.respmodel.SysMenuList;
import com.hs.admin.model.respmodel.SysRoleMenuRsList;
import com.hs.admin.model.respmodel.SysUserMenuRsList;

import java.util.List;

public interface SysMenuService {

    //顶级菜单的父级id
    final static Integer MENU_TOP_PARENT_ID = 0;

    List<SysMenuList> getMenu(Integer userId) throws Exception;

    List<SysMenuList> getParentAll(MenuReq.GetMenuReq menu);

    List<SysMenu> getAll();

    SysMenu info(MenuReq.InfoMenuReq menu);

    boolean addMenu(Long userId,MenuReq.AddMenuReq menu);

    boolean deleteMenu(MenuReq.DeleteMenuReq menu);

    boolean updateMenu(MenuReq.UpdateMenuReq menu);

    List<SysUserMenuRsList> getUserMenu(Integer userId);

    boolean saveUserMenu(Long userId,MenuReq.SaveUserMenuReq menu);

    List<SysRoleMenuRsList> getRoleMenu(Integer roleId);

    boolean saveRoleMenu(Long userId,MenuReq.SaveRoleMenuReq menu);

    boolean updateSort(Long userId,MenuReq.UpdateSortReq menu);
}
