package com.ruoyi.integration.api.feignClient;
|
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.integration.api.factory.IotInterfaceFallbackFactory;
|
import com.ruoyi.integration.api.vo.AddDevice;
|
import com.ruoyi.integration.api.vo.AddDeviceResp;
|
import com.ruoyi.integration.api.vo.DeleteDeviceResp;
|
import com.ruoyi.integration.api.vo.ShowDeviceResp;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
/**
|
* @author zhibing.pu
|
* @Date 2024/10/8 10:24
|
*/
|
@FeignClient(contextId = "IotInterfaceClient", value = ServiceNameConstants.INTEGRATION_SERVICE, fallbackFactory = IotInterfaceFallbackFactory.class)
|
public interface IotInterfaceClient {
|
|
|
/**
|
* 添加设备
|
* @param addDevice
|
* @return
|
*/
|
@PostMapping("/iotInterface/addDevice")
|
R<AddDeviceResp> addDevice(@RequestBody AddDevice addDevice);
|
|
|
/**
|
* 删除设备
|
* @param deviceId
|
* @return
|
*/
|
@PostMapping("/iotInterface/deleteDevice")
|
R<DeleteDeviceResp> deleteDevice(@RequestParam("deviceId") String deviceId);
|
|
/**
|
* 查询设备
|
* @param deviceId
|
* @return
|
*/
|
@PostMapping("/iotInterface/showDeviceRequest")
|
R<ShowDeviceResp> showDeviceRequest(@RequestParam("deviceId") String deviceId);
|
}
|