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.CsEdDataFeignClientFallbackFactory;
import com.njcn.csdevice.pojo.po.CsEdDataPO;
import com.njcn.csdevice.pojo.vo.CsEdDataVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author xy
 */
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/edData", fallbackFactory = CsEdDataFeignClientFallbackFactory.class, contextId = "edData")
public interface CsEdDataFeignClient {

    @PostMapping("/findByDevTypeId")
    HttpResult<CsEdDataVO> findByDevTypeId(@RequestParam("devType") String devType);

    @PostMapping("/getAll")
    HttpResult<List<CsEdDataPO>> getAll(@RequestParam("devType") String devType);

    @GetMapping("/getById")
    HttpResult<CsEdDataPO> getById(@RequestParam("id") String id);
}
