package com.boman.system.api;

import com.boman.domain.constant.ServiceNameConstants;
import com.boman.domain.SysMenu;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author shiqian
 * @date 2021年04月07日 10:31
 **/
@FeignClient(contextId = "remoteMenuService", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteMenuService {

    /**
     * 功能描述: 根据userId查找此人的所有菜单
     *
     * @param userId userId
     * @return java.util.List<com.boman.domain.SysMenu>
     */
    @GetMapping("/menu/listMenusByUserId/{userId}")
    List<SysMenu> listMenusByUserId(@PathVariable("userId") Long userId);

    /**
     * 根据用户ID查询按钮
     *
     * @param userId 用户ID
     * @return 菜单列表
     */
    @GetMapping("/menu/listBtnByUserId/{userId}")
    List<SysMenu> listBtnByUserId(@PathVariable("userId") Long userId);
}

