package org.springblade.third.elevator.feign;

import io.swagger.annotations.ApiOperation;
import org.springblade.core.tool.api.R;
import org.springblade.device.entity.DoorDevice;
import org.springblade.device.entity.ElevatorDevice;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
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;
import java.util.Map;

@FeignClient(value = "cyzh-third",path = "/feign/third/elevator")
public interface IThirdElevatorDeviceClient {

	/**
	 * 同步云梯信息
	 */
	@PostMapping("/sync")
	List<ElevatorDevice> sync();

	/**
	 * 同步云梯信息
	 */
	@GetMapping("/getRealvideo")
	R getRealvideo(@RequestParam(value = "registerCode") String registerCode);

	/**
	 * 获取电梯历史告警信息(云梯接口)
	 */
	@GetMapping("/getLiftHisAlarm")
	R getLiftHisAlarm(String registerCodes);

	/**
	 * 获取电梯实时监控信息
	 */
	@GetMapping("/getAlarmVideo")
	R getAlarmVideo(@RequestParam(value = "registerCode") String alarmCode);

	/**
	 * 获取电梯当前状态
	 */
	@GetMapping("/getLiftStatus")
	@ApiOperation(value = "获取电梯当前状态")
	R getLiftStatus(String registerCode);

	/**
	 * 获取电梯环境监测数据
	 */
	@GetMapping("/getLiftPointData")
	@ApiOperation(value = "获取电梯环境监测数据", notes = "传入registerCode")
	R getLiftPointData(String registerCode);


	@PostMapping("/subscribeAlarmData")
	@ApiOperation(value = "电梯告警订阅")
	R subscribeAlarmData(String webHookUrl);

}
