BatteryClient.java
1.32 KB
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
39
40
41
42
43
44
45
46
package cn.com.glsx.stdinterface.api;
import cn.com.glsx.stdinterface.dto.DevicePowerDTO;
import cn.com.glsx.stdinterface.factory.BatteryFallbackFactory;
import com.glsx.plat.core.web.R;
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.RequestParam;
import java.util.Collection;
import java.util.List;
/**
* @author xiangyanlin
* @date 2022/4/12
*/
@FeignClient(name = "ne-shield-standard-interfaces", path = "/nesi/battery", fallbackFactory = BatteryFallbackFactory.class, decode404 = true)
public interface BatteryClient {
/**
* 保存电量信息
*
* @param devicePowerDTO
*/
@PostMapping(value = "/save")
R saveBatteryInfo(DevicePowerDTO devicePowerDTO);
/**
* 根据设备sn获取{当前绑定中的}设备电量
* @param sn 设备号
* @return 设备电量
*/
@GetMapping("/queryOneBySn")
R<DevicePowerDTO> getDevicePowerBySn(@RequestParam("sn") String sn);
/**
* 根据设备sn获取设备电量
* @param sn 设备号
* @return 设备电量
*/
@GetMapping("/queryListBySn")
R<List<DevicePowerDTO>> getDevicePowerListBySn(@RequestParam("sn") Collection<String> sn);
}