Commit 8df6428d by levphon

标准接口api

1 parent 9e13172b
......@@ -27,14 +27,14 @@ public interface DeviceLocationClient {
* @param deviceLocationDtos 设备上点集合
* @return
*/
@PostMapping(value = "/saveorupdatedevicelocationdata")
@PostMapping(value = "/dropLibrary")
@ResponseBody
R saveOrUpdateDeviceLocationData(@RequestBody Collection<DeviceLocationDto> deviceLocationDtos);
R dropLibrary(@RequestBody Collection<DeviceLocationDto> deviceLocationDtos);
/**
* 获取E盾中的所有设备号集合
*/
@GetMapping(value = "getallsninneweshield")
@GetMapping(value = "getAllSn")
@ResponseBody
R<List<String>> getAllSnInNewEshield();
R<List<String>> getAllSn();
}
......@@ -15,7 +15,7 @@ public class DeviceLocationDto {
/**
* 主键id
*/
private Integer id;
private Long id;
/**
* 设备号
......@@ -33,6 +33,21 @@ public class DeviceLocationDto {
private Date lastBsTime;
/**
* 速度
*/
private Integer speed;
/**
* 对应大数据侧状态 1、静止 3、行驶
*/
private Integer stayStatus;
/**
* 设备状态最新更新时间
*/
private Date stayStatusUpdatetime;
/**
* 创建时间
*/
private Date createdTime;
......
......@@ -23,14 +23,14 @@ public class DeviceLocationFallbackImpl implements DeviceLocationClient {
private Throwable cause;
@Override
public R<Integer> saveOrUpdateDeviceLocationData(Collection<DeviceLocationDto> deviceLocationDtos) {
log.warn("saveOrUpdateDeviceLocationData===熔断啦 {}", cause.getMessage());
public R<Integer> dropLibrary(Collection<DeviceLocationDto> deviceLocationDtos) {
log.warn("dropLibrary===设备位置数据落库熔断啦 {}", cause.getMessage());
return R.ok("服务异常");
}
@Override
public R<List<String>> getAllSnInNewEshield() {
log.warn("getAllSnInNewEshield===熔断啦 {}", cause.getMessage());
public R<List<String>> getAllSn() {
log.warn("getAllSn===熔断啦 {}", 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!