Commit d6d51170 by 杨林龙

增加设备批量同步接口

1 parent 85f2a821
......@@ -55,6 +55,15 @@ public interface DeviceFeignService {
R<DeviceDTO> getOrStoreDeviceBySn(@RequestParam(value = "sn") String sn, @RequestParam(value = "storeIfNotExists") Boolean storeIfNotExists);
/**
* 根据设备号查询设备信息
*
* @param sns 设备号集合
* @return
*/
@PostMapping(value = "/getOrStoreDeviceBySns", consumes = MediaType.APPLICATION_JSON_VALUE)
R<List<DeviceDTO>> getOrStoreDeviceBySns(@RequestBody List<String> sns);
/**
* 获取设备的状态
*
* @param sn
......
......@@ -38,6 +38,12 @@ public class DeviceServiceFallbackImpl implements DeviceFeignService {
}
@Override
public R<List<DeviceDTO>> getOrStoreDeviceBySns(List<String> sns) {
log.info("getOrStoreDeviceBySns 熔断啦==={}", cause.getMessage());
return R.ok("无数据");
}
@Override
public R<DeviceStatusModel> getDeviceStatusBySn(String sn, Long offlineTime) {
log.info("getDeviceStatusBySn 熔断啦==={}", cause.getMessage());
return R.ok("无数据");
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!