|
@@ -3,6 +3,7 @@ package com.ozs.controller.upload;
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.ozs.common.core.redis.RedisCache;
|
|
import com.ozs.common.utils.ApiTokenUtils;
|
|
import com.ozs.common.utils.ApiTokenUtils;
|
|
import com.ozs.common.utils.HttpClientUtil;
|
|
import com.ozs.common.utils.HttpClientUtil;
|
|
import com.ozs.common.utils.StringUtils;
|
|
import com.ozs.common.utils.StringUtils;
|
|
@@ -60,6 +61,8 @@ public class GeoHazardMonitorTokenController {
|
|
private String sdkUrl;
|
|
private String sdkUrl;
|
|
@Autowired
|
|
@Autowired
|
|
private BaseUserService baseUserService;
|
|
private BaseUserService baseUserService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private RedisCache redisCache;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取web访问令牌
|
|
* 获取web访问令牌
|
|
@@ -73,7 +76,7 @@ public class GeoHazardMonitorTokenController {
|
|
LambdaQueryWrapper<SvcAddress> lw = new LambdaQueryWrapper<SvcAddress>();
|
|
LambdaQueryWrapper<SvcAddress> lw = new LambdaQueryWrapper<SvcAddress>();
|
|
if (!ObjectUtils.isEmpty(svcAddress.getClientId())) {
|
|
if (!ObjectUtils.isEmpty(svcAddress.getClientId())) {
|
|
lw.eq(SvcAddress::getClientId, svcAddress.getClientId());
|
|
lw.eq(SvcAddress::getClientId, svcAddress.getClientId());
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
jsonObject.put("resultCode", 0);
|
|
jsonObject.put("resultCode", 0);
|
|
jsonObject.put("message", "失败");
|
|
jsonObject.put("message", "失败");
|
|
jsonObject.put("data", "客户端编号不能为空");
|
|
jsonObject.put("data", "客户端编号不能为空");
|
|
@@ -100,7 +103,7 @@ public class GeoHazardMonitorTokenController {
|
|
jsonObject.put("data", "生成token失败");
|
|
jsonObject.put("data", "生成token失败");
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(jsonObject), "4370780c9a8c43e5");
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(jsonObject), "4370780c9a8c43e5");
|
|
}
|
|
}
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
jsonObject.put("resultCode", 0);
|
|
jsonObject.put("resultCode", 0);
|
|
jsonObject.put("message", "失败");
|
|
jsonObject.put("message", "失败");
|
|
jsonObject.put("data", "客户端密钥错误");
|
|
jsonObject.put("data", "客户端密钥错误");
|
|
@@ -193,6 +196,10 @@ public class GeoHazardMonitorTokenController {
|
|
respMsgAlarmVo.setCameraCode(reqMsgAlarmVo.getAlarmCamera());
|
|
respMsgAlarmVo.setCameraCode(reqMsgAlarmVo.getAlarmCamera());
|
|
respMsgAlarmVo.setIsCancel(2);
|
|
respMsgAlarmVo.setIsCancel(2);
|
|
respMsgAlarmVo.setCancelTime(null);
|
|
respMsgAlarmVo.setCancelTime(null);
|
|
|
|
+ // 记录要合成报警视频的报警id
|
|
|
|
+ Map<String, Object> map = redisCache.getCacheMap("WAIT_MERGE_VIDEO_ALARM_ID");
|
|
|
|
+ map.put(msgAlarm.getAlarmId(), msgAlarm.getAlarmTime());
|
|
|
|
+ redisCache.setCacheMap("WAIT_MERGE_VIDEO_ALARM_ID", map);
|
|
} else {
|
|
} else {
|
|
BeanUtils.copyProperties(reqMsgAlarmVo, msgAlarmVice);
|
|
BeanUtils.copyProperties(reqMsgAlarmVo, msgAlarmVice);
|
|
String[] imageUrl = reqMsgAlarmVo.getImageUrls();
|
|
String[] imageUrl = reqMsgAlarmVo.getImageUrls();
|