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.CsMarketDataClientFallbackFactory;
import com.njcn.csdevice.pojo.vo.CsMarketDataVO;
import org.springframework.cloud.openfeign.FeignClient;
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 = "/csMarketData", fallbackFactory = CsMarketDataClientFallbackFactory.class,contextId = "csMarketData")
public interface CsMarketDataFeignClient {

    @PostMapping("/insert")
    HttpResult<Boolean> insertData(@RequestParam("userId")String userId, @RequestParam("engineeringId")String engineeringId);

    @PostMapping("/queryByUseId")
    HttpResult<List<CsMarketDataVO>> queryByUseId(@RequestParam("userId")String userId);

}
