package com.usky.system;

import com.usky.system.factory.RemoteDeptFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

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

/**
 * @author han
 * @date 2023/12/08 10:51
 */
@FeignClient(contextId = "remoteDeptService", value = "usky-system", fallbackFactory = RemoteDeptFallbackFactory.class)
public interface RemoteDeptService {
    /**
     * 获得所有部门
     *
     * @return 部门数组
     */
    @GetMapping("/getDeptList")
    List<Map<String, Object>> getDeptList(@RequestParam("tenantId") Integer tenantId);
}
