/**
* 文件：MenuService.java
* 版本：1.0.0
* 日期：
* Copyright &reg; 
* All right reserved.
*/

package com.mortals.xhx.base.system.menu.service;


import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ICRUDService;
import com.mortals.framework.service.IUser;
import com.mortals.xhx.base.system.menu.model.MenuEntity;

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

/**
 * <p>Title: 菜单信息</p>
 * <p>Description: MenuService service接口 </p>
 * <p>Copyright: Copyright &reg;  </p>
 * <p>Company: </p>
 * @author 
 * @version 1.0.0
 */

public interface MenuService extends ICRUDService<MenuEntity,Long> {
    /**
     * 获取所有可用菜单
     *
     * @return
     * @throws AppException
     */
    public List<MenuEntity> findAllEnable() throws AppException;

    /**
     * 查询有权限的菜单
     *
     * @param user 当前用户
     * @param urls 有权限的访问地址集合
     * @return
     * @throws AppException
     */
    public List<MenuEntity> findTreeMenu(IUser user, Set<String> urls) throws AppException;

    /**
     * 查看所有菜单
     *
     * @return
     * @throws AppException
     */
    public List<MenuEntity> findTreeMenu() throws AppException;
}