package com.blueland.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.blueland.bo.MenuEntity;
import com.blueland.model.TPfMenu;

import java.util.List;
import java.util.Map;

/**
 * @auther xcy
 * @create 2022-05-09 13:53
 */
public interface IMenuService extends IService<TPfMenu> {

    List<MenuEntity> findAppIdMenuList(String appId);

    List<MenuEntity> getMenu(String appId, String userId, String menuType,
                             String menuId);

    List<MenuEntity> getMenuIsOpenStatus(String appId);

    List<MenuEntity> getMenuList(String appId, String menuName,String parentName, String menuType);

    List<MenuEntity> getMenuChildren(String appId, String menuName,String parentName, String menuType);

    List<MenuEntity> getMenuAll(String appId, String menuName,String parentName, String menuType);

    List<MenuEntity> getParent(String menuId,String appId);

    List<MenuEntity> listRoleMenu(String roleId,String appId);

    int getMenuLevel(String menuParentId);

    List<MenuEntity> getMenuCode(String menuCode, String userId,String appId,String menuType);

    Map<String,Object> getButton(String appId, String userId, String menuCode);

    List<MenuEntity> getMenuByRoleIdAndAppId(String appId,String roleId);

    List<MenuEntity> getMenuListByStaffcode(String appId, String staffCode);

    List<MenuEntity> getParentByStaffcode(String menuId, String appId, String staffCode);

    TPfMenu get(MenuEntity bo);

    Page<MenuEntity> findPage(MenuEntity bo);

    // 6.0.0

    /**
     * 根据岗位id获取菜单
     * @return
     */
    List<MenuEntity> getMenuByPostCode(String appId, String postCode, String menuType, String menuId);

    /**
     * 根据菜单ID、员工ID查询有权限访问的菜单列表资源
     * @param menuCode
     * @param appId
     * @param menuType
     * @return
     */
    List<MenuEntity> getMenuBuCode(String menuCode, String postCode,String appId,String menuType);

    /**
     * 获取按钮资源
     * @param appId
     * @param postCode
     * @param menuCode
     * @return
     */
    Map<String,Object> getButtonByCode(String appId, String postCode, String menuCode);

    List<MenuEntity> getMenListByAppId(String appId);

    void deleteMenuByAppId(String appId);
}
