|
@@ -64,19 +64,9 @@ public class AlarmEventServiceImpl implements AlarmEventService {
|
|
|
@Autowired
|
|
|
private ICentereventTEventtypeService centereventTEventtypeService;
|
|
|
|
|
|
- @Value("${sooka.dahuaservice.detail:}")
|
|
|
+ @Value("${sooka.dahuaservice.detail}")
|
|
|
private String detailUrl;
|
|
|
|
|
|
- @Value("${sooka.clientKey:}")
|
|
|
- private String clientKey;
|
|
|
-
|
|
|
- @Value("${sooka.clientValue:}")
|
|
|
- private String clientValue;
|
|
|
-
|
|
|
- private static final String HEADER_KEY = "Authorization";
|
|
|
-
|
|
|
- private static final String HEADER_VALUE = "bearer ";
|
|
|
-
|
|
|
static final String ERROR_MSG_CHANNEL = "无法匹配相关设备!通道编号为:{}";
|
|
|
|
|
|
static final String ERROR_MSG_DEPT = "无法匹配相关部门!摄像头编号为:{}";
|
|
@@ -297,9 +287,9 @@ public class AlarmEventServiceImpl implements AlarmEventService {
|
|
|
// 创建请求实体 并 发送请求
|
|
|
String prBody = new IccHttpHttpRequest(detailUrl + url)
|
|
|
// 设置token
|
|
|
- .header(HEADER_KEY, HEADER_VALUE + RemoteApiUtil.getInstance().getToken())
|
|
|
- // 客户端模式,设置请求头
|
|
|
- .header(clientKey, clientValue)
|
|
|
+ .header("Authorization", "bearer " + RemoteApiUtil.getInstance().getToken())
|
|
|
+ // 客户端模式,设置请求头 # clientKey & clientValue 在请求大华接口时,以客户端模式请求必填。客户端模式无法请求:考勤,客流,信息发布,报警主机等模块
|
|
|
+ .header("User-Id", "1")
|
|
|
// 发送请求
|
|
|
.execute();
|
|
|
// 处理响应结果
|