package org.springblade.third.iotdevice.feign;

import com.alibaba.fastjson.JSONObject;
import org.springblade.common.constant.ServicesName;
import org.springblade.core.tool.api.R;
import org.springblade.device.entity.IotDevice;
import org.springblade.third.iotdevice.dto.AepIotDeviceQueryDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author lidexi
 * @date 2021/5/27 9:47
 */
@FeignClient(value = ServicesName.THIRD_SERVICE,path = "/feign/third/aep")
public interface IAepDeviceManageClient {
	/**
	 * 创建设备
	 * @return
	 */
	@PostMapping("/registerDevice")
	R<JSONObject> registerDevice(@RequestBody IotDevice iotDevice);
	/**
	 * 删除设备
	 * @return
	 */
	@PostMapping("/deleteDevice")
	R deleteDevice(@RequestBody IotDevice iotDevice);
	/**
	 * 查询设备
	 * @return
	 */
	@PostMapping("/queryDevice")
	R<JSONObject> queryDevice(@RequestBody IotDevice iotDevice);
	/**
	 * 批量查询设备
	 * @return
	 */
	@PostMapping("/queryDeviceList")
	R queryDeviceList(@RequestBody AepIotDeviceQueryDto aepIotDeviceQueryDto);
	/**
	 * 批量查询设备
	 * @return
	 */
	@PostMapping("/updateDevice")
	R updateDevice(@RequestBody IotDevice iotDevice);
}
