Commit 8df6428d by levphon

标准接口api

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