package com.njcn.csdevice.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csdevice.api.fallback.CsLineTopologyClientFallbackFactory;
import com.njcn.csdevice.pojo.po.AppLineTopologyDiagramPO;
import com.njcn.csdevice.pojo.vo.AppTopologyDiagramVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author xy
 */
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/lineTopologyDiagram", fallbackFactory = CsLineTopologyClientFallbackFactory.class,contextId = "lineTopologyDiagram")
public interface CsLineTopologyFeignClient {

    @PostMapping("/addList")
    HttpResult<String> addList(@RequestBody List<AppLineTopologyDiagramPO> list);

    @PostMapping("/queryTopologyDiagram")
    @ApiOperation("查询装置拓扑图")
    HttpResult<AppTopologyDiagramVO> queryTopologyDiagram(@RequestParam(value="devId") String devId);

}
