root 2 anni fa
parent
commit
5c6e0c2da7

+ 4 - 1
src/main/java/com/zhiqiyun/open/core/video/impl/VideoDockingServiceImpl.java

@@ -1,5 +1,6 @@
 package com.zhiqiyun.open.core.video.impl;
 
+import cn.hutool.crypto.SecureUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.Maps;
 import com.zhiqiyun.open.core.video.VideoDockingService;
@@ -39,6 +40,7 @@ public class VideoDockingServiceImpl implements VideoDockingService {
 
     //        public final static String URI = "https://222.84.250.39:9800";
     public final static String URI = "https://172.169.12.21:18531";
+//    public final static String URI = "https://10.37.113.208:18531";
 
     public final static String VIDEO_JSESSIONID_TOKEN = "VIDEO_JSESSIONID_TOKEN:%s";
 
@@ -50,7 +52,8 @@ public class VideoDockingServiceImpl implements VideoDockingService {
 
     @Override
     public String getValidToken() throws Exception {
-        BoundValueOperations<String, String> boundValueOperations = this.redisTemplate.boundValueOps(String.format(VIDEO_JSESSIONID_TOKEN, USER_NAME_Urban));
+        String name = SecureUtil.md5(URI + "_" + USER_NAME_Urban);
+        BoundValueOperations<String, String> boundValueOperations = this.redisTemplate.boundValueOps(String.format(VIDEO_JSESSIONID_TOKEN, name));
         String token = boundValueOperations.get();
         if (StringUtils.isBlank(token) || !token.contains("JSESSIONID")) {
             Map<String, Object> paramValues = new HashMap<>(2);

+ 1 - 0
src/main/java/com/zhiqiyun/open/router/apis/HwVideoApi.java

@@ -48,6 +48,7 @@ public class HwVideoApi {
             params.put("toIndex", String.valueOf(request.getPage() * request.getLimit()));
             JSONObject jsonObject = request.getLoadType().compareTo(1) == 0 ? videoDockingService.loadDeviceList(params)
                     : videoDockingUrbanService.loadDeviceList(params);
+            log.info("设备信息:{}", jsonObject.toJSONString());
             JSONObject cameraBriefExInfos = jsonObject.getJSONObject("cameraBriefExInfos");
             int total = cameraBriefExInfos.getIntValue("total");
             JSONObject cameraBriefInfoExList = cameraBriefExInfos.getJSONObject("cameraBriefInfoExList");