|
@@ -204,7 +204,7 @@ public class GeoHazardMonitorTokenController {
|
|
return JSONObject.toJSONString(jsonObject);
|
|
return JSONObject.toJSONString(jsonObject);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- jsonObject.put("resultCode", 0);
|
|
|
|
|
|
+ jsonObject.put("resultCode", 2);
|
|
jsonObject.put("message", "失败");
|
|
jsonObject.put("message", "失败");
|
|
jsonObject.put("data", "客户端密钥错误");
|
|
jsonObject.put("data", "客户端密钥错误");
|
|
return JSONObject.toJSONString(jsonObject);
|
|
return JSONObject.toJSONString(jsonObject);
|
|
@@ -987,8 +987,13 @@ public class GeoHazardMonitorTokenController {
|
|
twoMap.put("visualDistance", heartbeatVo.getVisualDistance().toString());
|
|
twoMap.put("visualDistance", heartbeatVo.getVisualDistance().toString());
|
|
String string = JSON.toJSONString(twoMap);
|
|
String string = JSON.toJSONString(twoMap);
|
|
heartbeatUtils.createHeartbeat(Constant.HERTBEA_KEY + heartbeatVo.getTerminalCode(), string);
|
|
heartbeatUtils.createHeartbeat(Constant.HERTBEA_KEY + heartbeatVo.getTerminalCode(), string);
|
|
- jsonObject.put("resultCode", 1);
|
|
|
|
- jsonObject.put("message", "ok");
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(respHeartbeatVo.getCurrentStream())) {
|
|
|
|
+ jsonObject.put("resultCode", 1);
|
|
|
|
+ jsonObject.put("message", "ok");
|
|
|
|
+ }else {
|
|
|
|
+ jsonObject.put("resultCode", 0);
|
|
|
|
+ jsonObject.put("message", "该相机暂无视频");
|
|
|
|
+ }
|
|
jsonObject.put("data", respHeartbeatVo);
|
|
jsonObject.put("data", respHeartbeatVo);
|
|
long end = System.currentTimeMillis();
|
|
long end = System.currentTimeMillis();
|
|
System.out.println("-------------------" + (begin - end) / 1000);
|
|
System.out.println("-------------------" + (begin - end) / 1000);
|