package com.fs.hospital.service;

import java.util.Collection;
import java.util.List;

import com.fs.company.domain.CompanyMenu;
import com.fs.company.domain.CompanyMenuTreeSelect;
import com.fs.hospital.domain.HospitalMenu;
import com.fs.hospital.domain.HospitalMenuTreeSelect;
import com.fs.hospital.vo.RouterVO;

/**
 * 菜单权限Service接口
 *
 * @author fs
 * @date 2024-02-26
 */
public interface IHospitalMenuService
{
    /**
     * 查询菜单权限
     *
     * @param menuId 菜单权限主键
     * @return 菜单权限
     */
    public HospitalMenu selectHospitalMenuByMenuId(Long menuId);

    /**
     * 查询菜单权限列表
     *
     * @param hospitalMenu 菜单权限
     * @return 菜单权限集合
     */
    public List<HospitalMenu> selectHospitalMenuList(HospitalMenu hospitalMenu);

    /**
     * 新增菜单权限
     *
     * @param hospitalMenu 菜单权限
     * @return 结果
     */
    public int insertHospitalMenu(HospitalMenu hospitalMenu);

    /**
     * 修改菜单权限
     *
     * @param hospitalMenu 菜单权限
     * @return 结果
     */
    public int updateHospitalMenu(HospitalMenu hospitalMenu);

    /**
     * 批量删除菜单权限
     *
     * @param menuIds 需要删除的菜单权限主键集合
     * @return 结果
     */
    public int deleteHospitalMenuByMenuIds(Long[] menuIds);

    /**
     * 删除菜单权限信息
     *
     * @param menuId 菜单权限主键
     * @return 结果
     */
    public int deleteHospitalMenuByMenuId(Long menuId);

    Collection<String> selectMenuPermsByUserId(Long userId);

    List<HospitalMenu> selectMenuTreeByUserId(Long userId, boolean admin);

    List<RouterVO> buildMenus(List<HospitalMenu> menus);

    List<HospitalMenu> selectMenuList(HospitalMenu menu, Long userId, String userType);

    List<HospitalMenuTreeSelect> buildMenuTreeSelect(List<HospitalMenu> menus);


    boolean checkMenuExistRole(Long menuId);

    boolean hasChildByMenuId(Long menuId);

    List<Integer> selectMenuListByRoleId(Long roleId);

    List<HospitalMenu> buildMenuTree(List<HospitalMenu> menus);
}
