package com.njcn.device.pq.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.device.pq.api.fallback.DeviceTreeClientFallbackFactory;
import com.njcn.device.pq.pojo.vo.TerminalTree;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * pqs
 *
 * @author cdf
 * @date 2022/1/13
 */
@FeignClient(value = ServerInfo.DEVICE, path = "/terminalTree", fallbackFactory = DeviceTreeClientFallbackFactory.class, contextId = "terminalTree")
public interface DeviceTreeClient {

    /**
     * 获取5层终端树
     */
    @GetMapping("/getTerminalTreeForFive")
    HttpResult<TerminalTree> getTerminalTreeForFive();


    @GetMapping("getTerminalTree")
    HttpResult<List<TerminalTree>> getTerminalTree();
}
