package com.mosty.common.core.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mosty.common.base.constant.enums.MenuTypeEnum;
import com.mosty.common.core.business.entity.SysMenu;
import com.mosty.common.core.business.entity.vo.AddSysMenuVO;
import com.mosty.common.core.business.entity.vo.MenuPage;
import com.mosty.common.core.business.entity.vo.MenuQuery;
import com.mosty.common.core.login.LoginResponseVO;
import io.swagger.annotations.ApiOperation;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 菜单表 服务类
 * </p>
 *
 * @author kevin
 * @since 2022-02-12
 */
public interface SysMenuService extends IService<SysMenu> {

    @ApiOperation("分页查询菜单信息")
    IPage<SysMenu> selectByPage(MenuPage menuPage);

    @ApiOperation("添加菜单信息")
    void addSysMenuInfo(AddSysMenuVO addSysMenuVo, SysMenu parentMenu);

    @ApiOperation("登录返回权限")
    List<SysMenu> listByType(Set<Long> menuIds, MenuTypeEnum menuGroup, LoginResponseVO loginResponseVO);

    @ApiOperation("根据菜单id查询子集")
    SysMenu getMenuChild(Long menuId);

    @ApiOperation("查询树形结构")
    List<SysMenu> selectList(MenuQuery menuQuery);
}
