package com.yuchen.saas.parking.api.feign;

import com.yuchen.saas.parking.api.entity.IotBatIntegratedDevice;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * @author 吕海泉
 * @create 2020/12/15 0:07
 */
@FeignClient(
		value = AppNameConstant.SAAS_PARKING,
		fallback = IntegratedClientFallback.class
)
public interface IntegratedClient {
	
	/**
	 * 通过监控点获取设备信息
	 */
	@GetMapping("/pointInfo/getDeviceByCameraCode")
	R<IotBatIntegratedDevice> getDeviceByCameraCode(@RequestParam("cameraIndexCode") String cameraIndexCode);

	/**
	 * 根据pk 查询设备列表
	 */

	@GetMapping("/integrated/find/allDevices")
	R<List<IotBatIntegratedDevice>> getAllDevices(@RequestParam("productKey") String productKey);

	/**
	 * 根据pk 查询设备列表
	 */
	@GetMapping("/integrated/getDeviceInfoByDeviceId")
	IotBatIntegratedDevice getDeviceInfoByDeviceId(@RequestParam("productKey") String deviceId);
}
