luodangjia
2024-10-08 4c96637a005891c709662ae84edd072ad9a4a57d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 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);
}