jingyuanchao 1 жил өмнө
parent
commit
0dd0c24611

+ 8 - 0
project_data/sql/0.1.1/quartz/quartz.sql

@@ -0,0 +1,8 @@
+
+
+
+delete from sys_job where invoke_target in ('MediatorTask.videoIntegrityCheck()','MediatorTask.baseDeviceInfo()');
+-- 每日凌晨2点获取设备基础数据
+INSERT INTO `sys_job`(`job_id`, `job_name`, `job_group`, `invoke_target`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (213, '录像完整性主动获取', 'DEFAULT', 'MediatorTask.videoIntegrityCheck()', '0 0 3 * * ?', '1', '1', '0', '景远超', '2024-07-11 10:14:50', '景远超', '2024-07-11 10:15:32');
+-- 每日凌晨3点获取录像完整性数据
+INSERT INTO `sys_job`(`job_id`, `job_name`, `job_group`, `invoke_target`, `cron_expression`, `misfire_policy`, `concurrent`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (214, '基础设备信息获取', 'DEFAULT', 'MediatorTask.baseDeviceInfo()', '0 0 2 * * ?', '1', '1', '0', '景远超', '2024-07-24 14:31:01', '', NULL);

+ 13 - 1
project_data/sql/0.1.1/升级文档.txt

@@ -35,4 +35,16 @@ security:
         - /api/deploy/task
         - /api/deploy/taskReport
         - /ws/**
-        - /ws1/**
+        - /ws1/**
+
+3.nginx配置文件修改
+    3.1在监听8080de server块下增加配置:
+        location /ws {
+                 proxy_pass http://api;
+                 proxy_http_version 1.1;
+                 proxy_set_header Upgrade $http_upgrade;
+                 proxy_set_header Connection "upgrade";
+                 proxy_set_header Host $host;
+        }
+    3.2 重新加载配置文件:
+        在nginx的安装目录下的sbin目录执行命令: ./nginx -s reload

+ 3 - 0
soc-modules/soc-modules-iot/src/main/java/com/xunmei/iot/controller/IotServerInfoController.java

@@ -3,6 +3,7 @@ package com.xunmei.iot.controller;
 
 import com.xunmei.common.core.web.domain.AjaxResult;
 import com.xunmei.common.core.web.page.TableDataInfo;
+import com.xunmei.common.redis.aop.RepeatSubmitCheck;
 import com.xunmei.iot.dto.serverInfo.IotServerInfoEditDto;
 import com.xunmei.iot.dto.serverInfo.IotServerInfoPageDto;
 import com.xunmei.iot.service.IotServerInfoService;
@@ -13,6 +14,7 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
+import java.util.concurrent.TimeUnit;
 
 /**
  * <p>
@@ -38,6 +40,7 @@ public class IotServerInfoController {
 
     @ApiOperation("新增")
     @PostMapping({"/add"})
+    @RepeatSubmitCheck
     AjaxResult add(@RequestBody @Validated final IotServerInfoEditDto req) {
         serverInfoService.addIotServer(req);
         return AjaxResult.success();

+ 3 - 3
soc-modules/soc-modules-job/src/main/java/com/xunmei/job/task/MediatorTask.java

@@ -33,12 +33,12 @@ public class MediatorTask {
         log.info("录像完整性检查结束....,当前任务 id:{},当前时间:{},结果:{}", id, new Date(), JSON.toJSONString(result));
     }
 
-    //定时获取录像完整性检查数据
+    //定时获取设备基础信息
     public void baseDeviceInfo() {
         String id = UUID.fastUUID().toString();
-        log.info("开始处理录像完整性检查,当前任务 id:{},当前时间:{}", id, new Date());
+        log.info("开始获取设备基础信息,当前任务 id:{},当前时间:{}", id, new Date());
         AjaxResult result = remoteMediatorService.baseDeviceInfo();
-        log.info("录像完整性检查结束....,当前任务 id:{},当前时间:{},结果:{}", id, new Date(), JSON.toJSONString(result));
+        log.info("获取设备基础信息结束....,当前任务 id:{},当前时间:{},结果:{}", id, new Date(), JSON.toJSONString(result));
     }
 
 

+ 1 - 1
soc-modules/soc-modules-mediator/src/main/java/com/xunmei/mediator/api/video/service/impl/VideoIntegrityCheckServiceImpl.java

@@ -116,7 +116,7 @@ public class VideoIntegrityCheckServiceImpl extends ServiceImpl<VideoIntegrityCh
             object.put("index", iotDeviceInfo.getDeviceCode());
             object.put("recordDate", Arrays.asList(DateUtil.format(DateUtil.offsetDay(new Date(),-1), Constants.DAILY_FORMAT)));
             WebsocketResult websocketResult = IotServerUtils.invokeDownLinkServer(TopicTypeEnums.PRODUCT_SERVICE_INVOKE, iotDeviceInfo.getDeviceProduct(), iotDeviceInfo.getDeviceCode(), WebSocketConstants.GET_RECORD_INFOS_SERVICES, object);
-            LogUtils.WEBSOCKET_MSG.info("调用录像机获取录像信息:{}", JacksonUtils.toJSONString(websocketResult));
+            LogUtils.WEBSOCKET_MSG.info("获取录像完整性数据:{}", JacksonUtils.toJSONString(websocketResult));
             WebSocketSessionHolder.sendAll(JacksonUtils.toJSONString(websocketResult));
         }